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

Toolbar Issue #277

Open therealcrow999 opened 9 years ago

therealcrow999 commented 9 years ago

This is the issue from the forums thread, where the icon on stock toolbar is appearing when its not suppose to.

Here is link to my log files and mod list: http://www.mediafire.com/download/pohb2qjbe7t9zm7/Raven_Logs_10-11-14.zip

The forums has my slight older mod list with logs before I took Chatterer out.

My PC is: AMD Athlon 64 X2 Dual Core Processor 6000+ 3.00 Ghz Windows 7 Ultimate 64bit 4GB DDR 2 Nividia 560 TI 2GB 1TB HD

therealcrow999 commented 9 years ago

I also notice this when I changed from Mechjeb v2.4.0 to MechJeb v2.4.0.0-341 Dev version. I don't know if its related, top toolbar icon is blank. Here is picture: http://i1262.photobucket.com/albums/ii605/therealcrow999/screenshot3_zpsdf07e37a.png

Majiir commented 9 years ago

As I mentioned in the thread, I'm rewriting the button code, so this should hopefully go away without any effort. For my own reference:

NullReferenceException: Object reference not set to an instance of an object
  at UIListItemContainer.ScanChildren (Boolean includeInactive) [0x00000] in <filename unknown>:0 
  at UIListItemContainer.Start () [0x00000] in <filename unknown>:0 
  at UIListItemContainer.FindOuterEdges () [0x00000] in <filename unknown>:0 
  at UIScrollList.PositionNewItems () [0x00000] in <filename unknown>:0 
  at UIScrollList.InsertItem (IUIListObject item, Int32 position, System.String text, Boolean doEasing) [0x00000] in <filename unknown>:0 
  at UIScrollList.AddItem (IUIListObject item, System.String text) [0x00000] in <filename unknown>:0 
  at UIScrollList.AddItem (IUIListObject item) [0x00000] in <filename unknown>:0 
  at ApplicationLauncher.AddModApplication (.ApplicationLauncherButton button) [0x00000] in <filename unknown>:0 
  at ApplicationLauncher.AddModApplication (.OnTrue onTrue, .OnFalse onFalse, .OnHover onHover, .OnHoverOut onHoverOut, .OnEnable onEnable, .OnDisable onDisable, AppScenes visibleInScenes, UnityEngine.Texture texture) [0x00000] in <filename unknown>:0 
  at Kethane.UserInterface.MapOverlay.Start () [0x00000] in <filename unknown>:0 
Whitey04 commented 9 years ago

If the bug doesn't fix itself with the rewrite (and here's hoping) here may be a related failure. The button is underneath the stock one:

screenshot0

The button was in a normal spot before I disabled the overlay using it.

Mods: Chatterer 0.7.1.86 Alarm Clock 3.0.0.8 MechJeb 2.3.0

krenshala commented 9 years ago

I'm seeing the same problem in the VAB and when a ship is active. Sometimes for an active ship it is in the correct place, but most of the time for me it is not.

For me it looks like it is drawing the button icon on the wrong (right-hand) side of the yellow caution tape between the stock buttons and those from mods, but it is starting the draw from the left side of that tape, almost like one of the coords is inverted. With careful mouse maneuvering it is possible to hit the button "behind" whichever the game considers to be in front (it isn't consistent for me which is considers to be "in front").

What I see matches Whitey04's screenshot.

Climberfx commented 9 years ago

I'm having that too on mac.

15540720670_5034c4e017_o

koshell commented 9 years ago

I've been having the same issue, it has really been bugging me. And as mentioned by krenshala it does appear to merely be incorrect coordinates being given.

Edit: After looking at the code myself, I realized this has nothing to do with coordinates, and I believe it has something to do with the button not being detected properly when destroyed, and is then making a second toolbar button when there should only be one. I tested this a little by changing it so it would load in all situations, not just the map and tracking center and as I thought I was able to get two kethane buttons, one in the right place and one clipping. Also seems to only occur when their is at least one other mod loading toolbar buttons.