Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Occasionally, Window Fails to Fill, Spamming Stack Trace Instead #21

Closed
maarxx opened this issue Apr 22, 2017 · 5 comments
Closed

Comments

@maarxx
Copy link
Contributor

maarxx commented Apr 22, 2017

[Bug] Occasionally, Window Fails to Fill, Spamming Stack Trace Instead

When it happens, the main view renders only a couple pawns (presumably until it hits the error row) and then suddenly renders no more pawns.

It happens on the GUI thread, so it spams the below stack trace error a bajillion times per second until the window is closed.

Exception filling window for kNumbers.MainTabWindow_Numbers: System.NullReferenceException: Object reference not set to an instance of an object
  at kNumbers.MainTabWindow_Numbers+<>c.<UpdatePawnList>b__30_35 (Verse.ThingWithComps p) [0x00000] in <filename unknown>:0 
  at System.Linq.SortSequenceContext`2[Verse.ThingWithComps,System.String].Initialize (Verse.ThingWithComps[] elements) [0x00000] in <filename unknown>:0 
  at System.Linq.QuickSort`1[Verse.ThingWithComps].PerformSort () [0x00000] in <filename unknown>:0 
  at System.Linq.QuickSort`1+<Sort>c__Iterator21[Verse.ThingWithComps].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Verse.ThingWithComps].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[Verse.ThingWithComps]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.ToList[ThingWithComps] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 
  at kNumbers.MainTabWindow_Numbers.UpdatePawnList () [0x00000] in <filename unknown>:0 
  at kNumbers.MainTabWindow_Numbers.DoWindowContents (Rect r) [0x00000] in <filename unknown>:0 
  at HugsLib.GuiInject.WindowDetour+<>c__DisplayClass1.<_WindowOnGUI>b__0 (Int32 x) [0x00000] in <filename unknown>:0 
Verse.Log:Error(String)
HugsLib.GuiInject.<>c__DisplayClass1:<_WindowOnGUI>b__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle)
@maarxx
Copy link
Contributor Author

maarxx commented Apr 22, 2017

I can replicate this one, it happens when a pawn is downed, there is a short delay between when they are first downed and when the word "Downed" appears on their infobox in the lower left corner, as evidenced in these two screenshots, taken moments apart:

https://steamuserimages-a.akamaihd.net/ugc/799796029605566980/F832ADF8FC26FFEFFAD8AD506C6D992030ED34CE/

https://steamuserimages-a.akamaihd.net/ugc/799796029605567102/CF692D5A2162DC8DCBCC0E2760D5C6EEE777F463/

During the gap in between, if Numbers is opened, this stack trace is thrown repeatedly, regardless of columns selected, even if no columns are selected at all.

@maarxx
Copy link
Contributor Author

maarxx commented Apr 22, 2017

Might be related to #17 , not sure.

@maarxx
Copy link
Contributor Author

maarxx commented Apr 22, 2017

Definitely related, the above replication steps still hold, I have seen both stack traces, here is the other stack trace for reference, but I have (somehow) seem both during the same replication steps, so the issue is the same.

Exception filling window for kNumbers.MainTabWindow_Numbers: System.NullReferenceException: Object reference not set to an instance of an object
  at kNumbers.KListObject.Draw (Rect rect, Verse.ThingWithComps ownerPawn) [0x00000] in <filename unknown>:0 
  at kNumbers.MainTabWindow_Numbers.DrawPawnRow (Rect r, Verse.ThingWithComps p) [0x00000] in <filename unknown>:0 
  at kNumbers.MainTabWindow_ThingWithComp.DrawRows (Rect outRect) [0x00000] in <filename unknown>:0 
  at kNumbers.MainTabWindow_Numbers.DoWindowContents (Rect r) [0x00000] in <filename unknown>:0 
  at HugsLib.GuiInject.WindowDetour+<>c__DisplayClass1.<_WindowOnGUI>b__0 (Int32 x) [0x00000] in <filename unknown>:0 
Verse.Log:Error(String)
HugsLib.GuiInject.<>c__DisplayClass1:<_WindowOnGUI>b__0(Int32)
UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, GUISkin, Int32, Single, Single, GUIStyle)

@maarxx
Copy link
Contributor Author

maarxx commented Apr 22, 2017

Closing #17 as a duplicate in favor of #21

@maarxx
Copy link
Contributor Author

maarxx commented Apr 22, 2017

Was on 0.6.1, didn't see new release 0.6.2, still replicating in 0.6.2, although now it is only thrown when "Current Job" is a selected column, or there is something inconsistent happening here.

Regardless, issue is consistently replicable by selecting "Current Job" column, pausing the game, using DevTool "Tool: Down" on a pawn, then opening Numbers.

Not sure if there is another subtly different bug lurking in this same comment chain, but I couldn't find enough of a difference to warrant two open tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant