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

152 Commits

Author SHA1 Message Date
WerWolv
498d8c1d65 impr: General code cleanup 2023-11-10 20:47:08 +01:00
WerWolv
3aacf0f1fb feat: Added Experiments 2023-11-10 14:48:26 +01:00
WerWolv
ef320b74b0 impr: Handle showing popups when closing unsaved providers better 2023-11-07 15:31:54 +01:00
WerWolv
4e4cdcdf61 feat: Added release notes and commits to about page 2023-11-05 19:57:29 +01:00
WerWolv
45fb046a9a impr: Make events thread safe 2023-11-04 23:16:38 +01:00
WerWolv
407ec1ceb6 build: Use custom jthread implementation if standard one is not available 2023-11-02 20:21:38 +01:00
WerWolv
9617212ef1 impr: Allow visualizers to have optional parameters 2023-10-31 10:56:20 +01:00
Nik
58189e5403
impr: Allow console output to work when debugging (#1382) 2023-10-22 21:39:14 +00:00
WerWolv
c3825fff65 fix: Actually fix dropdown default values 2023-10-22 17:51:00 +02:00
WerWolv
c51db87c34 fix: Language setting not defaulting to English anymore 2023-10-22 17:31:53 +02:00
Nik
7fe9a768d4
impr: Rewrote entire settings API and UI (#1378) 2023-10-21 21:07:33 +00:00
Nik
f114239f51
feat: Added Auto Updater for Windows, macOS and Ubuntu (#1377) 2023-10-21 18:40:24 +00:00
lomekragow
7fc2ff3002
fix: Event unsubscribe not working correcetly when using same key for multiple events (#1309)
<!--
Please provide as much information as possible about what your PR aims
to do.
PRs with no description will most likely be closed until more
information is provided.
If you're planing on changing fundamental behaviour or add big new
features, please open a GitHub Issue first before starting to work on
it.
If it's not something big and you still want to contact us about it,
feel free to do so !
-->

### Problem description
<!-- Describe the bug that you fixed/feature request that you
implemented, or link to an existing issue describing it -->

Fixed possible bug of  `EventManager::unsubscribe`

`std::map` only allows unique key, but the same token can subscribe to
multiple events.

1a2a926b77/lib/libimhex/include/hex/api/event.hpp (L104-L107)

If the previous token has already subscribed to an event, then when
subscribing again, `getTokenStore().insert` will not do anything
(Because its type is `std::map`)


1a2a926b77/lib/libimhex/include/hex/api/event.hpp (L122-L134)

At this point in `unsubscribe`, the `iter` may not be able to find the
correct event and erase it



### Implementation description
<!-- Explain what you did to correct the problem -->

Change `tokenStore` to `std::multimap` instead of `std::map`, which
cannot unsubscribe multiple events correctly

### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->

### Additional things
<!-- Anything else you would like to say -->
2023-10-07 23:35:35 +02:00
iTrooz
d15bd4771d
feat: Support for building ImHex for the web (#1328)
Co-authored-by: WerWolv <werwolv98@gmail.com>
Co-authored-by: AnnsAnn <git@annsann.eu>
2023-10-04 12:00:32 +02:00
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