1
0
mirror of synced 2024-11-12 02:00:52 +01:00
Commit Graph

217 Commits

Author SHA1 Message Date
Lennard Fonteijn
ad69ac84b1
feat: Added hex::group attribute and various fixes (#1302)
As discussed (many times) on Discord, does the same as the new favorite
tag, but instead allows you to add multiple groups.

Initially, this would cause some insane issues with draw/reset
(apparantly) fighting eachother in the pattern drawer. After a lot of
trial and error, I decided to rewrite the flow that is responsible for
calling reset. Now evaluating patterns is the one to decide when the
reset happens, not the core "game"-loop.

To make sure that draw and reset can never happen at the same time, the
mutex originally used for the favorites has been repurposed. Due to the
restructuring, the mutex in the favorite-task is no longer needed, as
that will only ever kick-off after reset is called and if there are
actually patterns, which can never line up to be accessed on different
threads at the same time.

Last but not least, I noticed that hard crashes could result in your
config file getting overridden. I added a check to prevent that.

Last I issue I can see is that if you use an excessive amount of
favorites/groups, a crash can still happen, but it only happens when you
close the program (occasionally, but unpredictable). Before, this would
happen if you ran the evaluation a second time. I boiled the cause of
the crash down to these lines of code in evaluator.cpp >
patternDestroyed:

```cpp
if (pattern->isPatternLocal()) {
    if (auto it = this->m_patternLocalStorage.find(pattern->getHeapAddress()); it != this->m_patternLocalStorage.end()) {
        auto &[key, data] = *it;

        data.referenceCount--;
        if (data.referenceCount == 0)
            this->m_patternLocalStorage.erase(it);
    } else if (!this->m_evaluated) {
        err::E0001.throwError(fmt::format("Double free of variable named '{}'.", pattern->getVariableName()));
    }
}
```

Specifically, trying to access the `*it` is the reason for the crash
(this was also the cause of the crashes before my fixes, but then during
evaluation).

I'm suspecting the root cause is somewhere in the `.clone` methods of
the patterns. I'd say that for now a crash when closing the program is
more acceptable than during evaluation (which can even happen if you use
favorites).
2023-09-16 13:09:59 +02:00
WerWolv
367c4ec9c8 impr: More view comments and refactoring 2023-09-03 10:27:03 +02:00
iTrooz
fc1ad592cb
feat: Adapt content store view for new API contents (#1268) 2023-09-02 18:36:34 +02:00
WerWolv
4288f876e2 impr: Added lots of comments and cleaned up many views 2023-08-29 12:14:12 +02:00
WerWolv
83e42ddfd9 fix: Don't show accept pattern popup if no patterns are available 2023-08-19 19:12:48 +02:00
WerWolv
8a2afd1c05 fix: Crashes when having pattern auto evaluation enabled 2023-08-16 22:26:05 +02:00
Nik
e77f138514
feat: Added Achievements (#1230)
This PR adds Achievements to ImHex that serve as both a guide and a fun
way to learn more about ImHex and reverse engineering
2023-08-06 21:33:15 +02:00
WerWolv
4d4f223357 impr: Improve frame rate when lots of bytes are highlighted 2023-07-24 23:24:31 +02:00
WerWolv
b8d5e1e9c5 feat: Added built-in logging console 2023-07-23 23:37:47 +02:00
WerWolv
272b4b0cf8 feat: Added "Update All" button to content store 2023-07-11 09:19:52 +02:00
WerWolv
4f08ba3590 patterns: Fixed race condition when evaluating patterns 2023-06-30 00:11:26 +02:00
WerWolv
b644020e0f impr: Allow Accept Pattern popup to be closed with Escape 2023-06-24 15:32:05 +02:00
WerWolv
1e9cc97263 feat: Added scope selector dropdown to pattern debugger 2023-06-24 00:49:43 +02:00
WerWolv
90a576c3c7 fix: Highlighting and updating of the new console not working well 2023-06-14 10:35:23 +02:00
WerWolv
dd832bfa7e ui: Make pattern editor console use another text editor 2023-06-13 22:58:57 +02:00
WerWolv
ef1d831158 impr: Better UI/UX of the new debugger 2023-06-11 22:00:49 +02:00
WerWolv
03673b5846 feat: Added basic Pattern Language debugger 2023-06-11 21:41:11 +02:00
WerWolv
903d1fb555 impr: Analyze file content of newly loaded files only when they are selected 2023-06-08 17:02:16 +02:00
WerWolv
59aa52e744 patterns: Allow console log to be printed immediately and from format functions 2023-06-05 09:45:25 +02:00
WerWolv
7c23b215ba impr: Allow detached tools to always be rendered 2023-06-05 09:08:41 +02:00
WerWolv
c8c3f5e753 feat: Added primitive replace feature to find view 2023-05-28 11:50:10 +02:00
WerWolv
e7b51a56a5 feat: Added support for automatically loading patterns using binary pattern magic 2023-05-22 00:01:58 +02:00
WerWolv
df75218ecb fix: Ranges found by find view not being highlighted 2023-05-22 00:00:50 +02:00
WerWolv
d96fc6d41b fix: Compilation on macOS 2023-05-14 21:50:58 +02:00
WerWolv
aa1bf0b764 impr: Make about page resizable 2023-05-13 12:26:13 +02:00
WerWolv
50c3cf8272 build: Replace old interval tree in favour of custom libwolv one 2023-05-11 09:27:23 +02:00
WerWolv
5a6e5d2255 build: Switch to better interval tree implementation 2023-05-07 23:27:43 +02:00
WerWolv
04a5efc7a3 fix: Crash when evaluating patterns to quickly 2023-04-17 17:02:10 +02:00
WerWolv
99a736df27 impr: Replace horrible pattern extra data class with a more modular system 2023-04-17 16:18:48 +02:00
WerWolv
c32515bc44 impr: Clean up some more clang-tidy issues 2023-04-16 22:12:35 +02:00
WerWolv
1690cd2740 fix: Various issues with the new popup system 2023-04-16 21:34:29 +02:00
WerWolv
349b5da810 fix: Prevent constants view from growing past the size of the screen
Fixes #1025
2023-04-10 21:30:27 +02:00
WerWolv
87d0aae608 feat: Added selection range radio button to various views
Closes #1024
2023-04-10 14:08:21 +02:00
WerWolv
391c8acfe4 impr: Added path tooltips to accept pattern popup 2023-04-10 01:46:55 +02:00
WerWolv
f9a08f5c11 feat: Allow custom alignment to be used in binary sequence search 2023-04-09 15:28:31 +02:00
WerWolv
70f3014390 fix: Some more popup rendering issues 2023-04-08 23:34:46 +02:00
WerWolv
78e66f8959 feat: Added non-ranged and aligned search to sequence and value finder 2023-04-08 20:59:33 +02:00
WerWolv
80edaea392 impr: Update all of ImHex to the new popup system 2023-04-08 00:58:53 +02:00
WerWolv
51e615095e fix: Make sure placing a type through the Edit menu re-evaluates the pattern 2023-04-06 23:01:45 +02:00
WerWolv
24e584c77b fix: Crash when trying to place pattern language variable through the Edit menu
Fixes #1013
2023-04-05 18:29:30 +02:00
WerWolv
60efb6973b fix: Filtering of long strings in find view not working correctly 2023-04-01 11:04:07 +02:00
WerWolv
15be24db62 sys: Updated to use the new HttpRequest helper instead of Net 2023-03-23 11:23:07 +01:00
WerWolv
d82f0e952f fix: Custom data inspector rows not being writable correctly 2023-03-21 13:16:22 +01:00
WerWolv
17c4e405a6 impr: Update the command palette for the modern ages 2023-03-20 17:05:26 +01:00
WerWolv
466dacaab4 ui: Improve the look and feel of the information view 2023-03-17 17:07:39 +01:00
WerWolv
880568cc60 impr: Better find view result filter speeds 2023-03-17 11:32:08 +01:00
WerWolv
4ee53701e6 impr: Allow Regex find strategy specify string type and minimum length 2023-03-17 08:16:13 +01:00
Fenrisfulsur
069221757f
feat: Added chunk based entropy analysis to information view (#933)
Issue: https://github.com/WerWolv/ImHex/issues/522

Implementation of chunk based entropy analysis in diagram.hpp available
from the data information view and in the pattern language.

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-03-10 16:06:18 +01:00
WerWolv
277c83e6d8 fix: Uninitialized value build issue 2023-02-19 09:18:17 +01:00
WerWolv
64e34e42b8 patterns: Fixed highlighting of custom sections 2023-02-17 14:53:15 +01:00
WerWolv
5ccbfc1ff8 feat: Allow themes and nodes to be downloaded from the content store 2023-02-16 18:55:21 +01:00
WerWolv
ac83bbeb0e feat: Added a theme manager view to make it easier to make new themes 2023-02-16 18:06:40 +01:00
WerWolv
d9fa4b452c impr: Clean up diff view 2023-02-16 08:53:05 +01:00
WerWolv
3067ff08ec feat: Greatly improved diff view
Fixes #631
2023-02-15 17:01:36 +01:00
WerWolv
5cc01ae89d nodes: Added support for nested, shareable, custom data processor nodes 2023-02-09 23:07:04 +01:00
WerWolv
b1aa58d446 feat: Allow selected yara rules to be saved to Project file 2023-01-28 14:15:15 +01:00
WerWolv
800ffb5e56 feat: Make it easier to apply multiple yara rules at once 2023-01-27 12:17:10 +01:00
WerWolv
27790532f8 fix: Crash when closing provider that had pattern loaded in some cases 2023-01-24 23:27:15 +01:00
WerWolv
ef12798fe2 feat: Allow custom hashes to be saved to projects 2023-01-18 14:30:56 +01:00
WerWolv
5726e52df2 ui: Make content store resizable again 2023-01-05 13:23:08 +01:00
WerWolv
26898feb62 ui: Improve colors of digram and layered distribution plot 2022-12-29 15:06:23 +01:00
WerWolv
0311feee9b feat: Further improve information view 2022-12-28 23:06:49 +01:00
WerWolv
4807ca0057 feat: Added Digram and Layered Distribution plots to information view 2022-12-27 22:50:37 +01:00
WerWolv
4b6a75fb60 feat: Added type distribution graph to information view 2022-12-25 15:45:49 +01:00
WerWolv
0d7740773e sys: Improve speed and UX of entropy graph 2022-12-23 14:34:06 +01:00
WerWolv
4c5d2f6ebb feat: Finish up work on new pl section system 2022-11-08 21:43:22 +01:00
WerWolv
5bbc2fd94c feat: Added basic UI for the new pl section system 2022-11-07 00:04:47 +01:00
WerWolv
901b8f0424 sys: Refactored hex editor into its own reusable component 2022-11-06 12:19:12 +01:00
iTrooz_
32ab1c1a06
sys: Load content store content when it's first opened (#795)
* refresh store on open

* show the user if the request failed

* do not refresh if a refresh is in progress

This makes ImHex crash

* InProgress

* fix formatting

* use a localized message

* set localized message in other langs
2022-10-27 13:12:24 +02:00
WerWolv
ef6cac6e92 patterns: Make more pattern editor things per-provider 2022-10-26 08:54:43 +02:00
WerWolv
241b93aab5 patterns: Added menu to Edit menu for placing types at current selection 2022-10-21 10:03:37 +02:00
WerWolv
8b39c8f219 feat: Make all tool windows be detachable 2022-10-13 10:47:38 +02:00
WerWolv
015266181e fix: Various issue with the hex editor editing mode 2022-10-12 10:56:03 +02:00
WerWolv
299933c4f7 feat: Allow ASCII cells in Hex editor to be edited 2022-10-11 20:18:45 +02:00
WerWolv
daca49658e ui: Fix highlighting of separator column in hex editor
Fixes #776
2022-10-10 17:26:05 +02:00
WerWolv
3a9c3f939e sys: Properly center hex view around selection when jumping 2022-10-09 14:47:38 +02:00
WerWolv
11f63f9b02 ui: Added optional byte cell and char cell padding
Closes #771
2022-10-07 11:28:44 +02:00
WerWolv
e0c35e0002 fix: Data processor nodes not remembering their positions correctly 2022-10-06 09:14:46 +02:00
WerWolv
7bb9e7ee82 sys: Replaced awful task system with a much more efficient thread pool 2022-10-04 23:37:48 +02:00
WerWolv
d643f8f8f7 feat: Allow bookmarks to be reordered
Closes #750
2022-09-28 21:40:31 +02:00
WerWolv
c769e9cc32 ui: Highlight modified bytes in red 2022-09-28 15:01:43 +02:00
WerWolv
f8b4d04713 feat: Added numeric value search to find view 2022-09-19 10:34:57 +02:00
WerWolv
3cdc8c5884 fix: OpenGL textures not being cleaned up correctly 2022-09-18 20:38:45 +02:00
WerWolv
b2932773b9 feat: Added unique selection and scrolling position to each provider 2022-09-18 16:22:08 +02:00
WerWolv
9d7e2eccac feat: Added "Require full match" toggle to regex string search 2022-09-13 14:06:19 +02:00
WerWolv
cfde9939b4 sys: Refactor and cleanup pattern drawer 2022-09-07 23:11:13 +02:00
WerWolv
0a115a3c03 fix: Filtering search occurrences in Find view with multiple files being broken
Fixes #685
2022-09-03 23:15:30 +02:00
WerWolv
e779285be4 feat: Added basic ability to interrupt long running tasks 2022-08-17 16:15:36 +02:00
WerWolv
49d47a0eed feat: Added bookmark import/export function 2022-08-14 14:45:32 +02:00
WerWolv
966f3b8597
sys: Replace existing bad project system with a much better one (#663)
* sys: Initial effort to replace existing project files with a better system

* sys: Added back marking provider as dirty

* sys: Remove git commit information from project files

* sys: Format data processor save file nicely

* fix: Automatic pattern loading not working correctly

* ui: Added warning popup when closing a provider with modifications

Closes #604

* sys: Fixed build issues

* tests: Removed useless debug logs

* patterns: Updated pattern language

* sys: Added log message when crashing with a signal

* sys: Make sure abnormal termination handlers are being called more reliably
2022-08-08 21:23:52 +02:00
WerWolv
f62ca307b0 ui: Streamline region selection in different views
Fixes #660
2022-08-07 12:20:40 +02:00
WerWolv
88f8bb9848 sys: Updated to new pattern language library structure 2022-08-06 21:38:09 +02:00
WerWolv
d7accb6916 feat: Allow Find view to find overlapping occurrences
Closes #653
2022-08-06 12:57:47 +02:00
WerWolv
c468801c6e feat: Added support for ASCII + UTF16 string extraction
Closes #641
2022-08-03 11:38:36 +02:00
WerWolv
0ac8fcd1eb feat: Added binary pattern search to find view 2022-08-03 10:19:34 +02:00
WerWolv
1d9e8dbda7 fix: Always evaluate in/out variables correctly
Fixes #629
2022-08-02 23:36:18 +02:00
WerWolv
763f15fa36 sys: Added setting to synchronize pattern source code between providers 2022-07-31 20:07:15 +02:00
WerWolv
43988b8a7e ui: Modernize look and feel of data information view 2022-07-31 16:57:35 +02:00
WerWolv
419a2875b3 sys: Added filter option to find view 2022-07-29 18:49:43 +02:00
WerWolv
b7324913e9 sys: Replaced Search view with a generic Find view
Closes #551
2022-07-29 13:59:57 +02:00