[Bug] ImHex crashes if variable in attribute parameter is not defined at runtime. #2173
Open
1 task done
Labels
bug
Something isn't working
Uh oh!
There was an error while loading. Please reload this page.
Operating System
Windows
What's the issue you encountered?
As a simple example consider the following pattern
with input file defined as the pragma example.
With the comment ImHex works as usual, but remove the comment and ImHex will crash with error :
This error occurs with any attribute that has at least one argument and the argument is undefined at runtime but defined at compile time.
Note that the error should be that data was read past the end of the file but that error is skipped.
The stack trace shows the same line that is executed when the variable is undefined at compile time. If the variable was defined at compile time then it should generate an error saying that the variable extended past the end instead of the undefined variable error.
Is this perhaps a consequence of allowing the evaluator to create patterns on errors? Maybe the error is not being saved when there is a pattern created.
How can the issue be reproduced?
Run the pattern described above on an input file that has one zero byte.
ImHex Version
1.38.0 wip
ImHex Build Type
Installation type
local build
Additional context?
No response
The text was updated successfully, but these errors were encountered: