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

[Bug fix] Change the default expression string for derived variables #4396

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

anagainaru
Copy link
Contributor

When I try to bpls on an aca file (in Norbert's branch) I am getting seg fault

$ ./bin/bpls -l run-488.aca --show-derived
  double   ckpt.bp/U      {8, 66, 66, 66} = 0.0964156 / 1
Segmentation fault: 11

This is because bpls checks the length of the expression string to decide if a variable is derived or not:

std::string ExprStr = fp->VariableExprStr(*variable);
if (ExprStr.size() > 0)
     // do stuff

Normally we return an empty string so this is fine in most cases:

std::string BP5Reader::VariableExprStr(const VariableBase &Var)
{
    // check if this is a derived variable and return the correct string, else
    std::string noDerive("");
    return noDerive;
}

However, for some reason aca files use the default implementation in Engine.h which is wrongly returning a NULL pointer.

@anagainaru anagainaru added this to the v2.11.0 milestone Nov 7, 2024
@eisenhauer eisenhauer enabled auto-merge (squash) November 7, 2024 21:15
@eisenhauer eisenhauer merged commit 0d5440f into ornladios:master Nov 7, 2024
37 of 38 checks passed
@anagainaru anagainaru deleted the bug-expstring branch November 8, 2024 01:06
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.

2 participants