Skip to content

Simulation does not finish when running with JPype/orhelper #1575

@rckTom

Description

@rckTom

Loading an openrocket document and running a simulation using python as documented here results in simulations not finishing and returning the error.

ERROR net.sf.openrocket.simulation.BasicEventSimulationEngine - Simulation hit max time (1200s): aborting.

This only happens when starting the simulation with python (script down below). Running the same simulation from the gui just works fine.

I have bisected the problem and found that commit 2ad7cd1 introduced this behaviour.

Tested with the "A simple model rocket" preset and the following python script:

import orhelper

def main():
    selected_simulation = 2
    
    with orhelper.OpenRocketInstance() as inst:
        helper = orhelper.Helper(inst)
        doc = helper.load_doc("simple_rocket.ork")
        sim = doc.getSimulation(selected_simulation)
        helper.run_simulation(sim)

if __name__ == "__main__":
    main()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions