linuxgurugamer / ksp_toolbar

Common API for GUI toolbars in KSP
BSD 2-Clause "Simplified" License
13 stars 14 forks source link

KSP 1.8.0 crashes when MiniAVC is present #22

Closed itrendafilov closed 4 years ago

itrendafilov commented 4 years ago

KSP 1.8.0 loads first time, but crashes in subsequent launches.

I've reproduced the issue by installing Toolbar, Toolbar Control and Click Through Blocker mods using CKAN on clean KSP 1.8.0 on Windows.

I've workaround the issue by deleting MiniAVC.dll and MiniAVC.xml from all GameData folders.

linuxgurugamer commented 4 years ago

Maybe that's because MiniAVC hasn't been updated yet? Good point though, I need to do that this evening and update the mods I already released

itrendafilov commented 4 years ago

I see you've tried to fixed this with version Toolbar 1.8.0.2. Unfortunately the problem still persists. Behaviour observed:

  1. The first load works fine.

  2. If you click to enable automatic updates. In logs I see: ADDON BINDER: Cannot resolve assembly: MiniAVC.XmlSerializers, Culture=neutral, PublicKeyToken=null

  3. If you relaunch the game it hard crashes. The last message in logs is the same as above. (I suspect the module doesn't load properly or the class is missing)

  4. If you install KSP-AVC 1.4.0.1 game is working (probably MiniAVC is disabled?)

  5. If you uninstall KSP-AVC it starts crashing again

  6. If you delete the MiniAVC.xml file it starts booting. Even if you disable the auto-update it still has the error in step. 2 and behaviour in 3.

linuxgurugamer commented 4 years ago

Thank you for those steps, Ill use them to reproduce the error. If KSP-ACV is installed the miniavc dlls are disabled.

linuxgurugamer commented 4 years ago

I've replicated it, thank you. Now I just need to figure out what's wrong

linuxgurugamer commented 4 years ago

It appears to be a timing issue. By changing it from starting instantly to the mainmenu, it works.

Could you repeat your tests, but replace the MiniAVC.dll with the one from the following file: https://www.dropbox.com/sh/t1277f6jp7aqb5d/AAArdpjCjZ9PSo_3pmAHKHFZa?dl=0 and let me know how it goes? Thank you

itrendafilov commented 4 years ago

I can confirm that the issue is fixed with Toolbar 1.8.0.5.

Something I've noticed as a side-effect is the change of behaviour. With previous releases the UI (enable/disable version check) was showing on Loading Screen before the Main Screen. Now it shows on the Main Screen.

I will close this issue as it works. Thanks you for spending time fixing it.

linuxgurugamer commented 4 years ago

The change in behaviour was a result of the bug being fixed. It used to start instantly, but with .net 4, seems ghat the xml class isnt initialized instantly, ergo the bug