WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
43.98k stars 1.92k forks source link

[Bug] #pragma pattern_limit is bugged #1618

Closed FireNX70 closed 3 months ago

FireNX70 commented 6 months ago

Operating System

Linux

What's the issue you encountered?

pragma pattern_limit only appears to work on the first file opened. On other files, it is simply ignored. If the first file is closed, it still doesn't work for the other files. Closing all files but one will not make it work for the only file either.

How can the issue be reproduced?

Open at least two files and try to change the pattern limit (through #pragma pattern_limit) on any file besides the one that was opened first.

ImHex Version

1.33.2

ImHex Build Type

Installation type

Both AppImage and .deb package (Ubuntu 23.04, but it works fine on Debian 12)

Additional context?

Both this and #1617 are already broken on 1.33.1, so these aren't recent bugs.

ZwipZwapZapony commented 5 months ago

This also affects #pragma array_limit, #pragma debug, #pragma eval_depth, and likely any other pragma. This doesn't affect #define, so it doesn't just apply to the pre-processor in general. "Extras" > "Settings" > "General" > "Patterns" > "Sync pattern source code between providers" doesn't affect this.

paxcut commented 5 months ago

I tested this bug on 1.33.0 (master branch) which is what the nightly gives for windows and I couldn't reproduce this, so it could be a release branch only bug or less likely a linux only problem.

mandar1jn commented 5 months ago

this is not a linux-specific issue as I have been running into the same thing on windows

paxcut commented 5 months ago

It looks like it is a known problem on the release branch (1.33.1 and 1.33.2) the bug was fixed on master branch (1.33.0) but hasn't been applied to release branch according to posts on discord.

FireNX70 commented 5 months ago

I can confirm that #pragma pattern_limit is fixed in recent nightlies. I haven't tested the other pragmas mentioned by @ZwipZwapZapony (I'm assuming it's the same bug affecting these) and the fix hasn't made it into a release yet, so I'll leave the bug report open for now.

FireNX70 commented 3 months ago

Closing this since it's fixed in the most recent release.