1
0
mirror of synced 2024-11-15 11:33:23 +01:00
Commit Graph

138 Commits

Author SHA1 Message Date
WerWolv
f79e2df11a feat: Added shortcut to switch between providers 2023-09-24 18:11:17 +02:00
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
ba66005585 impr: Various code cleanup 2023-08-26 12:54:52 +02:00
iTrooz
32d6ac2241
feat: move PerProvider data to new provider when saving memory provider into file provider (#1264) 2023-08-26 01:47:44 +02:00
WerWolv
fc93f8bd66 fix: CI being broken on Arch Linux 2023-08-16 23:07:16 +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
27c8e19c14 build: Remove all static variables from headers to hopefully fix plugins 2023-07-26 13:50:51 +02:00
WerWolv
e5a793e8de fix: Subcommands not working at all on Linux 2023-07-21 14:12:08 +02:00
iTrooz
1ed658bcdc
feat: Added command line interface support (#1172)
System design has been discussed on discord

Should fix #948

---------

Co-authored-by: WerWolv <werwolv98@gmail.com>
2023-07-13 14:08:23 +02:00
WerWolv
ce9ce42c1c impr: Only reload localization when necessary 2023-07-09 20:24:56 +02:00
WerWolv
86c4c8fa96 feat: Added new pattern inline visualizers 2023-07-04 22:18:06 +02:00
WerWolv
b265d8e54a build: Restructure romfs assets 2023-07-04 08:42:33 +02:00
iTrooz
c6c3ca4d26
fix: Reset terminate handler directly when being called + some other crashes to crash handling (#1174)
This PR fixes some things about crash handling:
- when the terminate handler is called, immediately set it back to the
original one, so can't make a recursion if the crash-handling code fails
- Only save projects if the crash occured after Imhex finished startup
- do not update the project location when saving the crash backup file:
this will remove problems when `EventAbnormalTermination` is called
before `crashCallback()`

I also added a bit more documentation
2023-07-01 12:32:28 +02:00
WerWolv
f9909dab98 fix: Properly clear all global registries 2023-06-30 13:40:16 +02:00
WerWolv
d527675bda build: Make sure changing commit hash doesn't trigger a full rebuild
Closes #1137
2023-06-26 14:01:45 +02:00
WerWolv
cb3b71e2f3 fix: Typo in content registry comment 2023-06-21 23:59:40 +02:00
iTrooz
b7d8e46288
feat: Display detailed error message when loading of project fails (#1135)
In order to do this I add to make some other additions :
- Add a warning popup (TODO, maybe add some icons to differentiate
error/warning popups in a future PR ?)
- create showError() and showWarning() functions, as helpers to show a
message both to the logs and as a popup
2023-06-21 20:07:36 +02:00
WerWolv
da11c47693 impr: Better sorting of hex cell visualizers 2023-06-21 17:48:51 +02:00
Nik
f703b15165
feat: Added statistics and crash log uploading (#1149)
Co-authored-by: Justus Garbe <gihihoh@gmail.com>
2023-06-20 11:55:56 +02:00
WerWolv
03673b5846 feat: Added basic Pattern Language debugger 2023-06-11 21:41:11 +02:00
WerWolv
34732a1ee7 fix: Corrected some memory leaks 2023-06-11 10:47:17 +02:00
WerWolv
cde5940063 fix: Popups sometimes not appearing centered on the main window 2023-06-10 15:15:52 +02:00
WerWolv
73d4214fd3 fix: Window title being cleared after ImHex exits 2023-06-10 15:08:56 +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
ae48ae659b impr: Move various settings from settings window to hex editor and pattern data view 2023-06-05 09:07:58 +02:00
iTrooz
117832e007
impr: Handle crashes that may happen before the main loop (#1115)
Draft because I absolutely do not trust myself writing good code at 2AM.
I will review it tomorrow
2023-06-01 18:35:41 +02:00
iTrooz
e578127f67
feat: Save opened projects as recent entries (#1105)
This PR does two things :
- save opened projects as recent entries
- refactor stuff about recent entries in a separate file. The reason is
that I felt like welcome_screen.cpp was really big ( 685 lines before
this, 500 now). What do you think ?

---------

Co-authored-by: Nik <werwolv98@gmail.com>
2023-05-27 16:59:30 +02:00
WerWolv
f81276f7e3 feat: Added support for transparent and blurry window styles 2023-05-22 12:00:35 +02:00
WerWolv
c006062540 feat: Added basic network interface support 2023-05-15 11:30:24 +02:00
WerWolv
d96fc6d41b fix: Compilation on macOS 2023-05-14 21:50:58 +02:00
WerWolv
aaeebd3fe9 fix: Various pattern execution race conditions 2023-05-12 15:46:13 +02:00
WerWolv
18bc5de169 fix: Copy-as options not being disabled correctly 2023-05-12 08:38:07 +02:00
WerWolv
0649e0dcd3 impr: Clean up old layout stuff 2023-05-11 23:21:52 +02:00
WerWolv
ceeaca1a4b feat: Added layout manager to save and restore custom layouts 2023-05-11 18:44:50 +02:00
WerWolv
2d1381860d fix: Corrected build issues with GCC 13 2023-05-06 10:07:22 +02:00
iTrooz
e44eb2aa8e
impr: Added more documentation to libimhex (#1052)
This PR adds some documentation. It's actually pretty random, I followed
the function calls I was curious about and commented whenever I wasn't
sure/I thought it needed clarification

You might want to make sure to squash them, because the commits are kind
of a mess, I didn't went through the effort of interactive rebase
2023-05-05 22:02:18 +02:00
WerWolv
bec655a8c6 impr: Added event logging in debug mode 2023-05-02 20:35:30 +02:00
WerWolv
6c122e5fbe patterns: Updated to new API 2023-04-18 10:06:47 +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
21f38974a8 impr: Use smart pointers to allocate Views 2023-04-08 12:08:45 +02:00
WerWolv
80edaea392 impr: Update all of ImHex to the new popup system 2023-04-08 00:58:53 +02:00
WerWolv
c73f33aac2 impr: Added various new events 2023-04-06 17:36:28 +02:00
H1X4
aab8c88a96
feat: allow loading and saving pattern code via events (#1004)
Currently there is no way to save the pattern code progamically from a
plugin unless the builtin plugin is modified to add those events. This
pull request will be adding ability to load and save pattern code from
specified file.
2023-04-01 11:18:52 +02:00
WerWolv
635173e55a impr: Make sure themes are added correctly when downloaded from the store 2023-03-23 20:35:16 +01:00
WerWolv
57a62d0544 impr: Clean up entire API and added doc comments 2023-03-21 15:33:43 +01:00
WerWolv
a4dfaba03f fix: All menu item shortcuts being global 2023-03-20 15:12:12 +01:00
WerWolv
6e23560e80 feat: Added all menu items to command palette 2023-03-20 14:11:43 +01:00
WerWolv
39e8d557e8 sys: Completely revamped main menu item system 2023-03-20 13:11:43 +01:00
WerWolv
367bd76046 ui: Mae sure all theme scaling values are scaled correctly 2023-03-18 10:52:50 +01:00
WerWolv
466dacaab4 ui: Improve the look and feel of the information view 2023-03-17 17:07:39 +01:00