Bug #2881
Controlling claw dockee throws NullReferenceException, hell kraken arises
100%
Description
KSP version: 0.24.2.559 vanilla, 64-bit and 32-bit on Linux
How to reproduce:- when docking using a claw, control the ship without the grabbing claw. (usually works)
- when docking using a claw, change camera to ship with grabbing claw, then switch back and dock as above (always works)
This can easily be accomplished with the attached .craft--launch one at the runway, drive it west onto the different-colored terrain, launch another, and dock them while controlling the grabbed vessel.
What happens: The debug console spams "NullReferenceException." The terrain disappears (when landed), velocity is set to zero (landed, arbitrary in orbit), camera is frozen, and UI disappears (similar to hell kraken, but no wacky altimeter--see pictures). Landed objects can be heard splashing into the ocean after falling the 70m (when on the runway). Objects in orbit slide off-screen with velocities along the direction of grabbing.
See the attached rover_clawing_KSP.log, wherein I loaded the game, docked twice while controlling the grabbing vessel, then changed camera to the grabbed vessel and docked passively. orbital_clawing_KSP.log is a record of activating the bug by loading a (career) quicksave of vessels in orbit, arming a claw, then docking while controlling the vessel without the armed claw. The LFB on the craft I used curiously throttled up as it slid off screen when the bug activated.
The first time this bug occurred, I was in orbit and the UI locked, requiring xkill to terminate the program. The program hasn't become locked on any other occasion.
Note: potentially related to #2381.
Related issues
History
#1 Updated by Padishar about 10 years ago
- Status changed from New to Confirmed
- % Done changed from 0 to 10
- Platform Any added
- Platform deleted (
Linux)
I can confirm the same thing happening on Windows 32 bit and 64 bit. The repro steps were:
Start clean KSP 0.24.2
Copy Mini-rove.craft into ships\SPH folder.
Start new sandbox
Click runway and launch a Mini-rove (A)
Reverse A off the runway and apply brakes
Exit to space center
Click runway and launch another Mini-rove (B)
Reverse B off the runway a short distance from A and apply brakes
Use [ to switch to A
Arm the claw
Use [ to switch back to B
Move camera to look down from above
Drive B into A's claw
(Watch as Kerbin disappears and both craft fall the 70m into an invisible ocean)
#2 Updated by Squelch about 10 years ago
- Severity changed from Normal to High
#3 Updated by torturedbythecia almost 10 years ago
Somehow this glitch will also occur without an AGU on screen and seems related to the references the comms use.
Some steps to reproduce which might help find the null reference exception:
1. have a relay sat and an orbiting ship/station.
2. set the antenna on the station to the relay satellite.
3. attach something with an AGU onto the satellite.
4. return to the station - the antenna will still try to point to the object/script reference of the satellite prior to attaching the AGU - this will trigger the bug and the ship will fly apart and fall.
I'm assuming that the script creates a new gameobject when you attach the AGU to something and simply replaces the other two with that new gameobject which I assume is the source of the null reference exception. I've had this occur with and without Remote Tech.
#4 Updated by Squelch over 9 years ago
- Has duplicate Bug #5264: NPE caused by connecting active vessel to non-active vessel klaw added
#5 Updated by Padishar over 9 years ago
Claw has now implemented a fix for this issue in his "Stock bug fix modules". It also appears to fix various other AGU related bugs so an investigation of the source and/or contact with Claw should indicate where the underlying problem lies and allow the required fix(es) to be made in KSP itself.
This is the forum thread: http://forum.kerbalspaceprogram.com/threads/97285-KSP-v1-0-4-Stock-Bug-Fix-Modules-%28Release-v1-0-4b-2-1-Aug-15%29
#6 Updated by sal_vager almost 9 years ago
- Status changed from Confirmed to Resolved
- Severity changed from High 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 resolved in 1.0.5
#7 Updated by Squelch almost 9 years ago
- Has duplicate Bug #5211: Camera gets stuck when a craft (not being the current one) with a claw attaches to the active vessel added
#8 Updated by TriggerAu over 8 years ago
- Status changed from Resolved to Closed