Cities: Skylines

Cities: Skylines

Näytä tilastot:
How to fix "Object reference not set to an instance of an object [System.NullReferenceException]" error?
I subscribed to some assets today and two vehicles, when I loaded my save this popped up once it got past the loading screen

"Object reference not set to an instance of an object [System.NullReferenceException]

Details: No details" I know it isn't assets, at least I think so since the loading screen mod said all assets were loaded before the error appeared. My world was completely blank after I pressed okay.

I've searched all over the forums and other places but those hints didn't help,I reset the game's configuration,I turned off all mods and assets, and I unsubscribed from the assets and vehicles that I added before the errors started. All of those did not work and the error kept on appearing for my city save, I can still load new worlds without a problem.

Here is the output log if it is any help: https://gist.github.com/anonymous/962bbcf3f85a8c056727f3caba31efb9
< >
Näytetään 1-13 / 13 kommentista
Northy 3.9.2017 klo 14.28 
Its a mod issue.
Consider it one of those annoying instances of running mods on a game.
I run no mods on any game... Guess what... I have no issues playing my games.
Well the mod or no mods, the load still continues to say that. So I'm not sure if it is a mod problem unless it destoryed the game save.
mod issues do make the save file un usable..

A mod will write a dependency into the save file:
eg MOD = superflashygfxitem: item (119998)

So when the game loads the save file it tries to access the dependency.
If the dependency value is no longer valid, usually due to the mod updating, the save file will no longer be useable

Delete your save for that town and start a fresh. If you do this without using mods you'll most likely never have another problem ever.
grapplehoeker (Porttikiellossa) 4.9.2017 klo 10.36 
Generally, a null reference error is generated due to the absence of a mod or an asset or an asset required by a mod (vice versa) that was present in the save but is no longer present when attempting to load that save.
I have serious concerns about the quantity of assets you're using. They appear to be far more than you have the memory capacity for, but that isn't necessarily related to this issue.
There seems to be at least two instances of a NR error. One involves an asset and the other involves music or soundbite from the radio - be aware that the music tracks and soundbites are recognised by the game as assets (or objects) and the absence of these from a save that used them will generate a NR error just as well as a missing building for example.
Solutions... first make sure you have an exact match for your custom content enabled that you used in your save when you attempt to load that save.
Reduce your subscriptions to within your meagre 8GB of RAM which is only sufficient for a small selection of mods and assets.
Probably the reason why I’m having a rocky start creating Quillsville on Cities Skylines

Northy lähetti viestin:
mod issues do make the save file un usable..

A mod will write a dependency into the save file:
eg MOD = superflashygfxitem: item (119998)

So when the game loads the save file it tries to access the dependency.
If the dependency value is no longer valid, usually due to the mod updating, the save file will no longer be useable

Delete your save for that town and start a fresh. If you do this without using mods you'll most likely never have another problem ever.
EDIT: Oh ffs, stop necroing ancient posts!!!!

Old/outdated/broken mods:

You have old version of Move It mod; unsubscribe it and use the new one (by Quboid) instead.

You have old versions of Fine Road Tool and Fine Road Anarchy mods; unsubscribe them and use new versions (by Klyte45) instead.

You have old version of Traffic Manager: President Edition; unsubscribe it and use TM:PE v11 STABLE (or LABS if you want latest features) instead.

You have old More Beautification mod which causes lag; unsubscribe it and use Find It! (by Boogieman Sam) instead.

You have old Rush Hour II mod which is obsolete and causes lag; unsubscribe it and use Real Time (by Dymanoid) instead.

Object reference errors:

> at RoadBaseAI.CanEnableTrafficLights

A network (road, rail, etc) asset is missing. Fix that with SafeNets mod.

Alternatively, enable all the "Safe Mode" options in Loading Screen Mod before loading your save.

> at RadioPanel.AssignStationToButton

I've only ever seen those caused by Nursing Homes mod (or it's assets) - did you ever use that? If so, remove it. If those errors are fixed by updating mods (as listed above) please let me know as I'm always interested to find what causes errors.

> at Building.PlayAudio
> at Building.CalculateGroupData

Unsubscribe Control Building Level Up v0.4 as it is game breaking.
Viimeisin muokkaaja on leftbehind; 27.2.2020 klo 6.08
BTW, I maintain a list of things that cause "object reference" errors in the TMPE wiki on github:

https://github.com/CitiesSkylinesMods/TMPE/wiki/Object-reference-not-set-to-an-instance-of-an-object
Northy lähetti viestin:
Its a mod issue.
Consider it one of those annoying instances of running mods on a game.
I run no mods on any game... Guess what... I have no issues playing my games.
Bravo for your ignorance next time don't right nothing if you're gonna be a no help!
Hi pals, firstly, sorry for revival this topic. But I leave the solution that fixed this problem for me particularly if someone finds it useful.

I've got that error after migrate my game (in the EPIC games launcher), from an HDD to a SSD, in a new computer with new windows, but after a while, breaking my desk, my head..., you know, i noticed that I had not installed all the Visual C++ x86/64 libraries :alphys:.

I installed all of those (4 in total), and the game launched as good as ever.

The Visual C++ libraries that I've installed are:
* Microsoft Visual C++ 2010 Redistributable x86 and x64 (both)
* Microsoft Visual C++ 2015-2019 Redistributable x86 and x64 (both)

It's weird that Epic or Cities Installer doesn't install the required Visual C++ by itself, or doesn't provide a folder containing that important things unlike other games I have (example Sonic CD that comes with the installers of the C++ and DirectX).

I hope it helps. Greetings from VZLA :steamthumbsup:
Northy lähetti viestin:
Its a mod issue.
Consider it one of those annoying instances of running mods on a game.
I run no mods on any game... Guess what... I have no issues playing my games.
Northy is everything thats wrong with the web, ever.
Ive never used a mod and Im having this issue
Object reference not set to an instance of an object [System.NullReferenceException]

Details:
No details
Northy lähetti viestin:
Its a mod issue.
Consider it one of those annoying instances of running mods on a game.
I run no mods on any game... Guess what... I have no issues playing my games.


bro added nothing of value
I get that message sometimes but I just don't worry about it. So far, no problemo. There's no way I'm playing this game without mods tho.
< >
Näytetään 1-13 / 13 kommentista
Sivua kohden: 1530 50

Lähetetty: 3.9.2017 klo 14.07
Viestejä: 13