Cities: Skylines

Cities: Skylines

View Stats:
Lugh Limited Nov 5, 2021 @ 12:02pm
Error! With Extra Landscaping Tool Mod I think... !!!ATTN:BloodyPenguin!!! plz
Hey all, so I just came back to C:S after maybe a year or two, because I was watching Biffa on youtube. I started with a clean install of C:S, then downloaded Biffa's Tealand collection of mods. After that, I started the map editor, opened up Prussian Hills, and made some changes... and when I went to test the water flow in the "test map mode", I got an error when I opened up the water editor panel:

"Object reference not set to an instance of an object [System.NullReferenceException]
Details:
No details"

I did some digging in the log files and on the forums, and came across some rather unhelpful advice. It claimed the issue was caused by either a lack of RAM, lack of virtual memory, or a problem with my RAM. I ran RAMTest+ for the requisite 8 passes of default testing, and then 29 more passes of a shorter version of the testing, and low and behold my RAM had not a single error found.

Then I went on to disabling mods (unsubscribing from them fully - not just turning them off - and making sure to restart the game after every try). Luck was on my side, as when I removed the second group of mods on my list, the game worked fine. This process left me with three suspects, Hide it!, Find It! 2.7.1, and Extra Landscaping Tools. I downloaded the other mods that I had removed, and the game was still stable. Once I looked into BloodyPenguin's Extra Landscaping Tool mod, however, I saw that there was a known issue with the Find It! mod.

Is this a known issue? Does it have a fix? Lol, I'm probably being dumb and overlooking something, right? If this isn't a known problem, how can I get the debugging info I have to BloodyPenguin?
< >
Showing 1-6 of 6 comments
MarkJohnson Nov 5, 2021 @ 3:08pm 
You should be posting this on the mod page.

But it just sounds like you have workshop overload.

Either reduce workshop, increase page file, or add more RAM.

FYI, you can't just disable mods as they are still loaded in memory when launching the game. You must unsubscribe to actually remove them.

But some mods will throw errors if you remove from your city, and can even prevent the saved game from loading without them.

But the only thing I really see you misunderstanding is the difference between RAM and memory. RAM is physical memory you buy, but it is only a small part of total memory.

Try manually increasing the page file to expand on much slower memory.

https://steamcommunity.com/sharedfiles/filedetails/?id=2114415052
Lugh Limited Nov 7, 2021 @ 9:34am 
Originally posted by MarkJohnson:
You should be posting this on the mod page.

But it just sounds like you have workshop overload.

Either reduce workshop, increase page file, or add more RAM.

FYI, you can't just disable mods as they are still loaded in memory when launching the game. You must unsubscribe to actually remove them.

But some mods will throw errors if you remove from your city, and can even prevent the saved game from loading without them.

But the only thing I really see you misunderstanding is the difference between RAM and memory. RAM is physical memory you buy, but it is only a small part of total memory.

Try manually increasing the page file to expand on much slower memory.

https://steamcommunity.com/sharedfiles/filedetails/?id=2114415052

Thanks MarkJohnson, I appreciate the reply and the guidance concerning where to post this.

I apologize for my use of conflicting terms, but when I stated in my original post, that I had "disabled" certain mods during my search for the problem... I meant (and said as much) that I had unsubscribed from the mod AND I had restarted the game before trying again.

<<" Then I went on to disabling mods (unsubscribing from them fully - not just turning them off - and making sure to restart the game after every try) ">>

Please don't take that the wrong way, as I want to be very clear in what I actually did. I may only be an amateur intro level modder, but I have alot of experience troubleshooting everyday PC issues, and I wouldn't pester other people with my own problems since I know that they probably already have plenty of their own.

As for any concerns about RAM and memory, after I had done my original digging around for an answer, several discussions pointed me toward either a problem or deficiency in my RAM or virtual memory settings. Using both the Monitor It! mod, the loading screen mod, and the task manager, I made sure that I had plenty of head room when it came to my RAM capacity. My system has 64GB of RAM, and when everything was loaded (when the error occurred) and I was in game, I was only utilizing between 51% and 56% of my RAM.

I will move this post to the mod page as suggested. Thanks for your input Mark.
MarkJohnson Nov 7, 2021 @ 12:02pm 
This error usually has nothing to do with RAM. It has to do with memory.

Did you read and manually setup your page file in the guide above?

It's a long story, but windows doesn't like the way this game handles the page file and when the page file is set to automatically adjust the page file, it will choke and throw that error. or worse, if it happens on a saved game, it can kill the saved game completely.

What does you page file size show?

Also, the editors don't like certain mods enabled and can make the editor crash.

FYI, why do you think Extra Landscaping Tools is the problem? Did you unsubscribe it and everything was working fine? Did you do the same with the other mods you thought questionable?
Last edited by MarkJohnson; Nov 7, 2021 @ 12:05pm
Lugh Limited Nov 9, 2021 @ 11:45am 
https://drive.google.com/drive/folders/1A41_vDNwWHnoBcP-hMNXVJvrx76urp6I?usp=sharing

I never had my system set to automatically manage the size of my paging file. I always had them set to custom, and either 64 or 128 GB, since I have 64GB of RAM.


I did a significant amount of trial and error in narrowing down the problem mod. In truth, I can only really narrow it down to one of several mods, all by BloodyPenguin. Several of his mods require one another to work, and I tested them together as a group, without any other mods subscribed. I got the error I have been trying to diagnose, not to mention two separate errors. One (after I used a work around to get past the original "water tool error") prevents placing buildings and zones. The second causes the game to crash after exiting from the editor.

As you mentioned though, the water resource error is only occurring in the map editor's test mode. I just tried to get the error in game and I couldn't do it, with the same mod configuration as I had before.
Last edited by Lugh Limited; Nov 9, 2021 @ 11:53am
MarkJohnson Nov 9, 2021 @ 2:34pm 
Like I said before. The editors don't like some mods, so you just need to narrow it down.

The quickest way is to unsubscribe half your mods and test.

It it starts working, then start adding in your mods half at a time, until it gives problems.

If it still gives problems, then unsubscribe half of your mods again.

Rinse and repeat steps until you find all of the problematic mods.
Krzychu1245 Nov 10, 2021 @ 7:51pm 
It claimed the issue was caused by either a lack of RAM, lack of virtual memory, or a problem with my RAM.
Object reference not set to an instance of an object [System.NullReferenceException] is never caused by lack of RAM or any kind of memory issue(hardware problem) - with hardware problem most likely PC could be unstable, when doing anything, not just running the game.
It's pure programming problem/bug, that can be read as follows: some part of code (mod or vanilla), a function, expects that at the time of execution some other object (set of values in memory) was initialized and is available.

Possible causes of that error (simplified):
- initialization failed (e.g. to fully initialize an asset, the asset requires a mod or another asset as dependency)
- programming bug (e.g. modder writing the code expected some object or value that was either cleared or order of operations in the mod is wrong at some situation)
- compatibility issue - one mod reads, changes, removes or even fully replaces something in memory (object or value), but other mod expects the object or value be vanilla or will be completely different (value or different reference to other thing in memory).
and many more...

NullReferenceException is one of the most basic errors/exceptions in the code, by itself it does not provide too much information, log file can help a lot with at least finding at which state the problem occur. If it occurs somewhere deep then it almost always require connecting debugger to find what was wrong (functions are usually pretty long, say 5-50 lines of code, and log will tell us only the name of function, the rest must be debugged manually by triggering the exception - that usually takes a lot of time and sometimes is impossible without precise description what to do and in which order).

In above case there is an issue with initialization of the water source material (in general, it's an object that holds information how to render UI overlay or some kind of object on screen), most precisely a shader that contains code for rendering has not been found (simplifying, shader -> GPU instructions, but still human readable).
I've skeemed through the code of that mod and one possible cause might be that the scene the game use for testing didn't reference specific shader as a required resource (game devs didn't add that shader to the scene resources), so initialization fails and because shader is required to create the water source material and then material is used to render water source cylindrical shape with overlay, game throws errors when game tries to render it (rendering is one per frame so one error per frame == error spam in the log). The other cause might be an issue with the mod -> does not recognize scene switch correctly and tool initialization is not invoked, so later the game tries to use uninitialized tool.

Summarizing, the mod author needs to take a closer look how to solve that problem, for now.. don't use water tool in test mode (it won't be saved anyways, so not much of useful in that mode)
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Nov 5, 2021 @ 12:02pm
Posts: 6