Forkk / MultiMC

(Note: MultiMC 3 is no longer being maintained. See https://github.com/Forkk/MultiMC4 instead.) A Minecraft tool that allows you to manage multiple installations as well as install and uninstall mods by simply dragging and dropping them. (This is the C# version)
http://forkk.net/MultiMC/
22 stars 9 forks source link

Custom assembly resolver loads from the wrong location #46

Closed finalsliver closed 12 years ago

finalsliver commented 12 years ago

Today, villecoder writes in from theforum's

Try your Mac console (Applications -> Utilities -> Console). When I run the Mac version, crash errors get put in there.

Here's my crash report:

4/14/12 11:47:11 PM [0x0-0x186186].MultiMC[4411] Operating System: Linux 4/14/12 11:47:11 PM [0x0-0x186186].MultiMC[4411] Loading settings... 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC4411: Gtk-WARNING **: Could not find the icon 'gtk-harddisk'. The 'hicolor' theme 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] was not found either, perhaps you need to install it. 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] You can get a copy from: 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] http://icon-theme.fr...op.org/releases 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] Loading instance from instances/Vanilla_1.2.5... 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] Loaded Ionic.Zip.Reduced from resources. 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] instances/Vanilla_1.2.5/minecraft 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at System.Collections.Generic.Dictionary2[System.String,Gdk.Pixbuf].get_Item (System.String key) [0x00000] in <filename unknown>:0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.GTKGUI.MainWindow.InstAdded (System.Object sender, MultiMC.ItemAddRemoveEventArgs1 e) [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.EventfulList1[MultiMC.Instance].OnItemAdded (MultiMC.Instance item, Int32 index) [0x00000] in <filename unknown>:0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.EventfulList1[MultiMC.Instance].Add (MultiMC.Instance item) [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.GTKGUI.MainWindow.LoadInstances () [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.Main..ctor () [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.Program.Main (System.String[] args) [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] [ERROR] FATAL UNHANDLED EXCEPTION: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at System.Collections.Generic.Dictionary2[System.String,Gdk.Pixbuf].get_Item (System.String key) [0x00000] in <filename unknown>:0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.GTKGUI.MainWindow.InstAdded (System.Object sender, MultiMC.ItemAddRemoveEventArgs1 e) [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.EventfulList1[MultiMC.Instance].OnItemAdded (MultiMC.Instance item, Int32 index) [0x00000] in <filename unknown>:0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.EventfulList1[MultiMC.Instance].Add (MultiMC.Instance item) [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.GTKGUI.MainWindow.LoadInstances () [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.Main..ctor () [0x00000] in :0 4/14/12 11:47:12 PM [0x0-0x186186].MultiMC[4411] at MultiMC.Program.Main (System.String[] args) [0x00000] in :0

I'm a bit of a developer myself, so I decided to pull the GIT repository and try and take a look at where this might be triggered from. But I'm not encountering this bug when I debug it from MonoDevelop. I did, however, run into an issue trying to load the embedded resources. The solution did not build an assembly called "MultiMC.Lib.MultiMC.resources.dll", so when it tried to run through the custom Assembly resolver, the Stream that it was trying to use was null (Line 160). Is there a project missing from the solution?

After putting a guard for that condition in, I was able to get the debug build to run. I haven't gone much past there.

Forkk commented 12 years ago

I'll fix this ASAP