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

Fix #747 - crash shoebox #748

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Fix #747 - crash shoebox #748

merged 2 commits into from
Sep 5, 2024

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
10 checks passed
@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