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

trying to jettison fairing results in error #501

Closed
Tastaturtaste opened this issue Oct 7, 2018 · 2 comments
Closed

trying to jettison fairing results in error #501

Tastaturtaste opened this issue Oct 7, 2018 · 2 comments
Labels
bug Something isn't working service:space-center
Milestone

Comments

@Tastaturtaste
Copy link

Calling the following Pythoncode results in a crash.

for fairing in vessel.parts.fairings:
    fairing.jettison()

The errorcode looks like this:

Traceback (most recent call last):
File "", line 2, in
File "", line 1, in
File "C:\Program Files (x86)\Python37-32\lib\site-packages\krpc\client.py", line 140, in _invoke
raise self._build_error(response.results[0].error)
krpc.error.RPCError: Object reference not set to an instance of an object
Server stack trace:
at KRPC.SpaceCenter.Services.Parts.Fairing.get_Jettisoned () [0x00000] in :0
at KRPC.SpaceCenter.Services.Parts.Fairing.Jettison () [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0

Calling the following code works:

for fairing in vessel.parts.fairings:
    for module in fairing.part.modules:
        if module.name == 'ModuleProceduralFairing':
            module.trigger_event('Deploy')

I tested this with the AE-FF1 Airstream Protective Shell (1.25m)

@djungelorm djungelorm added this to the 0.4.8 milestone Oct 7, 2018
@djungelorm djungelorm added bug Something isn't working service:space-center labels Oct 7, 2018
djungelorm added a commit that referenced this issue Oct 7, 2018
@djungelorm
Copy link
Member

Managed to reproduce the issue, by doing the following:

  • Launch a vessel
  • Deploy it's fairing using fairing.jettison()
  • Revert to launch
  • Call fairing.jettison() which results in an exception.

Is this what you were doing or is there also some other way of triggering the exception?

I also have a possible fix for this, and a pre-release version with the fix is available here for you to test if you want: https://krpc.s3.amazonaws.com/deploy/bug/fairings/1237.1/krpc-0.4.8-45-g858a752.zip

@ozzmeister00
Copy link

@djungelorm I encountered something similar in KRPC 0.4.8/KSP 1.5.1.

Load into a vessel with parachutes tagged "parachute"
Quicksave
Deploy the parachutes
for part in vessel.parts.with_tag("parachute"): part.parachute.deploy()
With the server still running, quickload.

If I restart the server, and then run my script, I never hit that exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working service:space-center
Projects
None yet
Development

No branches or pull requests

3 participants