![]() |
#31 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
It also doesn't seem to matter what widgets the toc is sharing space with (if any). Or which dockarea it's in. One thing I didn't try was docked vs floating. |
|
![]() |
![]() |
![]() |
#32 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Wow! I have been staring at both the TOC and FindReplace code and I can not see how or why any interaction is being created. Find and Replace is a QWidget and part of the MainWindow from the start and the TOC is a QDockWidget that is created later. I could see no signals crossing over either.
So why just having the TOC open could in any way impact the FindReplace code has me stumped. It may be memory corruption of some sort but that typically is random and moves around. I do not even know how to begin to track this one down! |
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Perhaps, just raising the bar for the minimum Qt version makes the most sense here?
|
![]() |
![]() |
![]() |
#34 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Probably. Still ... even though things seem to point toward 5.9.5 being the culprit, I can't help but think the consistent way this manifests (weird as it is) suggests that there might be a way to work around it.
|
![]() |
![]() |
![]() |
#35 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Could be. If we could track down the actual code in Qt that causes the problem we may be able workaround it. There were LTS releases after 5.9.5 right? Perhaps testing each Qt version going up would tell us when the fix went into Qt and that may help us.
|
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Member
![]() Posts: 21
Karma: 88
Join Date: Mar 2008
Location: Paraguay
Device: Samsung Galaxy Tab S2
|
Not yet; Ubuntu 20.04, scheduled for this April, will be the next LTS release.
|
![]() |
![]() |
![]() |
#37 | |
cosiñeiro
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,406
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
|
Quote:
Most -legacy- Debian based distros are stuck with qt 5.9.5. Probably things will change with ubuntu 20.04. Did you guys consider releasing an appImage? This way it should work even on old distros and qt can be patched as in other platforms, to get rid of upstream bugs like https://bugreports.qt.io/browse/QTBUG-79778. |
|
![]() |
![]() |
![]() |
#38 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
And yes, there are installers available for Qt5.9.6 - 5.9.9. Then you have to go to 5.12 for the next LTS (even though Qt clearly has no real respect for what LTS is actually supposed to mean). If I can make it work correctly with one of those later 5.9.x versions, we may have a shot at seeing what changed in Qt's codebase. That might give us a clue as to how to work around it. But I'm going to take a few easy stabs in the dark before I go that route. ![]() In the meantime, you do know that you can install Qt5.12.x to build Sigil against without messing up, or affecting your system's 5.9.5 version, right? That's what @pazos is doing. Get it while you can, though. Eventually binary versions of LTS Qts will only be available to paying customers. Last edited by DiapDealer; 02-08-2020 at 08:25 AM. |
|
![]() |
![]() |
![]() |
#39 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
We patch that bug in the Qt deployed with our Windows and Mac Sigil installers, by the way. Last edited by DiapDealer; 02-08-2020 at 08:51 AM. |
|
![]() |
![]() |
![]() |
#40 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() @poxi1023, if you would try one simple change to src/MainUI/MainWindow.cpp for me, I'd appreciate it. Change line MainWindow.cpp 247 from: Code:
#ifdef Q_OS_MAC Code:
#ifndef Q_OS_WIN32 I still get the QtWebEngineWidgets segfault everytime, mind you, but F&R preferences are correctly saved. |
|
![]() |
![]() |
![]() |
#41 | |
Member
![]() Posts: 21
Karma: 88
Join Date: Mar 2008
Location: Paraguay
Device: Samsung Galaxy Tab S2
|
Quote:
Your change fixed my problem! ![]() ![]() |
|
![]() |
![]() |
![]() |
#42 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Great! Thanks for reporting back. I'll see how best to incorporate the fix in master. Not sure if that's safe/wise to do for all Linux builds, or if I should limit it to when older Qt versions are being used.
|
![]() |
![]() |
![]() |
#43 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
Great Job!
That code is there for macOS since we use multiple MainWindows at the same time. So exiting a MainWindow is not the same as exiting the entire application as it is for Linux and Windows. This helps to speed that process and keep the overall memory footprint smaller on macOS. If that helps, then Qt 5.9.5 is very very broken as invoking all destructors on the way out has been part of C++ spec from the very very beginning. You just can not skip destructors if the app is exiting. Perhaps the order of destructing key objects matters for some reason? And I still do not know why or how that using WriteSettings in the call to close() did not fix this unless it is the QSettings writing itself that gets broken somehow and writing to it gets lost. And how did the call to close and its debug statement not show up? Very strange! Using this code should not hurt things for Windows or Linux unless order of running the destructors matters. It does force the TOC destructor to be called before the FindReplace destructor, so maybe that is why it helps. It also forces the Preview Window to be destructed last because of early segfaults in QWebEngine that I remembered from Qt5.11. Last edited by KevinH; 02-08-2020 at 10:27 AM. |
![]() |
![]() |
![]() |
#44 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,574
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Part of the reason trying this occurred to me is that of the three dockwidgets that mainwindow loads/shows by default (Preview, BookBrowser and ToC), ToC was the only one that didn't have an explicit destructor function. I realize there doesn't necessarily need to be one (the Clips and Validator dockwidgets come to mind), but I was thinking maybe there was something that wasn't getting properly cleaned up (because of a potential defect in that version of Qt) that perhaps explicitly deleting would take care of.
I might take some time to reorder those explicit deletes for mac and see if there is indeed an order that can produce adverse effects in Linux with Qt 5.9.5. At this point, I think I'm writing off the segfault as something that's not getting cleaned up in 5.9.5 that doesn't really matter since Sigil is being destroyed anyway. Last edited by DiapDealer; 02-08-2020 at 11:14 AM. |
![]() |
![]() |
![]() |
#45 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,765
Karma: 6000000
Join Date: Nov 2009
Device: many
|
If you simply swap those two lines to destruct FindReplace right before TOC and the TOC was open, I would love to know if the problem comes back. If so, then something about the TOC still existing seems to trigger things.
Nicely done! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Behaviour of history and spaces in find/replace text boxes | arspr | Editor | 0 | 01-01-2014 05:04 PM |
Find Replace | unrulyguides | Sigil | 5 | 02-17-2012 08:38 PM |
Find/Replace Won't Find | Rand Brittain | Sigil | 7 | 09-24-2011 04:35 AM |
Find / replace | bremler | Sigil | 6 | 12-17-2010 03:26 PM |
Using Find/Replace with BD | Otter | Sony Reader | 7 | 02-28-2009 01:49 PM |