Project

General

Profile

Bug #4803

Reverting flight to VAB from map view causes NRE and crash to desktop on relaunch

Added by Ruedii over 9 years ago. Updated over 8 years ago.

Status:
Closed
Severity:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04/29/2015
% Done:

100%

Version:
Platform:
Linux
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

If you revert the flight to the VAB and then relaunch the flight (with or without changes), it will cause an NRE and Crash to Desktop (on my Linux system) due to what appears to be an attempt to restore the camera position.

Steps to Replicate:
1. Launch a vessel (simpler the better. I could replicate with just a stayputnik drone core.)
2. Switch to Map View
3. Pause
4. Revert Flight to VAB from the pause menu
5. Click launch flight.
6. Crash to Desktop.
7. If you check Player.log and/or KSP.log there will be an NRE in the transition sequence.

KSP.log tail clip:
[code]NullReferenceException: Object reference not set to an instance of an object
at FlightCamera.GetAutoModeForVessel (.Vessel v) [0x00000] in <filename unknown>:0
at FlightCamera.setMode (Modes m) [0x00000] in <filename unknown>:0
at FlightCamera.setModeImmediate (Modes m) [0x00000] in <filename unknown>:0
at MapView.exitMapView () [0x00000] in <filename unknown>:0
at MapView.ExitMapView () [0x00000] in <filename unknown>:0
at FlightUIModeController.SetMode (FlightUIMode mode) [0x00000] in <filename unknown>:0
at FlightUIModeController.Start () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

------------------- initializing flight mode... ------------------

(Filename: /home/builduser/buildslave/unity/build/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Loading ship from file: /home/robert/.steam/steam/steamapps/common/Kerbal Space Program/KSP_Data/../saves/Test/Ships/VAB/Auto-Saved Ship.craft

(Filename: /home/builduser/buildslave/unity/build/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Untitled Space Craft loaded!

(Filename: /home/builduser/buildslave/unity/build/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

[/code]

KSP.log Stacktrace Clip:
[code]Native stacktrace:

/home/robert/.steam/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/x86/libmono.so(+0x894bf) [0xb59c04bf]
/home/robert/.steam/steam/steamapps/common/Kerbal Space Program/KSP_Data/Mono/x86/libmono.so(+0x21980) [0xb5958980]
[0xb7756d34]
[0xb7756d4c]
/lib/i386-linux-gnu/libpthread.so.0(raise+0x36) [0xb76f20c6]
/usr/lib/dri/fglrx_dri.so(+0x208eec3) [0xb4b08ec3]
/lib/i386-linux-gnu/libpthread.so.0(+0x6f70) [0xb76e9f70]
/lib/i386-linux-gnu/libc.so.6(clone+0x5e) [0xb7274bee][/code]

Full logs attached

Player.log (508 KB) Player.log Ruedii, 04/29/2015 02:23 AM
KSP.log (163 KB) KSP.log Ruedii, 04/29/2015 02:23 AM
crash_logs.rar (204 KB) crash_logs.rar Amonra, 05/01/2015 03:58 PM

History

#1 Updated by Ruedii over 9 years ago

  • Platform Linux added
  • Platform deleted (Any)

#2 Updated by sr over 9 years ago

  • Status changed from New to Confirmed
  • % Done changed from 0 to 10

Can confirm the issue with the steps described.

#3 Updated by drazed over 9 years ago

Cannot reproduce this crash on arch-linux 64bit (ksp64bit). However, on the re-launch, the camera is DEFINITELY NOT where it should be (zoomed way the hell out to space). Switching to map-view and back after re-launch resets the camera back to the launch pad. But no crash.

#4 Updated by Amonra over 9 years ago

drazed wrote:

Cannot reproduce this crash on arch-linux 64bit (ksp64bit). However, on the re-launch, the camera is DEFINITELY NOT where it should be (zoomed way the hell out to space). Switching to map-view and back after re-launch resets the camera back to the launch pad. But no crash.

If this is of any relevance, all KSP versions since even before 0.25 on Windows 32 bit had the camera bug.
It's still present in 1.0. Usually after several craft launch attempts and reverts to VAB, making changes and launching again.

Also had 2 NPE crashes in similar circumstances, but I think these might be somehow related to bugged ship parts, possibly because of Real Chutes mod - sometimes parachutes get "lost" from staging, become unfocusable on craft, while still being attached to it. Clicking on them results in them being taken, but the pert itself remains bugged.

If craft is launched with these bugged parts, it has problems with flight speeds and cant accelerate faster than ~100 m/s.

I don't have a saved copy of bugged craft, as I've fixed these - will provide if I get it again.
2 crash logs attached. Crash happens when going to VAB.
After the crash, the game has the craft on Launch Pad - so this state is saved.

#5 Updated by Ruedii over 9 years ago

As a note, it may be specific to 32bit-PAE Linux and/or ATI Drivers.

I forgot to mention that my system has changed from previous bug reports Current system:
Xubuntu 12.04 32bit on High-Speed USB Thumb drive.
AMD R9-280 (MSI Gamer model.)
AMD 14.12 "Omega" Proprietary driver. (I have to say AMD's drivers have come a LONG way.)
Ubuntu Lowlatency kernel build (3.13 series)
Ubuntu standard X11.

As a note, Amonra, please don't put your files in rar archives. RAR is a closed format, and I currently don't even have a program to unzip rar archives on my system. It is best to upload in plain text because most servers transfer using http compression anyway. If you must compress your uploads use "7z", "tar.gz" or deflate-based "zip". These are the most widely supported formats.

#7 Updated by Ruedii over 9 years ago

I just got an idea of how to fix this. When loading a craft, KSP should explicitly set the camera position, not inherit it from the previous craft view.

#8 Updated by sal_vager almost 9 years ago

  • Status changed from Confirmed to Resolved
  • Severity changed from Critical to Normal
  • % Done changed from 10 to 100

Hi, please be mindful of the bug reporting guidelines and priority table when reporting issues, thank you.

http://bugs.kerbalspaceprogram.com/projects/ksp/wiki

Also, this is not reproducible in build 1028, KSP 1.0.5

#9 Updated by TriggerAu over 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF