Bug #19361
Calling CommNet.CommNetVessel.InPlasma causes a StackOverflow
80%
Description
While I was updating the Kerbalism mod to detect signal loss when in a plasma blackout I came across this bug.
I was calling CommNet.CommNetVessel.InPlasma in C# with just a simple if statement and it caused a StackOverflowException
else if (v.connection.InPlasma) // calling InPlasma causes a StackOverflow :(
v is a reference to a Vessel Class and all access to v.connection works as expected.
C# code snippet below from Kerbalism/src/Comms/ConnectionInfo.cs Note. using reflection to access the private field inPlasma returns the correct value.
https://github.com/steamp0rt/Kerbalism/blob/78db5a5b7dfbec752e7a316843e9974e39e76e42/src/Comms/ConnectionInfo.cs#L155-L162
Log output is:
[EXC 12:26:21.322] StackOverflowException: The requested operation caused a stack overflow. CommNet.CommNetVessel.get_InPlasma ()
with none of the usual debug info like the filename and line number etc you usually get with exceptions.
I suspect this is an error in KSP's code.
History
#2 Updated by diomedea over 6 years ago
- Status changed from New to Being Worked On
- % Done changed from 0 to 30
#3 Updated by victorr over 3 years ago
- Status changed from Being Worked On to Ready to Test
- Target version set to 1.12.0
- % Done changed from 30 to 80
We have made some changes in this last 1.12.0 release and would like some feedback on this issue. Thanks.