Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 10-06-2018, 08:46 AM   #16
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
Quote:
Originally Posted by DiapDealer View Post
Also keep in mind that you don't have to clone the repo with git to get the latest source. The same button on github that allows you to copy the clone url will allow you to download a zip.
OK. Thanks. I will grab a copy and rebuild to see if it fixes the issue.

I am also going to try your other ideas to see what happens.

Thanks
Banjo
(_)=='=~
Banjo is offline   Reply With Quote
Old 10-06-2018, 09:03 AM   #17
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
First report

Code:
ssh -X localhost sigil
totally fixes the problem. When I run Sigil that way, drag and drop in the Book Browser works normally. This works for my repo-installed 0.9.8 and also for my custom built 0.9.10.

I will go try to rebuild the latest code to see if the recent changes also fix this.

Stay tuned.
Banjo is offline   Reply With Quote
Advert
Old 10-06-2018, 09:12 AM   #18
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,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Thanks for reporting back. I hope the latest changes make using the ssh workaround unnecessary, but at least there IS a workaround.
DiapDealer is offline   Reply With Quote
Old 10-06-2018, 10:14 AM   #19
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
I downloaded a zip file,Sigil-master.zip , of the latest and built it. Sadly, that did not fix the Book Browser problem on this system. The tree still gets munged when I drag a file, and Sigil crashes when I right click on the empty space. I suspect that the dragging action has damaged the tree, thus causing the crash. Just a guess.

I peeked into the file src/MainUI/OPFModel.cpp and confirmed that the changes called out in commit 4b47929 are, in fact, in the file. So I am pretty sure I have the correct source code.

My conclusion is that this problem is different from the one addressed in the commit.

Once again, using ssh -X localhost /usr/local/bin/sigil fixes the issue.

If I can figure out how to run this in a source level debugger I will look into it further. That will take a while since the code base is all new to me, I have not been active in this sort of debugging for a year or so, and my brain has begun to rot with age .

While I can run this in gdb, well, what can I say? I don't really want to go there.

Do you use an IDE for developing Sigil? How does one build this with debug information included?

Banjo
(_)=='=~
Banjo is offline   Reply With Quote
Old 10-06-2018, 10:37 AM   #20
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,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I don't use an IDE for developing or debugging Sigil. So I'm afraid I wouldn't be much help in that regard. Building a debug version of Sigil is fairly easy via the command-line instructions, but hasn't typically been of much help to me when troubleshooting non-crashing issues (and even then, the problem usually ends up being deep in Qt anyway). Most of my work is done using judicious prints to STDOUT via qDebug() calls added to the source.

Last edited by DiapDealer; 10-06-2018 at 11:07 AM.
DiapDealer is offline   Reply With Quote
Advert
Old 10-06-2018, 11:01 AM   #21
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
Ah. Old fashioned printf/gdb debugging. I did many years of that.

Looking at my previous gdb backtrace, I see that the last breaths of the tool were taken on QWidget, QObject, QStandardItem etc. So i agree that the final crash is buried in Qt. However the situation that sets up the crash is probably created far removed from the crash point, which makes it difficult to find. I suspect a damaged tree. I would start by looking at the manipulation of the tree in the Widget. But, given that the tree is manipulated with Qt, the error is buried inside Qt anyway. Sigh.

I will fool around with this for a while to see what I can puzzle out. However, I am:

1. unfamiliar with Qt
2. unfamiliar with Sigil
3. unfamiliar with Cmake
4. stale in gdb skills
5. weak in c++ skills (java guy)

so don't hold your breath while I do this. You might turn blue.

Banjo
(_)=='=~
Banjo is offline   Reply With Quote
Old 10-06-2018, 11:17 AM   #22
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,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
While I won't dismiss the notion that the tree may be getting damaged in some way, you also have to keep in mind that file reordering within Sigil works without crashing on many Linux distros with many versions of Qt5--including some with KDE/Plasma DEs. The only two that have reported crashes when reordering are PCLOS and now Mageia. Which leads me back to the custom platform Qt plugin being the problem on those distros where reordering actually leads to crashing.
DiapDealer is offline   Reply With Quote
Old 10-06-2018, 11:48 AM   #23
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
OK. A good point. So I can add "custom platform Qt plugin" to my list of "unfamiliar with" items.

Sounds like I might have an opportunity to spend some quality time with The Google (which knows all).

BTW, I have some vested interest in this because, while I am running on Mint 18.1 now, Mint is dropping KDE in version 19 so i will probably be going back to Mageia in my next upgrade. I don't want to lose Sigil now that I have found it. It is a marvelous ebook editor.
Banjo is offline   Reply With Quote
Old 10-08-2018, 01:29 PM   #24
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
I have been trouble shooting this issue, and while I have not found a way to fix the bug in Qt, I have found another workaround.

If I lie to Sigil about what desktop I am using, the program works normally.

I tell it that I am using XFCE instead of KDE and the crash is gone. I simply add XDG_CURRENT_DESKTOP=XFCE to the sigil startup script and it works. As far as I can tell, all of the Sigil features still work, but I have not run a complete test.

If I lie to it and tell it that I am using GTK, some of the menu bars stop working, so I am using XFCE.

Here is the new sigil script.

Code:
#!/bin/sh

# Entry point for Sigil on Unix systems.
# Adds linked Qt's lib directory to the LD_LIBRARY_PATH

QTLIB_DIR="/usr/lib64"
SIGIL_BIN_DIR="/usr/local/lib/sigil"
XDG_CURRENT_DESKTOP=XFCE

if [ -z "$LD_LIBRARY_PATH" ]; then
  LD_LIBRARY_PATH="$SIGIL_BIN_DIR:$QTLIB_DIR"
else
  LD_LIBRARY_PATH="$SIGIL_BIN_DIR:$QTLIB_DIR:$LD_LIBRARY_PATH"
fi

# Create an environment var for the Sigil share directory location.
if [ -z "$SIGIL_SHARE_PREFIX" ]; then
  SIGIL_SHARE_PREFIX="/usr/local"
  export SIGIL_SHARE_PREFIX
fi

# Not really needed anymore but left in for fringe cases
#if [ -z "$SIGIL_EXTRA_ROOT" ]; then
#  SIGIL_EXTRA_ROOT="/usr/local/share/sigil"
#  export SIGIL_EXTRA_ROOT
#fi

export LD_LIBRARY_PATH

exec /usr/local/lib/sigil/sigil "$@"
To do this, just edit the sigil startup script and add the line

XDG_CURRENT_DESKTOP=XFCE

The startup script is /usr/bin/sigil for the 0.9.8 version installed from the repos, or in /usr/local/bin/sigil for the 0.9.10 that I built from source.

Banjo
(_)=='=~
Banjo is offline   Reply With Quote
Old 10-08-2018, 01:36 PM   #25
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: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
Which means the bug is in the KDE plugin for Qt that tries to style Qt to be more KDE like or in KDE's custom Qt.
KevinH is offline   Reply With Quote
Old 10-08-2018, 01:50 PM   #26
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,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
My bet is on the plugin, since Sigil (thus far) seems to be behaving as expected with the platform Qt. Setting the environment variable seems to be enough to trick Qt into not loading the KDE Qt plugin.
DiapDealer is offline   Reply With Quote
Old 10-08-2018, 02:03 PM   #27
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
I have been putting it through its paces here on Mageia, and so far it all appears to be working.

I am running both the 0.9.8 from the Mageia repos and the 0.9.10 custom that I compiled from source.

I filed a bug report with Mageia bugzilla so that they are aware of the problem. If it is, indeed, in a Mageia special plugin, it may show up in other tools, and it would be incumbent on them to fix it. I have also posted this workaround to their space to take off some of the pressure.
Banjo is offline   Reply With Quote
Old 10-10-2018, 05:31 AM   #28
Reinhard
Junior Member
Reinhard began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2018
Device: none
It's not Mageia specific. I have got the same problem using Debian Sid;
both with version 9.10 from the repository and selfcompiled from git.
The same workarounds (ssh or XDG_CURRENT_DESKTOP=XFCE) remove the
problem.

Reinhard
Reinhard is offline   Reply With Quote
Old 10-10-2018, 07:45 AM   #29
Banjo
Zealot
Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!Banjo , Klaatu Barada Niktu!
 
Banjo's Avatar
 
Posts: 120
Karma: 5276
Join Date: Feb 2013
Device: Asus Zen Pad
OK. Well that is three distros now that have reported the problem, Mageia 6, PCLOS, and now Debian.

It looks like the Sigil code sets up the QTreeView and then Qt takes over for the drag and drop. I put some printf's in the code in OPFModel::RowsRemovedHandler() to see how far it got. After I drop the file in its new location, I see a bunch of the errors:

Code:
Trying to construct an instance of an invalid type, type id : xxxxxxx
and then the GUI is locked up.

If I recall correctly, the execution never got to the OPFModel::RowsRemovedHandler() method, where the Spine Order is updated. So it is locking up before Sigil gets it back. I would have to double check that to confirm; my memory is vague on that.

Anyway, it looks like Sigil sets up the QTreeView and then Qt handles it.... incorrectly.. and after that the interface is partially locked up.
Banjo is offline   Reply With Quote
Old 10-10-2018, 09:47 AM   #30
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: 7,506
Karma: 5433350
Join Date: Nov 2009
Device: many
That error message may be related to the QVariant object that is used to store the data associated with each item. The QVariant has a set of resource types that determine how the object is cast to the type or structure that is being stored there (much like a union can store multiple types.

The custom Qt:UserRole values can be used in Standard Model items to store data of specific types which are returned in a QVariant when data is read from a model item. and my guess is this is where the problem lies. An unknown QVariant type wil throw an error.

Qt allows additional user defined types to be defined and used to allow QVariants to store user defined objects/structures. The Qt:UserRole > user defined field type is used in storing the sort order for how items in the BookBrowser should be stored. I will take another longer look to see if they are being used properly in the BookBrowser. Someone should do the same for the KDE Qt plugin which may overwrite or change things.

Last edited by KevinH; 10-10-2018 at 10:11 AM. Reason: Corrected and updated based on new understanding
KevinH is offline   Reply With Quote
Reply

Tags
drag and drop, reorder chapters, sigil crashes

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 05:46 AM.


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