![]() |
#76 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,741
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
![]() |
![]() |
![]() |
#77 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 819
Karma: 6528026
Join Date: Sep 2012
Device: Kobo Elipsa
|
Kevin, test build 377 is working beautifully for me. Thank you, thank you, thank you!
|
![]() |
![]() |
![]() |
#78 |
Connoisseur
![]() Posts: 74
Karma: 10
Join Date: Nov 2012
Device: none
|
Kevin:
I just installed test 377 on WIN10pro. Thanks for working so hard to resolve bugs. I’m sorry to say I found another small one in Find/Replace. Try: Mode Normal, All html files, Down Find: <body> Replace: <body>\n<h2 class="hdr" title="">\1 <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2> My Result: <body> <h2 class="hdr" title=""> <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2> ================================================== ==== Try: Mode Regex, All html files, Down Find: <body> Replace: <body>\n<h2 class="hdr" title="">\1 <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2> My Result: <body> <h2 class="hdr" title=""><body> <br/><span class="smaller">by \2<br/><span class="color">© 2022</span></span></h2> ================================================== ==== If you replace switch \1 and \2 with characters A and B you get the expected: <body> <h2 class="hdr" title="">A <br/><span class="smaller">by B<br/><span class="color">© 2022</span></span></h2> in both regex and normal mode. I think its the succession of switches that causing the problem or the way the \n switch is handled. Not a high priority fix, just something to know. Thanks, again |
![]() |
![]() |
![]() |
#79 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,590
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Can I ask what you're expecting the \1 and \2 back references to accomplish in your replacement expressions?
You can't use capture groups in normal mode. And in regex, where you can use capture groups, you've not defined any in your Find expression. Wonky stuff quite often happens when back references that don't have any corresponding capture groups are included in replacement expressions. Last edited by DiapDealer; 03-08-2022 at 09:27 PM. |
![]() |
![]() |
![]() |
#80 | ||
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,830
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
![]() Quote:
![]() |
||
![]() |
![]() |
![]() |
#81 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,796
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Regarding the regular expressions issue:
I think in normal mode, it should have treated the \1 as pure text and not a capture pattern as it has nicely done for \2 later on. In regex mode it should treat them as invalid chars since no captures were done. I will look into this but as DiapDealer said the lack of actual capture groups in the find regex does cause many issues. I think in this case we pad the caputure_group_offsets list and that creates an off by 1 situation, so it tries to replace \1 when it should have treated it as pure text. That said the \1 also fits the escape for an octal character in C strings so who knows! |
![]() |
![]() |
![]() |
#82 | |
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
Quote:
(My workflow with ctrl-] often is "quickly tap, tap, tap, tap, oops saw something that didn't look right flash by... ctrl-Z, ctrl-Z, look closer, fix" and back to "tap, tap, tap". And sometimes Sigil would crash during the "tap, tap, tap" but then work just once I started again. And as icallaci said, save early and save often (or use the new checkpoint feature!).) @KevinH - I'd not previously reported this because it was never easy to reproduce. It might have happened once, then not again for a few months. I figured that sort of bug report was pretty much useless without a reproducer. Is this sort of vague bug worth reporting in the future under those types of circumstances? |
|
![]() |
![]() |
![]() |
#83 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,796
Karma: 6000000
Join Date: Nov 2009
Device: many
|
I understand that it might be hard to reproduce, but without a bug report we would not be able to see that others were experiencing the same thing. That means whatever caused the crash is not specific to your setup. This is important.
It is very very unfortunate the Windows does not have the equivalent of the macOS built in CrashReporter that produces a report of quite useful backtraces and crash diagnostics. These can be copied after a crash and posted here (or sent automatically to Apple who would junk it since it is not their software). That way useful debug information is available for every crash. There probably is some way to do that or some program to do that on Windows, but I have never seen or heard of it from Windows users (so if it exists it is not installed on most systems). Either way, just the "me too" information could prove useful. Thanks. KevinH |
![]() |
![]() |
![]() |
#84 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,830
Karma: 8006102
Join Date: Mar 2015
Device: Kindle, iOS
|
Ah, gotcha. FWIW, I used to have similar crashes when doing rapid replace/find. This was a while back — several Sigil versions ago. Sent KevinH macOS crash reports and he did his magic. It's too bad Windows doesn't have a similar crash report function.
|
![]() |
![]() |
![]() |
#85 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,590
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Oh, there's ways to get crash dumps on Windows. Unfortunately, it's not all that easy to instruct the average Windows user how to enable/configure/find the dumpfile. Then if you do manage to send it to someone, it takes Windows-only tools to examine it. So basically, the whole Windows crash dump process is geared toward developers and not users. Unfortunately, users are the ones experiencing/reporting the crashes.
|
![]() |
![]() |
![]() |
#86 |
Wannabe Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 426
Karma: 2516674
Join Date: Apr 2011
Location: Geelong, Australia
Device: Kobo Libra 2, Kobo Aura 2, Sony PRS-T1, Sony PRS-350, Palm TX
|
@kevinh - Your talk about Windows debugging info prompted me to dig around. I found this app error crash info via the Windows event viewer after my hold-down-ctrl-g test. Other than saying it happened inside Qt I'm not sure what else to make of this info.
Spoiler:
I'll also report any sort of crash in the future just for visibility that it happens. |
![]() |
![]() |
![]() |
#87 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,590
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I've not yet been able to recreate a ctrl+g hold-down crash on Linux or Windows 10. So a piece of the puzzle is still missing. Whether it's search-settings-related or epub-size-related are things to keep an eye out for.
|
![]() |
![]() |
![]() |
#88 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,590
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
OK, I can reproduce the ctrl-g hold-down crash on Windows (but not Linux). But I cannot for the life of me get Windows to create a dumpfile for the crash.
The key for me was that the search needs to be able to find many occurrences for the crash to happen. Searching for the word "the" in a novel-sized epub did it for me. The crash is in QtGui. I know that's not all that helpful, but until I can convince Windows that this is a dumpfile-worthy crash, it's all I've got. |
![]() |
![]() |
![]() |
#89 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,590
Karma: 204624552
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Has to be a race. What about a slight delay between finds? There's no valid need for cycling through finds at one-million mile per hour. Anything faster than than the eye can recognize is wasted anyway.
|
![]() |
![]() |
![]() |
#90 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,796
Karma: 6000000
Join Date: Nov 2009
Device: many
|
I found and fixed an off by one in the replacement code, so in normal mode it pastes \1 when no capture groups are included in the regex.
Thanks, Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sigil-1.9.0 Release | DiapDealer | Sigil | 101 | 03-11-2022 07:20 PM |
Sigil-1.8.0 Release | DiapDealer | Sigil | 59 | 12-24-2021 10:38 PM |
Sigil-0.9.0 Release | KevinH | Sigil | 76 | 11-14-2015 06:45 PM |
New Sigil Release: Sigil-0.8.901 | KevinH | Sigil | 137 | 11-03-2015 09:42 AM |
Sigil 0.2.0 Release Candidates | Valloric | Sigil | 46 | 05-10-2010 09:55 PM |