Mehni / kNumbers

Quick comparison of colonist stats
MIT License
34 stars 28 forks source link

Few crashes with stack frames: Numbers.MainTabWindow_Numbers:DoWindowContents (UnityEngine.Rect) #34

Closed tukoz closed 3 years ago

tukoz commented 3 years ago

FYI I recently got a few crashes with the following stack: 0x0000004257a1a4 in Numbers.MainTabWindow_Numbers:DoWindowContents (UnityEngine.Rect). Occured only 3 times amongst numerous crashes NOT mentioning Numbers at all the past few weeks. So just FYI, especially as I can only offer you the standard log as long as HugsLib won't publish its consolidated logs ("Upload error: Unknown Error" is all I get).

Context: Game runs fine for hours then crashes suddently with no common pattern I could notice yet. After what, reloading the last save will crash too (most commonly 3 times) before playing just fine with nothing showing up in the log.
Playing with 2 bases (main + mining), 40-50 pawns, hundreds to a couple k animals; Randy on either one of the 2 toughest difficulties.
Rimworld 1.2.2900 - Numbers updated as of Steam workshop - On Arch Linux. About 160 mods ordered as per Trisscar05's Mod Order Guide.

On 2021-04-15 19:45

Obtained 37 stack frames.                                                    
#0  0x007f0ded256ef5 in (Unknown)                                            
#1  0x007f0ded240862 in (Unknown)                                            
#2  0x007f0de4fce73e in (Unknown)                                            
#3  0x007f0de4fce7ab in (Unknown)                                            
#4  0x007f0de4fd16ab in (Unknown)                                            
#5  0x007f0de4fd1914 in (Unknown)                                            
#6  0x007f0de4fd1d82 in (Unknown)                                            
#7  0x007f0de4fd2bb4 in (Unknown)                                            
#8  0x007f0de4fd2cd8 in (Unknown)                                            
#9  0x007f0de4fa8d25 in (Unknown)                                            
#10 0x007f0de4f5ebaa in (Unknown)                                            
#11 0x007f0de4f5ed21 in (Unknown)                                            
#12 0x007f0de4f5ed69 in (Unknown)                                            
#13 0x000000401e9f07 in (wrapper managed-to-native) object:__icall_wrapper_ves_icall_object_new_specific (intptr)
#14 0x000000402faaee in System.Linq.Enumerable:Count<TSource_REF> (System.Collections.Generic.IEnumerable`1<TSource_REF>)
#15 0x0000004210f804 in Numbers.MainTabWindow_Numbers:DoWindowContents (UnityEngine.Rect)                                                                  
#16 0x00000040b3c2ed in Verse.Window:InnerWindowOnGUI (int)                  
#17 0x00000040b3ae29 in UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUISty
#18 0x007f0de4df1389 in (Unknown)                                            
#19 0x007f0de4f5d167 in (Unknown)                                            
#20 0x007f0de4f5e014 in (Unknown)                                            
#21 0x00000000d6cfb4 in (Unknown)                                            
#22 0x00000000d690e1 in (Unknown)                                            
#23 0x00000000d691cc in (Unknown)                                            
#24 0x00000000452fff in (Unknown)                                            
#25 0x000000006cf47b in (Unknown)                                            
#26 0x000000006d15eb in (Unknown)                                            
#27 0x000000006daea1 in (Unknown)                                            
#28 0x000000006db108 in (Unknown)                                            
#29 0x00000000c2b272 in (Unknown)                                            
#30 0x00000000c2b3f7 in (Unknown)                                            
#31 0x00000000c2306a in (Unknown)                                            
#32 0x00000000c23128 in (Unknown)                                            
#33 0x00000000c26550 in (Unknown)                                            
#34 0x00000000435fba in (Unknown)                                            
#35 0x007f0ded241b25 in (Unknown)                                            
#36 0x00000000445d93 in (Unknown)
tukoz commented 3 years ago

On 2021-04-16 09:50 after many hours playing and immediately after winning a fight vs 124 pirates:

Obtained 35 stack frames.                                                    
#0  0x007ff3ed351ef5 in gsignal                                              
#1  0x007ff3ed33b862 in abort                                                
#2  0x007ff3e50c973e in GC_unmap                                             
#3  0x007ff3e50c97ab in GC_unmap_old                                         
#4  0x007ff3e50cc6ab in GC_finish_collection                                 
#5  0x007ff3e50cc914 in GC_collect_a_little_inner                            
#6  0x007ff3e50ccd82 in GC_allocobj                                          
#7  0x007ff3e50cdbb4 in GC_generic_malloc_inner                              
#8  0x007ff3e50cdcd8 in GC_gcj_malloc                                        
#9  0x007ff3e50a3d25 in mono_gc_register_root                                
#10 0x007ff3e5059baa in mono_runtime_exec_managed_code                       
#11 0x007ff3e5059d21 in mono_runtime_exec_managed_code                       
#12 0x007ff3e5059d69 in mono_object_new_specific                             
#13 0x00000040b3af07 in (wrapper managed-to-native) object:__icall_wrapper_ves_icall_object_new_specific (intptr)
#14 0x000000410c68fe in System.Linq.Enumerable:Count<TSource_REF> (System.Collections.Generic.IEnumerable`1<TSource_REF>)
#15 0x00000040a2c134 in Numbers.MainTabWindow_Numbers:DoWindowContents (UnityEngine.Rect)
#16 0x0000004190894d in Verse.Window:InnerWindowOnGUI (int)                  
#17 0x00000041907489 in UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUISty
#18 0x007ff3e4eec389 in mono_print_method_from_ip                            
#19 0x007ff3e5058167 in mono_perfcounter_foreach                             
#20 0x007ff3e5059014 in mono_runtime_invoke                                  
#21 0x00000000d6cfb4 in (Unknown)                                            
#22 0x00000000d690e1 in (Unknown)                                            
#23 0x00000000d691cc in (Unknown)                                            
#24 0x00000000452fff in (Unknown)                                            
#25 0x000000006cf47b in (Unknown)                                            
#26 0x000000006d16b2 in (Unknown)                                            
#27 0x000000006da8c1 in (Unknown)                                            
#28 0x000000006db1d8 in (Unknown)                                            
#29 0x00000000c2306a in (Unknown)                                            
#30 0x00000000c23128 in (Unknown)                                            
#31 0x00000000c26550 in (Unknown)                                            
#32 0x00000000435fba in (Unknown)                                            
#33 0x007ff3ed33cb25 in __libc_start_main                                    
#34 0x00000000445d93 in (Unknown)
tukoz commented 3 years ago

On 2021-04-21 while loading a pod:

Obtained 38 stack frames.                                                    
#0  0x007fa6390c2ef5 in (Unknown)                                            
#1  0x007fa6390ac862 in (Unknown)                                            
#2  0x007fa630e0a73e in (Unknown)                                            
#3  0x007fa630e0a7ab in (Unknown)                                            
#4  0x007fa630e0d6ab in (Unknown)                                            
#5  0x007fa630e0d914 in (Unknown)                                            
#6  0x007fa630e0dd82 in (Unknown)                                            
#7  0x007fa630e0ebb4 in (Unknown)                                            
#8  0x007fa630e0ecd8 in (Unknown)                                            
#9  0x007fa630de4d25 in (Unknown)                                            
#10 0x007fa630d9abaa in (Unknown)                                            
#11 0x007fa630d9ad21 in (Unknown)                                            
#12 0x007fa630d9ad69 in (Unknown)                                            
#13 0x00000041438f07 in (wrapper managed-to-native) object:__icall_wrapper_ves_icall_object_new_specific (intptr)
#14 0x00000042287dec in Numbers.MainTabWindow_Numbers/<get_Pawns>d__24:MoveNext ()                                                                         
#15 0x00000041549aee in System.Linq.Enumerable:Count<TSource_REF> (System.Collections.Generic.IEnumerable`1<TSource_REF>)
#16 0x0000004228bcb4 in Numbers.MainTabWindow_Numbers:DoWindowContents (UnityEngine.Rect)
#17 0x00000041d9e20d in Verse.Window:InnerWindowOnGUI (int)                  
#18 0x00000041d9cd49 in UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUISty
#19 0x007fa630c2d389 in (Unknown)                                            
#20 0x007fa630d99167 in (Unknown)                                            
#21 0x007fa630d9a014 in (Unknown)                                            
#22 0x00000000d6cfb4 in (Unknown)                                            
#23 0x00000000d690e1 in (Unknown)                                            
#24 0x00000000d691cc in (Unknown)                                            
#25 0x00000000452fff in (Unknown)                                            
#26 0x000000006cf47b in (Unknown)                                            
#27 0x000000006d16b2 in (Unknown)                                            
#28 0x000000006da8c1 in (Unknown)                                            
#29 0x000000006db108 in (Unknown)                                            
#30 0x00000000c2b272 in (Unknown)                                            
#31 0x00000000c2b3f7 in (Unknown)                                            
#32 0x00000000c2306a in (Unknown)                                            
#33 0x00000000c23128 in (Unknown)                                            
#34 0x00000000c26550 in (Unknown)                                            
#35 0x00000000435fba in (Unknown)                                            
#36 0x007fa6390adb25 in (Unknown)                                            
#37 0x00000000445d93 in (Unknown)
tukoz commented 3 years ago

On 2021-05-08 05:58 - Crashes after opening Numbers table:

Obtained 15 stack frames.                                                    
#0  0x007fc2e041fef5 in (Unknown)                                            
#1  0x007fc2e0409862 in (Unknown)                                            
#2  0x007fc2d816673e in (Unknown)                                            
#3  0x007fc2d81667ab in (Unknown)                                            
#4  0x007fc2d81696ab in (Unknown)                                            
#5  0x007fc2d8169914 in (Unknown)                                            
#6  0x007fc2d8169d82 in (Unknown)                                            
#7  0x007fc2d816abb4 in (Unknown)                                            
#8  0x007fc2d816acd8 in (Unknown)                                            
#9  0x007fc2d8140d25 in (Unknown)                                            
#10 0x007fc2d80f6baa in (Unknown)                                            
#11 0x007fc2d80f6d21 in (Unknown)                                            
#12 0x007fc2d80f6d69 in (Unknown)                                            
#13 0x00000040f56f07 in (wrapper managed-to-native) object:__icall_wrapper_ves_icall_object_new_specific (intptr)
#14 0x007fc2380c94e9 in (wrapper dynamic-method) RimWorld.PawnTable:RimWorld.PawnTable.PawnTableOnGUI_Patch4 (RimWorld.PawnTable,UnityEngine.Vector2)
tukoz commented 3 years ago

On 2021-05-16 23:05 after reordering the whole mods list as per fandom, while zoning animals:

Obtained 35 stack frames.                                                    
#0  0x007f23c461bef5 in (Unknown)                                            
#1  0x007f23c4605862 in (Unknown)                                            
#2  0x007f23bc36273e in (Unknown)                                            
#3  0x007f23bc3627ab in (Unknown)                                            
#4  0x007f23bc3656ab in (Unknown)                                            
#5  0x007f23bc365914 in (Unknown)                                            
#6  0x007f23bc365d82 in (Unknown)                                            
#7  0x007f23bc366bb4 in (Unknown)                                            
#8  0x007f23bc366cd8 in (Unknown)                                            
#9  0x007f23bc33cd25 in (Unknown)                                            
#10 0x007f23bc2f2baa in (Unknown)                                            
#11 0x007f23bc2f2d21 in (Unknown)                                            
#12 0x007f23bc2f2d69 in (Unknown)                                            
#13 0x000000415a5f07 in (wrapper managed-to-native) object:__icall_wrapper_ves_icall_object_new_specific (intptr)
#14 0x000000416be8ee in System.Linq.Enumerable:Count<TSource_REF> (System.Collections.Generic.IEnumerable`1<TSource_REF>)
#15 0x0000004257a1a4 in Numbers.MainTabWindow_Numbers:DoWindowContents (UnityEngine.Rect)                                                                  
#16 0x000000421d3c7d in Verse.Window:InnerWindowOnGUI (int)                  
#17 0x000000421d27b9 in UnityEngine.GUI:CallWindowDelegate (UnityEngine.GUI/WindowFunction,int,int,UnityEngine.GUISkin,int,single,single,UnityEngine.GUISty
#18 0x007f23bc185389 in (Unknown)                                            
#19 0x007f23bc2f1167 in (Unknown)                                            
#20 0x007f23bc2f2014 in (Unknown)                                            
#21 0x00000000d6cfb4 in (Unknown)                                            
#22 0x00000000d690e1 in (Unknown)                                            
#23 0x00000000d691cc in (Unknown)                                            
#24 0x00000000452fff in (Unknown)                                            
#25 0x000000006cf47b in (Unknown)                                            
#26 0x000000006d13b2 in (Unknown)                                            
#27 0x000000006dac17 in (Unknown)                                            
#28 0x000000006db1d8 in (Unknown)                                            
#29 0x00000000c2306a in (Unknown)                                            
#30 0x00000000c23128 in (Unknown)                                            
#31 0x00000000c26550 in (Unknown)                                            
#32 0x00000000435fba in (Unknown)                                            
#33 0x007f23c4606b25 in (Unknown)                                            
#34 0x00000000445d93 in (Unknown)                                            

Unloading 127 unused Assets to reduce memory usage. Loaded Objects now: 17643.
Total: 294.849560 ms (FindLiveObjects: 1.345379 ms CreateObjectMapping: 1.920173 ms MarkObjects: 290.901692 ms  DeleteObjects: 0.681650 ms)

Setting up 2 worker threads for Enlighten.                                   
  Thread -> id: 7f57dbfff640 -> priority: 1                                  
  Thread -> id: 7f57db7fe640 -> priority: 

Again, all this just FYI in case it gives some clue, after you answered 'Yes' to my question about sharing logs on your Numbers Steam page.

Mehni commented 3 years ago

Seems like most of the crashes happen pretty early during the DoWindowContents method.

Widgets.Label(thingCount, "koisama.Numbers.Count".Translate() + ": " + Pawns.Count());

and nothing there really stands out at me. The Pawns.Count() does some things which might not be the most beautiful, but certainly nothing ugly enough to crash a game.

Googling points me at mono, which would make sense - that's the Linux implementation of the .NET framework. Which seems odd that it crashes on a really simple Count(). Maybe on the validator that's used inside the Pawns getter, but in all honestly... I don't see it.

I don't think I can fix this issue based on what I know.

tukoz commented 3 years ago

Thank you for that. Hope the lack of HugsLib's consolidated logs did not hinder too much your ability to look at them? I'll note your feedback. Crashes haven't mentionned Numbers at all during the last few days (I had a wonderfull night when the game would crash every N minutes). It then stopped crashing all of a sudden. Had deactivated Colonist History by Tammybee but that had been happening begore so, wait and see.
Talking of Mono, these are present in almost all stacks I've seen, when they dare print something with a tiny bit meaning info in them:

#0  0x007f7302ec9ef5 in gsignal                                              
#1  0x007f7302eb3862 in abort                                                
#2  0x007f72fac1073e in GC_unmap                                             
#3  0x007f72fac107ab in GC_unmap_old                                         
#4  0x007f72fac136ab in GC_finish_collection                                 
#5  0x007f72fac13914 in GC_collect_a_little_inner                            
#6  0x007f72fac149e6 in GC_alloc_large                                       
#7  0x007f72fac17aba in GC_generic_malloc                                    
#8  0x007f72fac17c94 in GC_malloc_kind_global                                
#9  0x007f72fabeaddf in mono_gc_register_root                                
#10 0x007f72faba0f39 in mono_object_new_fast                                 
#11 0x007f72faba0fa0 in mono_array_new_specific                              
#12 0x000000416fd45f in (wrapper managed-to-native) object:__icall_wrapper_ves_icall_array_new_specific (intptr,int)
...
#18 0x000000417085ea in (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
#19 0x007f72faa33389 in mono_print_method_from_ip                            
#20 0x007f72fab9f167 in mono_perfcounter_foreach                             
#21 0x007f72faba0014 in mono_runtime_invoke
...

Mehni thank you for the work you put into our community :o)

tukoz commented 3 years ago

You could close this IMHO if it is first related to another element than Numbers. My goal was to gain some help sure, but first to help improve the mods I luv (even these than cause hickup when dealing with hundred "pets" ;).

Mehni commented 3 years ago

Talking of Mono, these are present in almost all stacks I've seen, when they dare print something with a tiny bit meaning info in them:

That's the garbage collection. Only relevant thing I found is this: https://forum.unity.com/threads/gc-crash-on-debian.961422/

I'll close this now, as I can't help any further.