07-30-2019, 07:22 PM | #31 |
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Right. I will do that.
|
07-31-2019, 12:26 AM | #32 |
just an egg
Posts: 1,585
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
|
This bug just occurred for me with 0.9.16 on macOS High Sierra. (I actually experienced this once before, but it was before any discussion had occurred and I thought it was just a fluke, so I restarted Sigil and didn't give it another thought.)
Unfortunately, I have not been able to reproduce it, but when it occurred, I was using Saved Searches to do an epub-wide search/replace. As I am trying to learn regex, I was hitting Find then Replace, checking after each button-click to see that it did what I wanted. I did this probably 50+ times in quick succession, with new tabs opening up as the search progressed so that I had perhaps 25+ tabs open. At some point I switched to the single Replace/Find button, clicking through rapidly one at a time. And then finally I started using Replace All. I was doing this with a few different regex searches when I suddenly noticed that the Preview pane was not syncing with Code View. Instead, the Preview window stayed fixed at the top of the page, no matter where I was in Code View. However, clicking in Preview would cause Code View to sync to wherever Preview was. This happened with all open Code View tabs. I tried closing all but one tab then reopening them, but this did not get the sync going again. When I closed the epub then reopened it, all was well again. After this happened, I tried to reproduce the problem, but did not succeed. I'm pretty sure the first time this happened (when I dismissed it as a fluke) I was also doing a Saved Search similar to this where I had a lot of tabs open and was clicking Find, Replace, and Replace/Find rapidly (as I said, I'm learning regex, so I wanted to make sure my regex was correct before committing to Replace All). Now that I'm aware of this issue, I'll try to pay more attention so that if it happens again I can be more helpful ETA: I launch Sigil by double-clicking on the epub. Last edited by odamizu; 07-31-2019 at 12:33 AM. |
07-31-2019, 10:05 AM | #33 | |
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Quote:
Hopefully I'll have a log of the bug soon. |
|
07-31-2019, 10:09 AM | #34 |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
We may not need a log. Minimize Sigil and then restore it. See if the Code View to Preview sync is not broken after that. I've had no confirmation that this breaks sync on macOS, but thanks to Springbok. I can confirm that it does break the CV->PV sync on Windows (doesn't seem to affect Linux)
Last edited by DiapDealer; 07-31-2019 at 10:12 AM. |
07-31-2019, 10:14 AM | #35 |
Guru
Posts: 653
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
|
Hmm, since I complied Sigil to use Qt5.12.3 it's been working perfectly.
I have been editing an epub on and off for several days. Today, it suddenly stopped synching correctly. Clicking in code window doesn't change anything in the preview window. Clicking in the preview windows takes code window to the beginning of the current file. Before I quit and restart Sigil, is there anything you want me to do? Edit. Whops, there was an error due to having splitting a file. A mend fixed that and the sync works again. I leave this here just in case it may give you a hint for other sync errors. |
07-31-2019, 11:11 AM | #36 | |
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Quote:
Minimizing Sigil did not fix it, quitting and re-opening the file did. Here is the log file. I've started a fresh one in case it happens again. Let me know if there's something else I should try. |
|
07-31-2019, 11:30 AM | #37 | |
Grand Sorcerer
Posts: 27,546
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
|
|
07-31-2019, 12:03 PM | #38 | |
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Quote:
However if that is an element it might have something to do with focus switching? I frequently switch from Sigil to block-notes for writing regexes, and on the last project occasionnally to Acrobat Reader for checking details. I am not sure whether the bug happened immediately after any of these switches but I'll pay attention. |
|
07-31-2019, 12:38 PM | #39 | |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Your log file showed the PV UpdatePage was rentered while waiting to load. Since that routine is not reentrant it caused PV to stop running javascripts.
So any really fast updating of tabs will cause the associated Preview to get caught trying a new load when the previous load had not finished yet. This is the same issue that happens with minimize/restore but needs a different fix. We will look into some type of preemption in loading Preview if that is even possible. Your best bet to prevent cv->pv loss of sync is not to flash through pages in the tab manager, as loading a Codeview happens much much faster than loading a Preview and resolving all resources and then drawing the page to the screen. KevinH Quote:
|
|
07-31-2019, 01:16 PM | #40 |
Enthusiast
Posts: 39
Karma: 59154
Join Date: May 2010
Location: Stuttgart, Germany
Device: Kobo H2O, PocketBook Touch HD, Tolino Vision 4
|
Yes - I have that problem too (on windows 7 and windows 10) and definitely using search and replace very fast (hitting "replace and search next" before the sync in the PV window is complete) did trigger the bug.
|
07-31-2019, 01:41 PM | #41 |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Okay, I pushed a potential fix to master to prevent reentrance to PV update page, that will delay a conflicting request to load a new page in the middle of a loading the previous page and then schedule a retry.
This should hopefully "fix" the speed demon approaches to loading Preview without causing cv->pv sync to break. Those who are using test builds with debug enabled, please try a new build and report back. This change also fixes the minimize/restore on my machine. |
07-31-2019, 01:45 PM | #42 | ||
just an egg
Posts: 1,585
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
Quote:
Though I'm pretty sure I didn't minimize the window when it happened yesterday. I suspect it was the "really fast updating of tabs" that did me in yesterday. I will slow down Thanks! You guys are amazing! ETA: Oops! KevinH posted a fix while I was typing this. You guys are super-amazing! Last edited by odamizu; 07-31-2019 at 01:48 PM. |
||
07-31-2019, 08:56 PM | #43 | |||
Groupie
Posts: 159
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
|
Quote:
Quote:
Quote:
|
|||
08-01-2019, 04:32 AM | #44 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jan 2018
Device: Kindle Touch
|
I have tested the new build with the fix for few hours today and so far everything seems to be fine. The sync bug did not occur not even once. I will give it more time but so far fix looks promising.
Similarly to odamizu I also have strange feeling that the minimising and restoring Sigil window was not the only trigger in the past. I do not minimise Sigil window that often but frequently have 2 Sigil parallel sessions running and I switch from one instance to another. Perhaps the fix has solved the problem in those other unidentified circumstances too. The future will show. |
08-01-2019, 11:12 AM | #45 | |
Sigil Developer
Posts: 7,636
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Glad to hear it! We will turn back off the special debug code and include these fixes for the upcoming release.
Thanks to all testers who helped track this one down. We truly appreciate all the help! KevinH Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Preview to CV sync broken? | theducks | Sigil | 5 | 02-13-2019 05:20 PM |
Clicking in preview window not working | mrmikel | Editor | 3 | 01-17-2014 09:29 AM |
Preview Window Zoom | GrannyGrump | Sigil | 16 | 06-16-2013 10:23 PM |
Syncing bug in preview window | sellew | Sigil | 13 | 02-26-2013 01:10 PM |
Preview window - two small points | exaltedwombat | Sigil | 12 | 02-21-2013 05:48 PM |