Skip to content

Conversation

@JoePfeiffer
Copy link
Contributor

@JoePfeiffer JoePfeiffer commented Jun 30, 2025

A sim warning event caused by an event after landing ends up having three parts:

The event triggering everything (for instance, a recovery deployment occurring after landing)
A warning about that event
A simulation warning event, caused by the warning.

Nothing was hooking the original event up to either the warning or the warning event in the .ork file; this ended up causing a null pointer exception.

With this PR, the original event and the warning are both hooked up to the sim warning event so the whole chain can be reconstructed. It would in a sense have been tidier to have hooked the original event up to the warning and the warning up to the sim warning event, but since warnings are saved in the .ork before events, this would have required saving the event's UUID with the warning until the event was loaded, which ended up seeming messier.

Note that a .ork file that was saved without hooking the original event up to the warning can be loaded (see @jimmiedave 's example in the original bug report), but the source of the sim warning doesn't appear in the warnings list. A .ork file saved with this PR does hook them up, and when the .ork is loaded the original event is reported properly.

Fixes #2804

…he event after landing in the warning event. This is not ideal, as the event should logically be saved with the actual warning; however, this would require loading the event's UUID when the warning is loaded, and then replacing it with the actual event once it's loaded; this quickly got messier than the approach taken here.
@JoePfeiffer JoePfeiffer merged commit b63ae1c into openrocket:unstable Jul 3, 2025
1 check passed
@JoePfeiffer JoePfeiffer deleted the fix-2804 branch July 27, 2025 00:37
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

Successfully merging this pull request may close these issues.

[Bug] Saving an .ork with 2 post-ground-hit warnings makes file unloadable with a bug warning

1 participant