Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 07:10 PM   #46
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,047
Karma: 5449552
Join Date: Nov 2009
Device: many
Thank you!

Yes, according to your debug log, what I added will not help!

The std::runtime_error when Sigil tries to read the missing NCX is being caught in the right place and the Error Dialog is shown. So once you hit the ok button on the Error Dialog, it should have returned and run 34, but instead Sigil is closing or crashing ... but I can not see why ....

Especially as this only happens when Sigil is not already running which makes this even stranger.

I noticed from your debug output you are running Sigil as Maximized. That changes the startup sequence somewhat. Could you try one more time with Sigil's MainWindow NOT Maximized to see if that impacts anything?

Last edited by KevinH; Today at 08:47 PM.
KevinH is online now   Reply With Quote
Old Today, 07:34 PM   #47
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,843
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I couldn't induce a crash/closing with Dummy2.epub on a physical Windows 10 machine either.
DiapDealer is offline   Reply With Quote
Old Today, 07:54 PM   #48
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 414
Karma: 2289864
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
FYI, I just did a new build from Master on my Linux box. Testing with the dummy2 file, I get the message and can view details no matter how it is opened, but I can't get it to crash.
retiredbiker is offline   Reply With Quote
Old Today, 08:12 PM   #49
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,047
Karma: 5449552
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by retiredbiker View Post
FYI, I just did a new build from Master on my Linux box. Testing with the dummy2 file, I get the message and can view details no matter how it is opened, but I can't get it to crash.
Thank you for trying it on Linux and reporting back. So far this issue only seems to happen on some Windows boxes, not MacOS or Linux.

But it is good to know I have not broken anything! (Yet!)
KevinH is online now   Reply With Quote
Old Today, 08:14 PM   #50
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,047
Karma: 5449552
Join Date: Nov 2009
Device: many
If we can not track this down I can prevent the improperly handled exception right in ImportEPUB.cpp but that kind of sidesteps the real problem.

Last edited by KevinH; Today at 08:39 PM.
KevinH is online now   Reply With Quote
Old Today, 08:39 PM   #51
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,047
Karma: 5449552
Join Date: Nov 2009
Device: many
Quote:
Originally Posted by DiapDealer View Post
I couldn't induce a crash/closing with Dummy2.epub on a physical Windows 10 machine either.
Wow! That makes this even more strange.

BeckyEbook ran her tests with Sigil's MainWindow Maximized according to her debug output. Could you try the same thing to see if that matters at all?

I am admittedly grasping at straws here.

Last edited by KevinH; Today at 08:49 PM.
KevinH is online now   Reply With Quote
Old Today, 09:01 PM   #52
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,843
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by KevinH View Post
BeckyEbook ran her tests with Sigil's MainWindow Maximized according to her debug output. Could you try the same thing to see if that matters at all?
I already tried that. It made no difference on either machine.

Quote:
Originally Posted by KevinH View Post
I am admittedly grasping at straws here.
Nothing wrong with a bit of straw-grasping.
DiapDealer is offline   Reply With Quote
Old Today, 09:04 PM   #53
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,047
Karma: 5449552
Join Date: Nov 2009
Device: many
By any chance is Qt or Sigil compiled on Windows using the compiler equivalent to:

-fno-exceptions

If not, that really only leaves the possibility of a crash happening when the Error Dialog is waiting for the OK button to be pushed.

As BeckyEbook's debug output shows, the missing NCX runtime error is caught in the LoadFile routine in the right place but somehow it crashes after it shows the Error Dialog, ok button.

That is when Qt allows other QEvents to be processed which can be seen in the debug ouput as the MainWindow activation happening but in the first startup case of Sigil, it needs the m_Book properly set before it opens the MainWindow.

Perhaps we catch the runtime error, and immediately use CreateNewBook() *before* we display the Warning message as that might prevent the crash on initial startup It is worth a shot.

Last edited by KevinH; Today at 09:24 PM.
KevinH is online now   Reply With Quote
Old Today, 09:29 PM   #54
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,843
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I don't add anything like that when building Qt or Sigil. Not to say something like that is not introduced somewhere--just that I'm not knowingly doing it.

One other thing I never thought of is that those building their own Sigil are very likely using my Qt6.7.2 built for GitHub CI. It's not built with link time optimizations (so as to be compatible with any version of VS2022 installed on Github's runner images [or any versions users may have installed]). Whereas I'm using a version built with link time optimizations for releases and for my own Sigil development. I've not made that Qt build available publicly.

When Qt is built with link time code generation enabled, then Sigil MUST be built with the exact same VS toolchain version. Perhaps that's the difference.

I guess I can check pretty easily by building Sigil with my CI version of Qt6.7.2

Last edited by DiapDealer; Today at 09:35 PM.
DiapDealer is offline   Reply With Quote
Old Today, 10:19 PM   #55
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,047
Karma: 5449552
Join Date: Nov 2009
Device: many
Yes linking may impact handling cross module exceptions. So it is plausible I think.

Either way ...

I have now pushed a reordering to the LoadFile routine to MainWindow in Sigil master to test the hypothesis of QEvents being processed out of order on initial startup when the error dialog is shown.

If BeckyEbook tests this change and it does not help, I am going to revert all of these changes then go and prevent the damn exception from being thrown at all in ImportEPUB.cpp to prevent the whole strange sequence of events.

I have already written the code to do that and can push it tomorrow once BeckyEbook reports on her testing of this reordered version.

If it does turn out to be a linking issue, then preventing the exception from being thrown in the first place makes sense as well.



Quote:
Originally Posted by DiapDealer View Post
I don't add anything like that when building Qt or Sigil. Not to say something like that is not introduced somewhere--just that I'm not knowingly doing it.

One other thing I never thought of is that those building their own Sigil are very likely using my Qt6.7.2 built for GitHub CI. It's not built with link time optimizations (so as to be compatible with any version of VS2022 installed on Github's runner images [or any versions users may have installed]). Whereas I'm using a version built with link time optimizations for releases and for my own Sigil development. I've not made that Qt build available publicly.

When Qt is built with link time code generation enabled, then Sigil MUST be built with the exact same VS toolchain version. Perhaps that's the difference.

I guess I can check pretty easily by building Sigil with my CI version of Qt6.7.2
KevinH is online now   Reply With Quote
Old Today, 10:28 PM   #56
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,843
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I'm just not sure any more. The bottom line is that I got it to crash by building a version with the other Qt on my virtual Windows machine. But only if Sigil is maximized. It didn't matter whether it was maximized or not when testing before. What's more... Sigil crashes (only when maximized) regardless of which version of Qt was used in the Sigil build now. So I'm baffled.

What's more: Sigil won't crash on the physical Windows machine no matter which Qt build I use, and no matter if Sigil is maximized or not.
DiapDealer is offline   Reply With Quote
Old Today, 10:47 PM   #57
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 38,987
Karma: 153098470
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
I tried rebuilding Sigil with the latest update. Opening dummy2.epub is now working in that I can click on Show details and the details show up. It doesn't seem to matter whether Sigil is full screen or windowed.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2024-09-03 194508.png
Views:	2
Size:	22.5 KB
ID:	210600  
DNSB is online now   Reply With Quote
Old Today, 10:57 PM   #58
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,843
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
It's gotta be some sort of race and we're just kicking the can around.
DiapDealer is offline   Reply With Quote
Old Today, 11:26 PM   #59
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,047
Karma: 5449552
Join Date: Nov 2009
Device: many
That is what I thought. On initial start up Sigil expects a certain order for things so that geometry is set first, the restore state is done next when the Main Appilcation is first shown. Using Full Screen and Maximized changes this order a bit since showMaximized() and showFullScreen() do a show (a MainWindow Activation). But before the very first MainWindow can be shown either CreateNewBook() must be run (an empty epub) or an actual epub must be fully loaded.

But the exceptions started to interfere with that order because when showing the Error Dialog and waiting for okay to be pushed, both delayed the running of CreateNewBook() (because the loading of a epub failed) and allowed other QEvents to be processed resulting in the MainWindow being activated before an epub (empty or real) existed.

My last update to MainWindow.cpp makes CreateNewBook() to be called as soon as any Exception is thrown when trying to load an epub so that showing the ErrorDialog can run other QEvents and not cause a problem.

At least that is my current working theory. And @DNSB's testing seems to support that theory but your testing is showing something else is happening related Maximized windows.

So one step forward and one step back all at the same time!

What we really need is to generate a backtrace easily on Windows like we get automatically with MacOS and can easily get with gdb on Linux so we can see the exact sequence of events happening.
KevinH is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updated CC (3.5.6) crashes upon opening SuzDavid Calibre Companion 16 11-22-2014 10:18 AM
Opening EPUBs in Sigil takes ages [Windows] Wasserpulle Sigil 4 12-13-2013 01:05 PM
SIGIL Crashes When Opening Files on MacBook Pro WilliamGarner Sigil 2 10-09-2013 09:07 AM
Epub crashes on Sigil for Mac, OK on Sigil for PC crystamichelle Sigil 6 08-14-2013 02:52 PM
4.129 crashes upon opening da_jane Calibre 7 01-19-2009 02:25 AM


All times are GMT -4. The time now is 11:26 PM.


MobileRead.com is a privately owned, operated and funded community.