You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] TITLE CHANGE: Cancelling "Save design info" dialog during "Save as..." REVERTS MOST RECENT CHANGE to component/simulation #2680
Ignore just about everything below in this comment. Scroll down to 15 May, 2025
Adding (by accident) and deleting a simulation without first creating a new config makes bad things happen upon save.
Expected behavior
OR works reliably when deleting an accidentally-created simulation.
To Reproduce
With a fresh instance of OpenRocket, File>Open example>TARC payload rocket.
Cancel "Rocket configuration" dialog.
Click to Flight simulations tab.
Click "New simulation", OK its dialog.
Click "Delete simulations" (the just-added sim is highlighted already)
OK the "are you sure" dialog
Click "Motors & Configuration" tab. Note the existing single config for [None;F50-9] - this is as it should be.
Click "New Configuration".
Select an Aerotech E30-4 from the dialog (probably not important which motor) and OK the motor selection dialog.
Note presence of configs for [None;F50-9] and [None;E30-4] - this is as it should be.
Click the "Flight simulations" tab.
Note two simulations, one for each of the two configs - this is as it should be.
Save the file
Cancel the "Save design info" dialog, and click Yes for the "are you sure" warning.
BEFORE selecting a file name, note that the Flight simulations tab has now lost the motor for Simulation 2
Save the file someplace convenient.
Choose a filename and save
Save "Only summary data"
Quit OpenRocket.
Note that items 20 and forward refer to a table resizing issue on macOS that's probably related to the problems with the OR file. But the file has already been saved without a motor, and if it's corrupt, it already is by this point.
Re-open OpenRocket by double-clicking on the saved-file.ork icon (File>Open will not repro the macOS table re-sizing behavior from opening the (corrupt?) file).
Click on "Flight simulations" tab.
Click on "Simulation 2" (or [SHIFT]+click to add "Simulation 2")
Click "Run simulations".
Click on Motors & Configuration tab.
Note that there are no configurations. In actuality, on macOS, the Motors and Configuration window has (as a result of these steps) been sized down so only the column titles show. The configurations are there (one with no motor), visible after making more space in the Motors & Config window. Discovered this after more testing. Not resizing in this way on Win ARM64 and Linux ARM64.
### Screenshots / .ork file
Screenshot: no configs configs area has been resized to column titles only:
Screenshot: Config 2 motor gone before file named or written to disk:
changed the title [-][Bug] Insert and delete a simulation without a new configuration [corrupts .ork file on save, I guess][/-][+][Bug] TITLE CHANGE: Cancelling "Save design info" dialog during "Save as..." REVERTS MOST RECENT CHANGE to component/simulation[/+]on May 15, 2025
After further experimentation, this issue affects not only simulation motors, but any component change. From experimentation, the issue does not appear to affect rearranging components in the rocket component tree.
Cancelling the "Save design info" dialog as part of a "Save As..." operation reverts the last component or sim change.
Note that the "Save design info" dialog explicitly states that filling it is optional.
Several demos:
Motor disappears from sim
Open OpenRocket 24.12 RC.01.
Open File>Open example>A simple model rocket.
OK the info dialog.
Click on "Motors & Configuration" tab.
Click [New Configuration].
Add a motor (I chose an Estes C5, default parameters).
Click "Flight simulations" tab.
Note that "Simulation 6" has the selected motor from the new configuration.
Select all simulations.
Click [Run simulations].
Note that "Simulation 6" still has the selected motor.
File>Save as...
Cancel the Save Design info dialog
[Yes] discard the info dialog
BUG by the time the "Save as OpenRocket ork file" dialog appears, "Simulation 6" no longer has a motor.
Most recent change to a component disappears
Open OpenRocket 24.12 RC.01.
Open File>Open example>A simple model rocket.
OK the info dialog.
Select the "Trapezoidal fin set" for editing
Set "Position relative to: Bottom of the parent component plus" to "-9 in"
OK the fin set dialog
Select the "Inner Tube" for editing
Set "Position relative to: Bottom of the parent component plus" to "4 in"
OK the Inner Tube dialog
Note that the fins are very far forward, and the motor mount is out of the back of the rocket, aft by some distance.
File>Save as
Cancel the Save Design info dialog.
[Yes] discard the info dialog
BUG by the time the "Save as OpenRocket ork file" dialog appears, the Inner Tube is back in the rocket, but the fins are still far forward.
below images are a test with only a single component change: fin position
No effect on rearranging component tree
Open OpenRocket 24.12 RC.01.
Open File>Open example>A simple model rocket.
OK the info dialog.
In the component tree, drag the "Body tube" above the "Nose cone" to re-order the design.
OK, I believe I've fixed this (and will need a hand setting up the PR - very new to that).
Code had been copied and pasted from RocketComponentConfig.java into the SaveDesignInfoPanel. The code had two items that were unnecessary in SaveDesignInfoPanel:
The first made SaveDesignInfoPanel sensitive to a Preferences setting that was meant to only affect RocketComponentConfig. Triggering this code in a specific way forced a spurious document.undo(), which removed the prior component, config or sim change.
The second also added a spurious document.undo() as the "cancel" action for the SaveDesignInfoPanel dialog, likewise undoing the prior component, config or sim change.
This code removed, the RocketComponentConfig code appears to work as designed, and the SaveDesignInfoPanel appears to be cancellable without undoing work user has just done.
Activity
jimmiedave commentedon Jan 21, 2025
This issue appears consistent in version 23.09 as well - though OR refuses to run the simulation upon load with "No motor" on 23.09
jimmiedave commentedon Jan 21, 2025
Apparent corruption occurs on Win 11 ARM (Parallels VM), but not the "no configurations" on reload problem.
Likewise on Ubuntu 24.04 ARM (Parallels VM): motor disappears, but reload does not demonstrate "no configurations".
jimmiedave commentedon Jan 22, 2025
Edited orig details to clarify what's actually happening to Motors & Config on macOS
[-][Bug] Insert and delete a simulation without a new configuration [corrupts .ork file on save, I guess][/-][+][Bug] TITLE CHANGE: Cancelling "Save design info" dialog during "Save as..." REVERTS MOST RECENT CHANGE to component/simulation[/+]jimmiedave commentedon May 15, 2025
UPDATED:
After further experimentation, this issue affects not only simulation motors, but any component change. From experimentation, the issue does not appear to affect rearranging components in the rocket component tree.
Cancelling the "Save design info" dialog as part of a "Save As..." operation reverts the last component or sim change.
Note that the "Save design info" dialog explicitly states that filling it is optional.
Several demos:
Motor disappears from sim
Most recent change to a component disappears
below images are a test with only a single component change: fin position

No effect on rearranging component tree
Removed code apparently copied and pasted from RocketComponentConfig.…
jimmiedave commentedon May 21, 2025
OK, I believe I've fixed this (and will need a hand setting up the PR - very new to that).
Code had been copied and pasted from RocketComponentConfig.java into the SaveDesignInfoPanel. The code had two items that were unnecessary in SaveDesignInfoPanel:
The first made SaveDesignInfoPanel sensitive to a Preferences setting that was meant to only affect RocketComponentConfig. Triggering this code in a specific way forced a spurious document.undo(), which removed the prior component, config or sim change.
The second also added a spurious document.undo() as the "cancel" action for the SaveDesignInfoPanel dialog, likewise undoing the prior component, config or sim change.
This code removed, the RocketComponentConfig code appears to work as designed, and the SaveDesignInfoPanel appears to be cancellable without undoing work user has just done.
Revert "Removed code apparently copied and pasted from RocketComponen…
Removed code from SaveDesignInfoPanel.java which was apparently paste…
Merge pull request #2815 from jimmiedave/fix2680
Make Cancel in the Save Design Info dialog discard its edits