mrnotsoevil / CSLMusicMod

Add custom music and radio stations to Cities: Skylines
GNU Lesser General Public License v2.1
26 stars 9 forks source link

NullReferenceException & DirectoryNotFoundException found #12

Closed miker84 closed 7 years ago

miker84 commented 7 years ago

When it tries to load the mod I get NullReferenceException found in the game after it loads the map. The second exception was found in the log.

The complete log is attached. Player.txt

I am running the game and mod on a 2012 MacBook Pro (Non-retina) 15" with macOS Sierra (10.12.1). I noticed in the log it also could not find the directory for the mod which probably caused the NullReference. I uninstalled(unsubscribed) and reinstalled(subscribed) and this did not fix the problem.

miker84 commented 7 years ago

Okay, so I created the folder inside the App contents and the exceptions cleared up. Now it doesn't load any musicpacks from the Workshop. So I guess this issue is still open since the fix was not exactly something everyone knows how to do.

rumangerst commented 7 years ago

I updated the mod. Is it fixed now?

miker84 commented 7 years ago

In game still comes up with this:

The Mod /Users/michaelruvalcaba/Library/Application Support/Steam/steamapps/workshop/content/255710/422934383 [CSLMusicMod.dll] has caused an error [ModException]

Details: System.NullReferenceException: Object reference not set to an instance of an object at CSLMusicMod.LoadingExtension.ExtendVanillaContent () [0x00000] in :0 at CSLMusicMod.LoadingExtension.OnLevelLoaded (LoadMode mode) [0x00000] in :0 at LoadingWrapper.OnLevelLoaded (UpdateMode mode) [0x00000] in :0

And here is the log: Player.txt

This happened after reinstalling mod.

rumangerst commented 7 years ago

I forgot to guard against a missing directory. Updated again.

miker84 commented 7 years ago

It works now perfectly. Thank you for your work on this. I know the feeling about missing some guard when coding all too well.