Majiir / Kethane

Resource mining and processing plugin for Kerbal Space Program.
http://forum.kerbalspaceprogram.com/showthread.php/23979-Kethane
Other
117 stars 32 forks source link

DEBUG mode breaks GUI #231

Closed macdjord closed 10 years ago

macdjord commented 10 years ago

Edit: It turns out that this is caused by setting DEBUG = True in settings.cfg, like Pontiac76 suggested below.

The UI panel isn't showing up correctly. There's a small window in the correct shade of green, but it's all messed up and totally nonresponsive - I can't even reposition it.

You can see it very faintly here, along the top edge of the screen above 'Warp Helper': screenshot55

This one shows it more clearly, just to the right of the flag icon. This is with all my other mods uninstalled, just to be sure it's not an interaction:

screenshot56

My output_log.txt: https://www.dropbox.com/s/ocm0557w0rmxwf1/output_log.txt

I'm on Windows, KSP 0.23, Kethane 0.8.4.

Pontiac76 commented 10 years ago

I suspect this has something to do with DEBUG. I had the same problem, was using Debug = True and was getting the exact same results. I quit my game, editing settings.cfg (in the Kethane directory) set Debug = False, reloaded, now the UI comes up and I can't get the same incorrectly visualized screen.

To further this, with Debug = True, when I edit settings.cfg so that ShowOverlay = True I would get the window and could do my duties. But if I turned off Show Overlay in the game, then went to KSP, then out to another planet, I'd get the same as shown in the second screenshot attached above.

I've downloaded Kethane source to my machine and I'll poke around, so I won't be able to publish a fixed DLL (if I find one) but I can publish a diff or instructions to fix in your code.

macdjord commented 10 years ago

Ah! Yes, thank you. Turning off DEBUG fixed the problem.

Majiir commented 10 years ago

Thanks for the logs. It looks like body might be null on this line: https://github.com/Majiir/Kethane/blob/master/Plugin/MapOverlay.cs#L459