When a project is loaded it is set to dirty without any changes so that
it goes through the steps that patterns with changes go through. The fix
uses a different starting step that doesn't set the dirty flags when
changing providers or loading projects.
<!--
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 -->
Hopefully this will help us debug the bugs that appear once ImHex
restarts a little easier.
### Screenshots
<!-- If your change is visual, take a screenshot showing it. Ideally,
make before/after sceenshots -->
<img width="372" height="182" alt="image"
src="https://github.com/user-attachments/assets/1f27443e-9eaa-465a-b545-c2bbf0b56ca4"
/>
``` rust
struct Rec : Rec {
};
```
Prevent infinite recursion in appendInheritances by erasing processed
inheritance entries during traversal, and safely iterate over
m_inheritances in appendInheritances to avoid
modification-during-iteration issues.
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
The assumption that the number of lines of colors will be equal to the
number of lines in the input signal is incorrect. As issue #2594 shows,
erroneous input can cause the lexer to end processing the input file
prematurely thus being unable to create tokens past the line where the
error occurred which in turn implies that no colors can be found beyond
those lines.
To fix the crash (the underlying problem is user caused and can't be
fixed) is to use the size of the vectors containing the first token
index of each line since that size must be equal to the number of lines
stored in token sequence.
Fixes#2594
By creating copies of the required inputs on the main thread just before
the task is spawned. A;so if task is still running when new data can be
copied then the task is interrupted thus avoiding concurrency without
mutexes. Atomics are used to signal state information used to determine
what and when to spawn.
Also includes update to pattern editor library and some fixes to syntax
highlighting error when custom types defined inside namespaces were used
inside the namespaces without the full qualified name and other small
changes mostly to improve the current style.