View Single Post
Old 06-08-2017, 11:02 AM   #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,937
Karma: 6361444
Join Date: Nov 2009
Device: many
Hi,

Okay I finally found time to look at this and I can recreate it but only under specific circumstances:

1. Open any epub with extra styles in an style sheet and more than one xhtml file
2. make sure Preview is showing
3. open one of the xhtml files in the book so that it shows in CodeView *and* Preview
4. navigate to the stylesheet in book browser and double click it to open the css file in the front tab
5. Use right click in the book browser to delete the xhtml file you opened first (and still showing in Preview!)
6. With the CSS tab still open in front, invoke the Tools -> DeleteUnusedStylesheetClass and tell it to delete them when asked for confirmation
7. I crash here sometimes but other times I must try a Save.

From the backtrace, the bug is nothing to do with CSS updating, and instead seems to be due to the xhtml file that was deleted in step 5 above still trying to be loaded and shown by Preview. Somehow after deleting an xhtml fie, we have to make sure it is not current showing in Preview and if so , wipe it out.

This will always happen when Preview is not open or when you move to another xhtml as front tab (it will replace Preview's contents with a valid xhtml file). The problem happens because a CSS file is showing in front and it has no Preview!

If someone else can confirm this failure mode with a recent Sigil version on other platforms, that would be grand.

I will look at loading an empty placeholder into Preview when any non-xhtml file is in the front tab.

Kevin

Quote:
Originally Posted by stumped View Post
slightly off topic but I can crash sigil almost at will with by running remove unused styles ( while the style sheet is being displayed and after editing some values or removing some front matter pages, thus making some styles redundant followed by save
it's usually the save operation that triggers sigil has encountered a problem and needs to close
I have learnt the hard way not to save which the stylesheet is the active displayed page
KevinH is offline   Reply With Quote