@KarlG,
Well the problem is NOT in Sigil itself but in Qt. It seems that Qt has enabled the use of its JIT compiler in its version of PCRE2 that is used internally in QRegularExpression.
Unfortunately, by turning on the JIT for PCRE2 that makes any use of QRegularExpression in a multiple threaded environment (such as using QtConcurrent) can potentially cause a serious crash.
Really, in a multithreaded environment Qt should not be making code that is non-reentrant.
The only solution is either to patch Qt to not do that (but that leaves out our Linux users who do not build their own Qt), or force the use of the following environment variable which tells Qt to not use its internal Qt PCRE2 in JIT mode in its Regular Expression code:
QT_ENABLE_REGEXP_JIT=0
So try setting this environment variable before firing up Sigil and Restructure to Sigil Norm will no longer crash at all - but will take a really really long time to run in your test case so be very patient.
FWIW, the resulting renames for duplicates will work but will not make numeric sense. You would be much better off renaming those images making their parent folder become part of their name.
I will create a bug report on Qt about this but I would not hold my breath for a bug fix.
KevinH
Last edited by KevinH; 07-19-2024 at 12:10 PM.
|