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

Crash on Kiva error messaging #9309

Closed
3 tasks
matthew-larson opened this issue Mar 2, 2022 · 1 comment · Fixed by #9316
Closed
3 tasks

Crash on Kiva error messaging #9309

matthew-larson opened this issue Mar 2, 2022 · 1 comment · Fixed by #9316
Assignees
Labels
Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze)

Comments

@matthew-larson
Copy link
Contributor

Issue overview

A Kiva model was crashing when hitting the warning "The weights of associated Kiva instances do not add to unity--check exposed perimeter values." The error was tracked back to and error in the Kiva::setMessageCallback function and the second argument needing to be a std::pair instead of a std::string.

Details

Some additional details for this issue (if relevant):

  • EnergyPlus v9.6

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added (list location of defect file here)
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
@matthew-larson matthew-larson added Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze) labels Mar 2, 2022
@matthew-larson matthew-larson added this to the EnergyPlus 22.1 milestone Mar 2, 2022
@matthew-larson matthew-larson self-assigned this Mar 2, 2022
@nealkruis
Copy link
Member

@mitchute FYI, we missed this when we were setting up the callback functions to also take in the state pointer. I believe there is only one place where we set the context pointer for the callback. Turns out you can cast anything to a void* and then to anything else, so the so there was nothing wrong from the compiler's perspective.

@matthew-larson to prevent this in the future, we could create a wrapper function in EnergyPlus around Kiva::setMessageCallback that only takes arguments of a state and a std::string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus NotIDDChange Code does not impact IDD (can be merged after IO freeze)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants