![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Sigil Crashes when Plugin Runner closed with X-button
I got a bug to report... crash, closes right out of Sigil, no warning.
Don't know if this is a Sigil plugin bug, or a bug with your specific plugin. Steps to Reproduce 1. Highlight a file in Book Browser. Plugins > Edit > TagMechanic 2. Without doing anything, close out using the "Plugin Runner" X: Sigil just crashes. I tested it about 6 times: 5/6 Sigil closed with zero warning. 1/6 Sigil popped up some sort of XML parsing warning (but I forgot to screenshot it). Sigil then crashed soon after. |
![]() |
![]() |
![]() |
#2 |
just an egg
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,827
Karma: 7943430
Join Date: Mar 2015
Device: Kindle, iOS
|
I am not experiencing this with either 0.9.18 or 0.9.991. However, I am on macOS.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
I've tested the plugin on my 64bit Windows 10 (1909) machine with Sigil 0.9.14 and Sigil 0.9.991-51 and didn't experience any crashes. All I got was the Error Parsing Result XML: Premature end of document message box.
@Tex2002ans what's your operating system? |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
This has always been the case with plugins that use tkinter. A new window is opened and the launcher window is a bit vulnerable when the user wants to close (or cancel) it.
Crash is not every time, but sometimes it closes Sigil, and sometimes it's just a message. One of two messages appears: * Error Parsing Result XML: Start tag expected. * Error Parsing Result XML: Encountered incorrectly encoded content. Personally, I have always "avoided" closing because I've encountered the problem a few years ago. |
![]() |
![]() |
![]() |
#5 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Sigil 0.9.14
Windows 10 1903 (64-bit) Quote:
Without even clicking on it, Sigil then disappeared. Quote:
![]() Next thing I knew, Sigil crashed, and I lost a few minutes of work (luckily I save new versions every time I reach a new milestone). Last edited by Tex2002ans; 11-20-2019 at 03:00 AM. |
||
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
A plugin can't crash Sigil. Not without some very devious and malicious intent, anyway. The simple answer is "don't close Sigil's Plugin Runner out from under a plugin that the Plugin Runner is running/monitoring."
We'll see if we can fix Sigil so it doesnt crash, but in the meantime, this is very much a "Doctor, it hurts whenever I do this" type of scenario. And it's nothing to do with tkinter per se. It's the fact that there's simply no time to hit the x button on a plugin that does its work immediately (with no gui to select options). It's theoretically possible to crash Sigi! this way with any plugin out there (if one is quick enough on the mouse). Last edited by DiapDealer; 11-20-2019 at 06:12 AM. |
![]() |
![]() |
![]() |
#7 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
|
I do not get any crash either but I am on macOS. It should never crash. Those error messages about missing ResultXML just means any output from the plugin itself was incomplete but that should not crash Sigil.
Does using the Cancel button instead of the X on PluginRunner cause a crash of Sigil too? If using Cancel does not crash Sigil, we can try to override the closeEvent and have it call Cancel before exiting. Last edited by KevinH; 11-20-2019 at 08:45 AM. |
![]() |
![]() |
![]() |
#8 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Another option would be to hide the Plugin Runner window until the plugin returns control. But I don't like that for several obvious reasons. |
|
![]() |
![]() |
![]() |
#9 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
|
I forgot about escape. From what I have read, Escape will not generate a closeEvent we could actually catch. So we might as you said have to filter out escape key events.
|
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
The Cancel button does not crash.
It is difficult for me to determine the exact frequency because I never really close the launcher with "X". I only checked it today after reading the post. Sometimes it sigil crash the first time and sometimes the second or third time. |
![]() |
![]() |
![]() |
#11 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
|
This should now be fixed in master by overiding QDialog::reject() to invoke cancelPlugin first before exiting and by my tests this catches both the escape key and the x close.
BeckyEbook, if you do a fresh build today, would you please see if this stops the crashing as I can not test it on my mac as it doesn't crash at all |
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Doitsu clued me in to one of his plugins that would consistently crash for me when clicking the close button (or hitting ESC) while the plugin's gui (PyQt5) was open. Your commit eliminated the crashing (using ESC as well)
Last edited by DiapDealer; 11-20-2019 at 10:14 AM. |
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,570
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I'm going to split this conversation out into its own thread since it's not a plugin bug.
|
![]() |
![]() |
![]() |
#14 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,763
Karma: 5706256
Join Date: Nov 2009
Device: many
|
|
![]() |
![]() |
![]() |
#15 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 839
Karma: 2657572
Join Date: Jan 2017
Location: Poland
Device: Various
|
Crash exist.
Code:
Debug: Warning: QProcess: Destroyed while process ("C:\\Program Files\\Sigil\\python3.exe") is still running. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Annotations (closed) | GRiker | Plugins | 68 | 06-17-2014 06:11 AM |
[GUI Plugin] Marvin XD (closed) | GRiker | Plugins | 141 | 06-15-2014 05:36 PM |
Plugin thread closed? | BookJunkieLI | Calibre | 3 | 10-05-2013 02:56 PM |
Epub crashes on Sigil for Mac, OK on Sigil for PC | crystamichelle | Sigil | 6 | 08-14-2013 02:52 PM |
Calibre crashes on menu Button selection | entity | Calibre | 6 | 12-15-2012 03:44 AM |