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

Two crashes within a few hours #3695

Closed
Clayell opened this issue Jun 19, 2023 · 3 comments
Closed

Two crashes within a few hours #3695

Clayell opened this issue Jun 19, 2023 · 3 comments

Comments

@Clayell
Copy link

Clayell commented Jun 19, 2023

Within a few hours, I have had 2 separate crashes of KSP. For both times, there has been a popup saying "Fatal error in GC" and then "Unexpected mark stack overflow". When I click "Ok", KSP crashes and then there's a unity crash popup. Both times I was repeatedly running simulations within my RP-1 save. There are no "FATAL" files in glog/Principia, but there are "Error", "Info", and "Warning" files for all of the right times, so this is what will be uploaded. I should also mention that the 1st crash was done on the previous version of principia, but the 2nd crash was done on the current version.

Images of popups: (both are discord images so paste them in a server for no download)
KSP/Windows(?) popup
Unity crash popup

Principia files for crashes (1 and 2):
https://drive.google.com/file/d/10qeUZNFi3an_8Paq8A1pTjPbvenUI7bx/view?usp=sharing (ERROR LOG CRASH 1)
https://drive.google.com/file/d/1NkEjO_sJBcTSHFmUr-lUMXfRbI-z5_Cd/view?usp=sharing (INFO LOG CRASH 1)
https://drive.google.com/file/d/14B14qbIe19pY-sw6Tyg9yfWkyYU0x86i/view?usp=sharing (WARNING LOG CRASH 1)
https://drive.google.com/file/d/1d2-MHda2BL5xnMBSg-UNJk-iYd4i6u74/view?usp=sharing (ERROR LOG CRASH 2)
https://drive.google.com/file/d/1_DGE3g7zeiDAa2OLURHh_CU0Cy8NR6GA/view?usp=sharing (INFO LOG CRASH 2)
https://drive.google.com/file/d/1dm01Tv_9J38Z3HIMFG9DIGKV6YFAfMpk/view?usp=sharing (WARNING LOG CRASH 2)

KSP Logs (only for crash 2):
https://drive.google.com/file/d/1iQ7F12PRMsX7X599lU7H2eslACVlD8MC/view?usp=sharing (KSP.log)
https://drive.google.com/file/d/1e4qeeqWT56WYLmKWp1ZKUye51dDvbveq/view?usp=sharing (Player.log)

@pleroy
Copy link
Member

pleroy commented Jun 19, 2023

Can you upload the contents of the corresponding crash folder located at C:/Users/video/AppData/Local/Temp/Squad/Kerbal Space Program/Crashes? From the logs it's not even clear that Principia is the cause of the crash.

@Clayell
Copy link
Author

Clayell commented Jun 19, 2023

Can you upload the contents of the corresponding crash folder located at C:/Users/video/AppData/Local/Temp/Squad/Kerbal Space Program/Crashes? From the logs it's not even clear that Principia is the cause of the crash.

Oh that's where that folder is, I've never found it before.

Crash 1:
https://drive.google.com/file/d/12C5EBalZ3CmRP9mC-Q4yBYmXdr07l93B/view?usp=sharing (crash.dmp)
https://drive.google.com/file/d/1hrUXiEpLOwZ_gW_5WvDRuPIS2ZDnSXq4/view?usp=sharing (error.log)
https://drive.google.com/file/d/1n7tYpXKFlE9UjARaRdWJ5qK73OsSpXJS/view?usp=sharing (Player.log)

Crash 2:
https://drive.google.com/file/d/1vINbLZh4m8cK2qNrbPQ51R4Hy3NbBQHm/view?usp=sharing (crash.dmp)
https://drive.google.com/file/d/1fHusp-lT6K24omRWt3NZJvM9j19sDTJ5/view?usp=sharing (error.log)
https://drive.google.com/file/d/1O9Ip6NuzWvYY5b3jMSkAunljYnu7OWvn/view?usp=sharing (Player.log)

I'm decently (but not absolutely) sure that these crashes are caused by principia, as in my previous save where I didn't have it installed I did not encounter these kinds of crashes.

@pleroy
Copy link
Member

pleroy commented Jul 5, 2023

I am going to claim that this has nothing to do with Principia:

  1. No error indication in the Principia logs.
  2. The crash stacks only reference Unity and mono frames. Example from crash 1:
Stack Trace of Crashed Thread 36680:
0x00007FF8752C23EA (mono-2.0-bdwgc) GC_malloc_uncollectable
ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00007FF874FB1BCC)
0x00007FF874FB1BCC (mono-2.0-bdwgc) (function-name not available)
0x00007FF8750C7FBF (mono-2.0-bdwgc) mono_object_is_alive
0x00007FF8752C2FCD (mono-2.0-bdwgc) GC_malloc_uncollectable
0x00007FF8752C08D1 (mono-2.0-bdwgc) GC_malloc_uncollectable
0x00007FF8752C062D (mono-2.0-bdwgc) GC_malloc_uncollectable
0x00007FF8752B9725 (mono-2.0-bdwgc) mono_breakpoint_clean_code
0x00007FF8752C6BD5 (mono-2.0-bdwgc) GC_malloc_uncollectable
0x00007FF8752C6B5F (mono-2.0-bdwgc) GC_malloc_uncollectable
0x00007FF875086566 (mono-2.0-bdwgc) mono_threads_set_shutting_down
0x00007FF874FD1569 (mono-2.0-bdwgc) mono_threads_attach_tools_thread
0x00007FF874FCF5A6 (mono-2.0-bdwgc) mono_thread_info_detach
0x00007FF87508614D (mono-2.0-bdwgc) mono_threads_set_shutting_down
0x00007FF8FC6E26AD (KERNEL32) BaseThreadInitThunk
0x00007FF8FDD0A9F8 (ntdll) RtlUserThreadStart
  1. For crash 1, none of the threads is in Principia code. I suspect that the Principia plugin was unloaded (possibly due to a scene change) at the time of the crash. For crash 2 there are threads in Principia code, but they are all suspended, waiting on a mutex or a condition.
  2. The address being accessed in the same for both crashes (00007FF874FB1BCC) while the Principia DLL was loaded at different addresses in both cases (00007FF890090000 and 00007FF834970000). This is very telling. Even if Principia was stomping on memory it would not overwrite the exact same address in both cases.

Closing.

@pleroy pleroy closed this as completed Jul 5, 2023
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

2 participants