Skip to content

Fix #747 - crash shoebox#748

Merged
jmarrec merged 2 commits intodevelopfrom
747_CrashShoebox
Sep 5, 2024
Merged

Fix #747 - crash shoebox#748
jmarrec merged 2 commits intodevelopfrom
747_CrashShoebox

Conversation

@jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Sep 5, 2024

@jmarrec
Copy link
Collaborator Author

jmarrec commented Sep 5, 2024

cannot reproduce crash on macOs either

@jmarrec jmarrec merged commit c658cda into develop Sep 5, 2024
@jmarrec jmarrec deleted the 747_CrashShoebox branch September 5, 2024 12:13
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2024
boost::optional<openstudio::model::Model> model = versionTranslator.loadModel(filePath);
if (!model && isOpenStudioApplicationRunningFromBuildDirectory()) {
boost::optional<openstudio::model::Model> model_;
if (openstudio::filesystem::is_regular_file(filePath)) {
Copy link
Collaborator

@macumber macumber Sep 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this the line that prevents the crash? Or one of the lines below checking that currentDocument is not null?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currentDocument not null.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific change is mostly because I found it annoying and counterproductive to try to load a model and get a warning/error on the console like "Cannot resolve path 'xxxx', model can't be loaded".

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v1.8.0-rc3] Opening Shoebox Model several times in a row produces a crash

2 participants