| Summary: | Okular crash when trying to open certain djvu file | ||
|---|---|---|---|
| Product: | [Applications] okular | Reporter: | Alex Dănilă <alex.danila.web> |
| Component: | general | Assignee: | Okular developers <okular-devel> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | crash | CC: | aacid, alex.danila.web, haxtibal |
| Priority: | NOR | Keywords: | drkonqi |
| Version First Reported In: | 1.4.0 | ||
| Target Milestone: | --- | ||
| Platform: | Debian stable | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
New crash information added by DrKonqi
valgrind output |
||
|
Description
Alex Dănilă
2019-12-16 21:17:46 UTC
Can you provide me with the file? I'll have a look.
From
> #10 QString::operator= (this=0x5, other=...) at tools/qstring.cpp:2417
> #11 0x00007f675f761c19 in Okular::Generator::walletDataForFile(QString const&, QString*, QString*, QString*) const () from /usr/lib/x86_64-linux-gnu/libOkular5Core.so.8
> #12 0x00007f676697747a in Layers::notifySetup (this=0x55b4553df700) at ./ui/layers.cpp:54
we see walletDataForFile is called with invalid pointers (0x5) to QString, and copy assignment segfaults in consequence.
But I don't see a possible code path to Okular::Generator::walletDataForFile via Layers::notifySetup as recorded in the backtrace (anyone?). Might be a vtable lookup on a bad instance, or something related to compiler optimization / inlining.
We're going to need the file Can't reproduce a crash when opening your file. Tried with latest okular, and with packaged okular on Debian bullseye. Can you try opening the file in djview4 instead of okular? If a crash happens there too, it would indicate an issue in the underlying libdjvulibre. You could also try installing debug symbols and see if the next backtrace becomes more revealing: echo "deb http://deb.debian.org/debian-debug/ bullseye-debug main" > /etc/apt/sources.list.d/debug.list apt update && apt install libdjvulibre21-dbgsym libqt5core5a-dbgsym okular-dbgsym libokular5core8-dbgsym okular-extra-backends-dbgsym also maybe run okular throught valgrind and tell us the trace it gives you valgrind okular filepath.djvu Created attachment 124900 [details]
New crash information added by DrKonqi
okular (1.4.0) using Qt 5.12.5
Attached new information with more dbg packages installed. Will also do valgrind.
-- Backtrace (Reduced):
#6 0x00007ff0a905f5d3 in QHash<Okular::DocumentInfo::Key, QHashDummyValue>::findNode (this=this@entry=0x1, akey=akey@entry=@0x7ffd8d255060: Okular::DocumentInfo::MimeType, ahp=ahp@entry=0x0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:928
#7 0x00007ff0a905d616 in QHash<Okular::DocumentInfo::Key, QHashDummyValue>::contains (akey=@0x7ffd8d255060: Okular::DocumentInfo::MimeType, this=0x1) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qhash.h:906
#8 QSet<Okular::DocumentInfo::Key>::contains (value=@0x7ffd8d255060: Okular::DocumentInfo::MimeType, this=0x1) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qset.h:96
#9 DjVuGenerator::generateDocumentInfo (this=0x55a70ef9c828, keys=...) at ./generators/djvu/generator_djvu.cpp:127
#10 0x00007ff0aa5c790d in TOC::notifySetup (this=0x55a70efdf290, setupFlags=<optimized out>) at ./ui/toc.cpp:70
Created attachment 124901 [details]
valgrind output
The new backtrace again shows a seemingly impossible call stack (DjVuGenerator::generateDocumentInfo should not be reachable via TOC::notifySetup). This kind of error could happen if okular loads a binary incompatible version of the DjVu generator plugin okularGenerator_djvu.so. It seems at least possible, because - Debian distributes okular and DjVu plugin in two different packages okular and okular-extra-backends - bullseye is testing, something might have gone wrong during dist upgrade, leaving both packages out of sync - generator API core/generator.h occasionally changed in a binary incompatible way Can you check if both packages show same version? For me it's $ dpkg -s okular | grep '^Version:' Version: 4:17.12.2-2.2+b1 $ dpkg -s okular-extra-backends | grep '^Version:' Version: 4:17.12.2-2.2+b1 You are right. Sorry for all this noise, I used to remember to check this stuff before reporting bugs (I often use KDE from Unstable to get newer versions of software). $ dpkg -s okular | grep '^Version:' Version: 4:18.04.0-1 $ dpkg -s okular-extra-backends | grep '^Version:' Version: 4:17.12.2-2.2+b1 I installed a tested with a compatible okular-extra-backends from Experimental and it worked. |