ddevault / TrueCraft

Minecraft for hipsters
http://truecraft.io/
MIT License
2.4k stars 314 forks source link

Unhandled Exception: System.Reflection.ReflectionTypeLoadException #238

Closed wenLiangcan closed 8 years ago

wenLiangcan commented 8 years ago

The program built from commit 68f5378 failed to start:

Unhandled Exception:
System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () <0x40b9e8a0 + 0x00015> in <filename unknown>:0 
  at TrueCraft.Core.Logic.BlockRepository.DiscoverBlockProviders () <0x40b9e5d0 + 0x000c6> in <filename unknown>:0 
  at TrueCraft.Launcher.Singleplayer.Worlds.Load () <0x40b9e240 + 0x000f3> in <filename unknown>:0 
  at TrueCraft.Launcher.Views.SingleplayerView..ctor (TrueCraft.Launcher.LauncherWindow window) <0x40b9d000 + 0x0005f> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) TrueCraft.Launcher.Views.SingleplayerView:.ctor (TrueCraft.Launcher.LauncherWindow)
  at TrueCraft.Launcher.LauncherWindow..ctor () <0x40b106d0 + 0x001ab> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) TrueCraft.Launcher.LauncherWindow:.ctor ()
  at TrueCraft.Launcher.Program.Main (System.String[] args) <0x40a6de30 + 0x00197> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () <0x40b9e8a0 + 0x00015> in <filename unknown>:0 
  at TrueCraft.Core.Logic.BlockRepository.DiscoverBlockProviders () <0x40b9e5d0 + 0x000c6> in <filename unknown>:0 
  at TrueCraft.Launcher.Singleplayer.Worlds.Load () <0x40b9e240 + 0x000f3> in <filename unknown>:0 
  at TrueCraft.Launcher.Views.SingleplayerView..ctor (TrueCraft.Launcher.LauncherWindow window) <0x40b9d000 + 0x0005f> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) TrueCraft.Launcher.Views.SingleplayerView:.ctor (TrueCraft.Launcher.LauncherWindow)
  at TrueCraft.Launcher.LauncherWindow..ctor () <0x40b106d0 + 0x001ab> in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) TrueCraft.Launcher.LauncherWindow:.ctor ()
  at TrueCraft.Launcher.Program.Main (System.String[] args) <0x40a6de30 + 0x00197> in <filename unknown>:0 
ddevault commented 8 years ago

What OS?

wenLiangcan commented 8 years ago

Arch Linux with Mono 4.2.2.30 installed.

illblew commented 8 years ago

Arch Linux with Mono 4.2.2.30 here as well, same issue.

illblew commented 8 years ago

Swapping gtk3 and gtk on https://github.com/SirCmpwn/TrueCraft/blob/master/TrueCraft.Launcher/Program.cs#L20 and below allows the launcher to run. Not a fix but hopefully it helps figure something out.

wenLiangcan commented 8 years ago

@illblew Thanks to your comment I found out installing gtk-sharp-3 can also allow the launcher to run. It seems the problem is caused by the exception handling used to select gtk version.

illblew commented 8 years ago

Ahh, makes sense. I'm gonna do the same tonight so I can not do a hacky workaround.