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

Game Crashes When Editing a Maneuver #3197

Closed
mse63 opened this issue Nov 7, 2021 · 12 comments
Closed

Game Crashes When Editing a Maneuver #3197

mse63 opened this issue Nov 7, 2021 · 12 comments

Comments

@mse63
Copy link

mse63 commented Nov 7, 2021

Running Principia on Ubuntu 20.04, and the game consistently crashes a few minutes into creating and editing a maneuver. I do not have any other mods installed, and stock KSP has never crashed for me, so I'm rather confident that the issue is caused by Principia. The relevant JOURNAL, ERROR, INFO, and WARNING files are here.

Please let me know if there's any more information I can offer up to help you diagnose the problem.

@pleroy
Copy link
Member

pleroy commented Nov 7, 2021

Thanks for reporting.

Your logs do not indicate a CHECK failure due to a consistency check. So I would assume that the problem comes from some nasty interaction with KSP in our C# code. I didn't try to replay your journal yet, but it's unlikely that it would tell us much.

Do you have a KSP crash folder? (Explanations here, although I have no idea where that folder would live on Ubuntu.) If so, please put its contents on your Google Drive.

Have you had the same problem with previous versions of Principia? You are using the latest version, Halley, which changed very little from Hadamard (the version before) so I would be surprised if we introduced regressions.

@mse63
Copy link
Author

mse63 commented Nov 7, 2021

I found the location of crash logs on this site.
I've uploaded two crash logs: Player_prev.log seems to be from last night, the last time I encountered the issue.
Player.log is from just now, when I reproduced this issue. This time, I managed to finish creating my node and begin warping to the maneuver time but unfortunately, the game crashed again.
I have not tried older versions of Principia. Would it be helpful to you for me to try an older version?

@pleroy
Copy link
Member

pleroy commented Nov 7, 2021

The logs you gave do indicate a crash. In the same place as the Player.log, do you have a crash folder? It should be named something like Crashes\Crash_2021-11-07_012345, with the date matching the date of the crash. If you have one, please put its contents (a tar or zip archive) on your Google Drive.

@mse63
Copy link
Author

mse63 commented Nov 7, 2021

Sorry, I could not find a Crashes folder.

@pleroy
Copy link
Member

pleroy commented Nov 7, 2021

I am really after a crash*.dmp file created by KSP, but I have no idea where it lives on Linux. This thread on Reddit talks about /tmp/dumps/. Can you take a look?

@pleroy
Copy link
Member

pleroy commented Nov 7, 2021

For our reference, here is the stack:

Caught fatal signal - signo:11 code:1 errno:0 addr:0xa0
Obtained 15 stack frames.
#0  0x007f757fb983c0 in (Unknown)
#1  0x007f757c80a547 in (Unknown)
#2  0x007f757c81a2fa in (Unknown)
#3  0x007f757cade25a in (Unknown)
#4  0x007f757bcb4c59 in (Unknown)
#5  0x007f757bcb4fbe in (Unknown)
#6  0x007f75803a40af in (Unknown)
#7  0x007f758057a640 in (Unknown)
#8  0x007f75803a95b8 in (Unknown)
#9  0x007f758036a095 in (Unknown)
#10 0x007f758036a84b in (Unknown)
#11 0x007f7580360745 in (Unknown)
#12 0x007f758076d5ea in (Unknown)
#13 0x007f757fb8c609 in (Unknown)
#14 0x007f757fab3293 in (Unknown)

Not overly helpful, but that's a null pointer.

@mse63
Copy link
Author

mse63 commented Nov 7, 2021

I've searched my entire hard drive .dmp files, and wasn't able to find anything related to KSP.
The reddit post found that directory by running KSP from the terminal, so I tried the same thing, but instead of that error message, I just got the much shorter (and, I imagine much less helpful):
Aborted (core dumped)

@pleroy
Copy link
Member

pleroy commented Nov 7, 2021

Thanks for looking into this. I'll try replaying the journal to see if it helps, but probably not before next week-end.

@pleroy
Copy link
Member

pleroy commented Nov 10, 2021

So I replayed the journal and, as I expected, it didn't exhibit the crash. I am pretty sure that the replaying was correctly executed because the last part of my INFO log looks just like the last part of the INFO log linked above. Unless we obtain more information, I do not see how we can debug this.

I noticed something that might be interesting in your logs, though. They contain the following:

Environment Info
Unix 7FFFFFFFFFFFFFFF  Args: KSP.x86_64 -heapsize 16384

The heapsize flag is a Steam flag; it's expressed in KiB, so the above command specifies a heap of 16 MiB. I am not sure how Steam uses that flag exactly, but 16 MiB is very little memory compared to what Principia needs (1-10 GiB). If that setting controls the memory allocated to the mods, Principia is sure to run out of memory and to die left and right.

You might want to try running outside of Steam, or setting the heapsize to a larger value (details here) to see if it helps.

@mse63
Copy link
Author

mse63 commented Nov 11, 2021

I was experimenting with setting the heapsize variable earlier to see whether that would fix the issue, and it seems I forgot to get rid of it before running the game in Player_prev.log .

The argument is (correctly) missing in Player.log. Running without the argument (or running directly from the terminal and not through Steam) doesn't fix the issue. I've also tried setting it to be arbitrarily high (16 GB) to no avail.

@pleroy
Copy link
Member

pleroy commented Nov 11, 2021

Ok, so I went on a wild goose chase with that null pointer access.

The thing is that Player.log dies with a different signal (SIGABRT instead of SIGSEGV):

Caught fatal signal - signo:6 code:-6 errno:0 addr:0x3e800020d7c
Obtained 16 stack frames.
#0  0x007f48002103c0 in (Unknown)
#1  0x007f480004f18b in (Unknown)
#2  0x007f480002e859 in (Unknown)
#3  0x007f47f3d5595e in (Unknown)
#4  0x007f47f3d559cb in (Unknown)
#5  0x007f47f3d588cb in (Unknown)
#6  0x007f47f3d58b34 in (Unknown)
#7  0x007f47f3d58fa2 in (Unknown)
#8  0x007f47f3d59dd4 in (Unknown)
#9  0x007f47f3d5cc4c in (Unknown)
#10 0x007f47f3d5ceb4 in (Unknown)
#11 0x007f47f3d2ff0a in (Unknown)
#12 0x007f47f3ce5b78 in (Unknown)
#13 0x007f47f3ce5cef in (Unknown)
#14 0x007f47f3ce5d37 in (Unknown)
#15 0x000000411cdf07 in (wrapper managed-to-native) object:__icall_wrapper_ves_icall_object_new_specific (intptr)

So someone is explicitly aborting the program. Furthermore, code -6 tells us that this is using a tkill/tgkill.

If Principia is the one calling tkill, you'll find a FATAL file in your glog/Principia; send it to us. If you don't have a FATAL file, then Principia is not the one aborting the program and I don't see how I can help you.

Sorry, something went wrong.

@mse63
Copy link
Author

mse63 commented Nov 14, 2021

Thinking that it might be enlightening, I found Ubuntu's System logs, and I think I found parts relevant to the crash. I don't know how useful they would be, but here are the relevant parts:
From apport.log:

ERROR: apport (pid 128000) Sun Nov 14 12:30:36 2021: called for pid 118198, signal 6, core limit 0, dump mode 1
ERROR: apport (pid 128000) Sun Nov 14 12:30:36 2021: executable: /home/mahmoud/.local/share/Steam/steamapps/common/Kerbal Space Program/KSP.x86_64 (command line "/home/mahmoud/.local/share/Steam/steamapps/common/Kerbal\ Space\ Program/KSP.x86_64 -heapsize 16777216")
ERROR: apport (pid 128000) Sun Nov 14 12:30:36 2021: executable does not belong to a package, ignoring

From syslog:

Nov 14 12:30:36 0ah steam.desktop[118197]: Aborted (core dumped)
Nov 14 12:30:37 0ah steam.desktop[91870]: Game removed: AppID 220200 "", ProcID 118198
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMAPPLIST_INTERFACE_VERSION001 / AppList
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMAPPS_INTERFACE_VERSION008 / Apps
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMHTMLSURFACE_INTERFACE_VERSION_004 / HTMLSurface
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMHTTP_INTERFACE_VERSION002 / HTTP
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMINVENTORY_INTERFACE_V002 / Inventory
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMMUSICREMOTE_INTERFACE_VERSION001 / MusicRemote
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMMUSIC_INTERFACE_VERSION001 / Music
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMPARENTALSETTINGS_INTERFACE_VERSION001 / ParentalSettings
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMREMOTESTORAGE_INTERFACE_VERSION014 / RemoteStorage
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMSCREENSHOTS_INTERFACE_VERSION003 / Screenshots
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMUGC_INTERFACE_VERSION010 / UGC
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMUNIFIEDMESSAGES_INTERFACE_VERSION001 / UnifiedMessages
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMUSERSTATS_INTERFACE_VERSION011 / UserStats
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface STEAMVIDEO_INTERFACE_V002 / Video
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface SteamController005 / Controller
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface SteamFriends015 / Friends
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface SteamMatchMaking009 / Matchmaking
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface SteamMatchMakingServers002 / MatchmakingServers
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface SteamNetworking005 / Networking
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface SteamUser019 / User
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 created interface SteamUtils009 / Utils
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 method call count for IClientUser::GetSteamID : 1
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 method call count for IClientFriends::GetPersonaName : 1
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 method call count for IClientUtils::GetAppID : 27
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 method call count for IClientUtils::RecordSteamInterfaceCreation : 25
Nov 14 12:30:37 0ah steam.desktop[91870]: Game 220200 method call count for IClientAppManager::GetAppInstallDir : 1
Nov 14 12:30:37 0ah steam.desktop[91870]: Uploaded AppInterfaceStats to Steam
Nov 14 12:30:37 0ah steam.desktop[91870]: Exiting app 220200
Nov 14 12:30:38 0ah gnome-shell[2099]: Window manager warning: Invalid WM_TRANSIENT_FOR window 0x2200005 specified for 0x2200039.

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

No branches or pull requests

2 participants