10-10-2018, 12:23 PM | #31 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
Just for the record, I'm running kubuntu 18.04, sigil 0.9.9 (built from source) and loaded Qt 5.9.5, and I experience this crash.
I'm not sure why I never noticed it before, since every time I make an epub I generate a toc.xhtml (which ends up as the first file, of course) and move it down to just before the text of the book starts. (i.e. the end of the frontmatter). Now, that causes the crash as described above. Might be because I only just recently ugraded kubuntu from 16.04.x to 18.04.1. In any event, adding "XDG_CURRENT_DESKTOP=XFCE" to the sigil startup file fixes the problem. Albert |
10-10-2018, 12:54 PM | #32 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
At the very least, I think I'll add that line (commented out) to Sigil's launch script. That way, we can tell tell people who have problems on KDE to simply uncomment the line.
This is more evidence (IMO) that the problem lies with KDE's qt platform plugin. In the meantime, I'll fire up a KDE VM and see if I can't find a workaround that doesn't involve "tricking" Qt into thinking it doesn't need to load KDE's platform plugin. |
10-10-2018, 01:33 PM | #33 | |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Where can I find the source code to the KDE Qt plugin? I think we should search its code base for where that exact error message is generated.
Quote:
|
|
10-10-2018, 01:38 PM | #34 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Googling that error message gets me this Qt bug report:
https://bugreports.qt.io/browse/QTBU...iewStatus=Open Which only hits KDE and seems to involve Icons. That specific error message is generated here according to google: https://code.woboq.org/qt5/qtbase/sr...riant_p.h.html and again here: https://code.woboq.org/qt5/qtbase/sr...riant.cpp.html And here is a very simple standalone Qt program that can be built easily and shows the same issues via drag and drop of items with icons but only under KDE, otherwize the program works fine. https://gitlab.com/bugpocs/WidgetListCrash So the Icon is being stored in a QVariant but something is creating a bad QVariant type? Last edited by KevinH; 10-10-2018 at 01:58 PM. |
10-10-2018, 01:46 PM | #35 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
What do you want to bet this is related to the KDE Qt plugin using is own icons for Folders and HTML files that are different from those that are standard in Qt?
|
10-10-2018, 02:45 PM | #36 | |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Quote:
Thanks, KevinH |
|
10-10-2018, 03:36 PM | #37 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It's a good bet. It probably affects what QFileIconProvider.icon(QFile) returns (which is what we use to assign the icon in Resource.cpp).
Last edited by DiapDealer; 10-10-2018 at 03:51 PM. |
10-10-2018, 04:26 PM | #38 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Here is an interesting link that shows up to May 2017 QFileIconProvider did not even work under plasma, it returned an empty pixmap...
https://phabricator.kde.org/R135:7a7...e6e8aabe45b7ed |
10-10-2018, 05:29 PM | #39 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
And that's just last year! But at least some portions of QFileIconProvider have to be working. Afterall... it's used to initialize the tree in the first place. All of the folder icons and the initial file icons are successfully retrieved via QFileIconProvider in OPFModel.cpp and Resource.cpp. It's only after reordering that things blow up in KDE
I believe QFileIconProvider has some flags that can be set to limit it to default icons only. I wonder if that's worth exploring? Last edited by DiapDealer; 10-10-2018 at 05:35 PM. |
10-10-2018, 07:44 PM | #40 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Crashes immediately when dragging an item with an icon on Kubuntu 16.04, but hasn't crashed for me on a non-KDE DE yet.
|
10-10-2018, 10:15 PM | #41 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Wow ... It is a very simple testcase! The backtrace from the original bug report did not show any Plasma/KDE info so the KDE people ignored it and asked the original poster to file it at Qt so nothing was ever done as far as I can tell.
Well at least with this testcase we are now certain that the problem has nothing to do with Sigil. I am going to go over that testcase to see how file Icons are being set in case that points us someplace. Thanks for building and running the testcase! |
10-10-2018, 10:30 PM | #42 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
FWIW, the implementation in the KDE plugin for QFileIcon provider uses fromTheme as well:
Code:
QIcon KdePlatformTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions) const 114 { 115 if (iconOptions.testFlag(DontUseCustomDirectoryIcons) && fileInfo.isDir()) { 116 return QIcon::fromTheme(QLatin1String("inode-directory")); 117 } 118 119 return QIcon::fromTheme(KIO::iconNameForUrl(QUrl::fromLocalFile(fileInfo.absoluteFilePath()))); 120 } Code:
QListWidgetItem *firstItem = new QListWidgetItem(QIcon::fromTheme("dialog-information"), "ONE"); Last edited by KevinH; 10-10-2018 at 10:33 PM. |
10-10-2018, 11:38 PM | #43 |
Sigil Developer
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
|
Or given it works initially (the File Icon shows up) it might be related to QIcon cacheing code someplace as well.
|
10-11-2018, 08:04 AM | #44 |
Zealot
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
|
I compiled and ran WidgetListCrash on my Mageia system. It crashes when I move an item with an icon. It also duplicates the items when I drag items with no icons. See attached screen capture.
|
10-11-2018, 08:18 AM | #45 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
The duplication thing is expected. There's no copy/remove code implemented in the test. It's just simply illustrating the drag/drop crash and nothing else.
|
Tags |
drag and drop, reorder chapters, sigil crashes |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
Sigil crashes when Add Existing Files. | frichrdsn | Sigil | 2 | 05-28-2013 06:35 PM |
Kindle Previewer 2.3 crashes when opening files under Wine/Fedora 15 Linux | amoroso | Amazon Kindle | 7 | 01-16-2012 10:37 AM |