View Single Post
Old 04-07-2017, 09:41 PM   #115
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,961
Karma: 6361444
Join Date: Nov 2009
Device: many
Okay your second dmp backtrace was virtually identical to your first one. So I doubt this is memory corruption related at all.

I have dug through the code and I am convinced this is not caused by Sigil doing anything wrong. It seems that shell and ole dll's have issues creating icons from certain paths when run in separate threads. So I think the problem is an internal Qt problem in the Qt Windows theme code.

There are newer bug reports against even Qt 5.8.0 showing issues with QFileIconProvider and QPixmap when passed a file path but only on Windows. Something to do with the file size or requested icon size or the existence of dangling drive letters that point to nothing ends up killing SHGetFileInfoW() which is what the backtrace shows as well.

Given we know that the file paths exist inside the epub and that each image can actually be loaded into the Preview, then it must be something else that is messing with things.

So I have added the code to handle asynchronous resource loading in a QWebView to make sure Sigil's code is up to snuff.

I have also changed the use of QPixmap operating on a file path (the code path that results in a segfault) to actually operate on a QImage of that filepath instead (since we know they are image files) to create the thumbnails.

Hopefully this will allow us to work around the Qt bug until we can figure out something more.

I am glad your workaround of hiding the thumbnails helped.

When, the next release comes out, would you be willing to try it and reenable the thumbnails to try and see if our changes did the trick or not?

Thanks for your bug report.

KevinH
KevinH is offline   Reply With Quote