Principia icon indicating copy to clipboard operation
Principia copied to clipboard

CTD in flight planner

Open JonSeverinsson opened this issue 2 years ago • 1 comments

KSP occasionally crashes to desktop when editing a manoeuvrer in the flight planner. This I was using the mouse scroll wheel to change the timing of a manoeuvrer, but it is not the first time KSP have crashed on me while using the flight planer, and I don't think I was doing the exact same thing every time.

I'm running a RP-1 campaign, using KSP 1.12.3 and Principia ἵππαρχος, running on Debian GNU/Linux 11 (bullseye). All other mods are installed via CKAN, see the attached mod-list for details. I'm also attaching the last save from before the crash, and all KSP logs I could find.

ckan.zip save.zip logs.zip

JonSeverinsson avatar Sep 21 '22 14:09 JonSeverinsson

The relevant error seems to be mmap(PROT_NONE) failed. This might be relevant: https://forum.unity.com/threads/solved-il2cpp-android-mmap-prot_none-failed.1112581/ It suggests increasing vm.max_map_count, i.e. sysctl -w vm.max_map_count=262144.

rnlahaye avatar Sep 21 '22 15:09 rnlahaye

Thanks for the suggestion, but that doesn't seem to be the problem, as I'm still getting the crash after changing vm.max_map_count from 64k to 256k. I also logged the number of mapping of KSP while running the game (by running cd /proc/$(pidof KSP.x86_64)/ ; while sleep 1 ; do wc -l <maps ; done in a terminal), and the last value before the crash was 11530, but the highest value was 16149, so it doesn't seem that limit was the problem.

(I also tried setting vm.overcommit_memory=1, just in case 6GB of free swap wasn't enough for the overcommit heuristics, but it made no difference either.)

Attaching the last set of logs and savegame, from a run with vm.overcommit_memory=1 and vm.max_map_count=262138: 2022-09-22.zip

JonSeverinsson avatar Sep 22 '22 21:09 JonSeverinsson

The stack at the end of Player.log looks somewhat similar to one we saw in issue 3197. Unfortunately we never determined the cause for that issue, so it doesn't help much. As mentioned in that discussion, a crash*.dmp file created by KSP, if you find one, might help us understand the problem.

pleroy avatar Sep 25 '22 13:09 pleroy