-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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] Random crash when evaluating pattern #1934
Comments
I understand not being able to post sensitive or otherwise restricted materials. In that case, one would invent an artificial file that is both not restricted and that exhibits the bug when used as input for the pattern. I tried running the pattern on an input with all 0x44 zeroes and also used random values and nothing crashed. Does the file name have special characters in it? The pattern itself is fairly simple and I can't imagine anything in it being the cause but it is hard to tell without a reproducible case. When you say 50/50 chance it will crash do you mean while it is evaluating the pattern or does it finish and then it crashes when you look at some data or something else? Also it is not clear if ImHex crashes when running the pattern in one particular file or on any valid file of the type. Form the log file it looks like you dont try to evaluate the pattern as it is crashing shortly after loading the layout. Maybe there is data corruption in initialization files. Try renaming them so they are recreated. |
@paxcut The samething is happening to me, while talking about it with WerWolv on discord this was his/her exact words in response to this stack trace
Response:
To produce the same issue you can use the following Pattern: elden.txt NOTE: extract the zip file |
@Husamdababneh that may or may not be the same issue as the op reported. Your crash suggests that you are sorting the data as reported in issue #1938 , but the op doesn't mention sorting and doesn't provide a stack trace or ways to produce one. |
@paxcut hmm, Acutally there is a log attached to the issue here 20241016_032838.log with the same stack trace that I have as far as I can tell , I'm pretty sure that it's the same issue as #1938. The issue is when you evaluate the pattern a call to Also, a proof of the issue (race condition) would be that when I try to evaluate the file and it succeed, sometimes the Pattern data window have different ordering What I'm trying to say that the issue is most noticible when you evaluate the patterns which is the main use of ImHex, but the issue is actually from sorting the values |
I missed the fact that there was a log attached to the op, and from it it does indeed look like the same bug (I did say may or may nor though). So it looks like the race condition is related to both the evaluation and the sorting of the results. If you don't sort the results the crash doesn't seem to happen and just sorting results seems to work fine (although nothing seems to be changing which is kind of confusing) |
That's okay I didn't mean anything when I pointed out that the logs exists (it happens to the best of us) Yes, not sorting the results does not crash, but the issue with pattern evaluation that it does the sorting automatically |
What I meant is that if you don't sort the results you can evaluate the pattern as many times as you want without causing a crash, so even if evaluation sorts automatically that doesn't seem to create a problem unless you sort the data differently from the default sorting. Even if you sort away from default, the error only occurs when some data is accessed by two threads at the same time, or at least, that's my suspicion at the moment. |
Completely forgot to respond last time but yeah the sorting theory works out for me as well, after deleting all the configs the crashes are gone and last time they started I did indeed sort |
Operating System
Windows
What's the issue you encountered?
ImHex crashes when evaluating patterns seemingly at random
How can the issue be reproduced?
Load the firmware dump, load the pattern and hit evaluate, 50/50 chance it will crash
ImHex Version
1.35.4
ImHex Build Type
Installation type
Portable
Additional context?
Log: 20241016_032838.log
Pattern: persistent_data_pattern.txt
Cant attach a dump of the firmware for legal reasons
The text was updated successfully, but these errors were encountered: