-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
jmarrec
commented
Sep 5, 2024
- Fix [v1.8.0-rc3] Opening Shoebox Model several times in a row produces a crash #747 (hopefully)
- Fix a crash when you try to load the Shoebox model from the Workflow/Measures tab
cannot reproduce crash on macOs either |
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)) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currentDocument not null.
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.