mooege/mooege — Issue #350: NullReference Exception while loading MPQ files
Author: PirlotN
Created: 2011-11-20 20:25:22+00:00
State: open

Hi all, today i try to run the server with last commit src code compiling in VS2010.

Diablo MPQ files are downloaded today.

I am a new belgian user. Sorry for my English ;)

So, I just try to hide the error by catching exception an let finish runing the server but when I load the game it complenne of missing world environnement. Logic, as it has not all loader files;)

The console log with stackTrace.
```
[20.11.2011 20:48:37.287] [ Info] [Program]: mooege v0.7841.4341.37448 warming-up..
[20.11.2011 20:48:37.291] [ Info] [MPQStorage]: Initializing MPQ storage..
[20.11.2011 20:48:37.396] [Trace] [MPQPatchChain]: Added base-mpq file: CoreData.mpq.
[20.11.2011 20:48:37.396] [Trace] [MPQPatchChain]: Added base-mpq file: ClientData.mpq.
[20.11.2011 20:48:37.457] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7170.MPQ.
[20.11.2011 20:48:37.457] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7200.MPQ.
[20.11.2011 20:48:37.460] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7318.MPQ.
[20.11.2011 20:48:37.460] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7338.MPQ.
[20.11.2011 20:48:37.461] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7447.MPQ.
[20.11.2011 20:48:37.461] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7728.MPQ.
[20.11.2011 20:48:37.462] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7841.MPQ.
[20.11.2011 20:48:37.942] [Error] [MPQPatchChain]: Couldn't load catalog file: CoreTOC.dat.
[20.11.2011 20:48:38.947] [ Info] [MPQPatchChain]: Found a total of 46166 assets from TOC.dat catalog and parsed 327 of them in 00:00:00.9380537.
[20.11.2011 20:48:39.141] [ Info] [Program]: Item database loaded with a total of 0 item definitions.
[20.11.2011 20:48:39.259] [ Info] [MooNetServer]: MooNet-Server is listening on 0.0.0.0:1345...
[20.11.2011 20:48:39.260] [ Info] [GameServer]: Game-Server is listening on 0.0.0.0:1999...
[20.11.2011 20:51:29.684] [ Info] [Program]: mooege v0.7841.4341.37448 warming-up..
[20.11.2011 20:51:29.724] [ Info] [MPQStorage]: Initializing MPQ storage..
[20.11.2011 20:51:29.809] [Trace] [MPQPatchChain]: Added base-mpq file: CoreData.mpq.
[20.11.2011 20:51:29.809] [Trace] [MPQPatchChain]: Added base-mpq file: ClientData.mpq.
[20.11.2011 20:51:29.863] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7170.MPQ.
[20.11.2011 20:51:29.864] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7200.MPQ.
[20.11.2011 20:51:29.867] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7318.MPQ.
[20.11.2011 20:51:29.867] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7338.MPQ.
[20.11.2011 20:51:29.867] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7447.MPQ.
[20.11.2011 20:51:29.868] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7728.MPQ.
[20.11.2011 20:51:29.868] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7841.MPQ.
[20.11.2011 20:51:30.323] [Error] [MPQPatchChain]: Couldn't load catalog file: CoreTOC.dat.
[20.11.2011 20:51:31.248] [ Info] [MPQPatchChain]: Found a total of 46166 assets from TOC.dat catalog and parsed 327 of them in 00:00:00.8580491.
[20.11.2011 20:51:31.404] [ Info] [Program]: Item database loaded with a total of 0 item definitions.
[20.11.2011 20:51:31.447] [ Info] [MooNetServer]: MooNet-Server is listening on 0.0.0.0:1345...
[20.11.2011 20:51:31.448] [ Info] [GameServer]: Game-Server is listening on 0.0.0.0:1999...
[20.11.2011 21:12:08.001] [ Info] [Program]: mooege v0.7841.4341.37448 warming-up..
[20.11.2011 21:12:08.005] [ Info] [MPQStorage]: Initializing MPQ storage..
[20.11.2011 21:12:08.084] [Trace] [MPQPatchChain]: Added base-mpq file: CoreData.mpq.
[20.11.2011 21:12:08.084] [Trace] [MPQPatchChain]: Added base-mpq file: ClientData.mpq.
[20.11.2011 21:12:08.142] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7170.MPQ.
[20.11.2011 21:12:08.143] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7200.MPQ.
[20.11.2011 21:12:08.146] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7318.MPQ.
[20.11.2011 21:12:08.146] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7338.MPQ.
[20.11.2011 21:12:08.147] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7447.MPQ.
[20.11.2011 21:12:08.147] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7728.MPQ.
[20.11.2011 21:12:08.148] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7841.MPQ.
[20.11.2011 21:12:08.641] [Error] [MPQPatchChain]: Couldn't load catalog file: CoreTOC.dat.
[20.11.2011 21:12:09.617] [ Info] [MPQPatchChain]: Found a total of 46166 assets from TOC.dat catalog and parsed 327 of them in 00:00:00.9050518.
[20.11.2011 21:12:09.783] [ Info] [Program]: Item database loaded with a total of 0 item definitions.
[20.11.2011 21:12:09.830] [ Info] [MooNetServer]: MooNet-Server is listening on 0.0.0.0:1345...
[20.11.2011 21:12:09.832] [ Info] [GameServer]: Game-Server is listening on 0.0.0.0:1999...
[20.11.2011 21:15:36.568] [ Info] [Program]: mooege v0.7841.4341.38265 warming-up..
[20.11.2011 21:15:36.572] [ Info] [MPQStorage]: Initializing MPQ storage..
[20.11.2011 21:15:36.687] [Trace] [MPQPatchChain]: Added base-mpq file: CoreData.mpq.
[20.11.2011 21:15:36.688] [Trace] [MPQPatchChain]: Added base-mpq file: ClientData.mpq.
[20.11.2011 21:15:36.740] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7170.MPQ.
[20.11.2011 21:15:36.740] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7200.MPQ.
[20.11.2011 21:15:36.743] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7318.MPQ.
[20.11.2011 21:15:36.743] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7338.MPQ.
[20.11.2011 21:15:36.744] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7447.MPQ.
[20.11.2011 21:15:36.744] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7728.MPQ.
[20.11.2011 21:15:36.745] [Trace] [MPQPatchChain]: Applied patch file: /base/d3-update-base-7841.MPQ.
[20.11.2011 21:15:37.318] [Error] [MPQPatchChain]: Couldn't load catalog file: CoreTOC.dat.
[20.11.2011 21:15:38.689] [ Info] [MPQPatchChain]: Found a total of 46166 assets from TOC.dat catalog and parsed 327 of them in 00:00:01.2470713.
[20.11.2011 21:15:38.930] [Fatal] [Program]: Mooege terminating because of unhandled exception. - [Exception] System.TypeInitializationException: The type initializer for 'Mooege.Core.GS.Items.ItemGenerator' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Mooege.Core.GS.Items.ItemGenerator.SetAllowedTypes() in C:\Users\Paca\Dropbox\diablo3\mooege\src\Mooege\Core\GS\Items\ItemGenerator.cs:line 119
at Mooege.Core.GS.Items.ItemGenerator..cctor() in C:\Users\Paca\Dropbox\diablo3\mooege\src\Mooege\Core\GS\Items\ItemGenerator.cs:line 55
--- End of inner exception stack trace ---
at Mooege.Core.GS.Items.ItemGenerator.get_TotalItems()
at Mooege.Program.Main(String[] args) in C:\Users\Paca\Dropbox\diablo3\mooege\src\Mooege\Program.cs:line 67
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
```

So iIf someone has an idea of ​​that happening, thank you for sharing informations

Good evening all