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

Stage related requests cause EOFError #11

Open
Rhahi opened this issue Oct 24, 2022 · 0 comments
Open

Stage related requests cause EOFError #11

Rhahi opened this issue Oct 24, 2022 · 0 comments

Comments

@Rhahi
Copy link
Contributor

Rhahi commented Oct 24, 2022

Two stage related requests, specifically

  • KRPC.Interface.SpaceCenter.Helpers.Stage
  • KRPC.Interface.SpaceCenter.Helpers.CurrentStage

Cause EOFError. (There may be more)

import KRPC.Interface.SpaceCenter.RemoteTypes as SCR
import KRPC.Interface.SpaceCenter.Helpers as SCH

conn = kerbal_connect("Test", "127.0.0.1")
ves = conn |> SCR.SpaceCenter |> SCH.ActiveVessel
parts = ves |> SCH.Parts |> SCH.All
SCH.Stage(parts[1])

Output

ERROR: EOFError: read end of file
Stacktrace:
  [1] read
    @ .\iobuffer.jl:217 [inlined]
  [2] _read_fixed
    @ ~\.julia\packages\ProtoBuf\A71jO\src\codec.jl:218 [inlined]
  [3] read_fixed
    @ ~\.julia\packages\ProtoBuf\A71jO\src\codec.jl:212 [inlined]
  [4] getJuliaValue
    @ ~\.julia\dev\KRPC\src\types.jl:118 [inlined]
  [5] process_return
    @ ~\.julia\dev\KRPC\src\message.jl:26 [inlined]
  [6] macro expansion
    @ ~\.julia\dev\KRPC\src\message.jl:46 [inlined]
  [7] kerbal(c::KRPC.KRPCConnection, calls::Tuple{KRPC.Interface.SpaceCenter.Part_get_Stage})
    @ KRPC ~\.julia\dev\KRPC\src\message.jl:40
  [8] kerbal
    @ ~\.julia\dev\KRPC\src\message.jl:14 [inlined]
  [9] Stage
    @ ~\.julia\dev\KRPC\src\generated.jl:13422 [inlined]
 [10] |>(x::KRPC.Interface.SpaceCenter.RemoteTypes.Part, f::typeof(KRPC.Interface.SpaceCenter.Helpers.Stage))
    @ Base .\operators.jl:911
 [11] top-level scope
    @ REPL[55]:1

Unfortunately there is not much information other than EOFError.
Note that this error may break the connection due to current semaphore implementation, so I suggest patching in a try-finally block on SendBiMessage while testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant