Summary: | Baloo_file_extractor Crashes in kfilemetadata_epubextractor.so | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kfilemetadata | Reporter: | luca |
Component: | general | Assignee: | Stefan Brüns <stefan.bruens> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | crash | CC: | a.stippich, aloys_4, luca, nate, paul, peppuzzo, pino, stefan.bruens, webmaster |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.56.0 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=407140 | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Troublesome ePub
minimal broken sample Patch for libepub/ebook-tools New crash information added by DrKonqi |
Description
luca
2019-04-01 14:32:08 UTC
Crashing in kfilemetadata_epubextractor.so, and possibly even deeper (maybe in _opf_label_get_by_lang() at /usr/lib/libepub.so.0) Looks like it's having trouble parsing one of your epubs. Can you find which file it is by using `baloocal monitor` and then attach that epub? Also installing debug symbols for the kfilemetadata framework and then reproducing the crash and attaching a new backtrace would be very helpful. Hi Nate. Thanks for your reply. Unluckily i can't find kfilemetadata-dbg for bionic (I'm on KDE Neon). Neither I've understood how to find the "troublesome" epub with `balooctl monitor`. Could you please give me some further advice? Cheers, Luca Run `balooctl monitor` in a terminal window and leave it running. Then in another terminal window or tab, turn off Baloo and turn it back on with `balooctl disable && balooctl enable` The terminal window/tab with the monitor running will show you in real-time which file it's indexing. Eventually Baloo will crash, and the last file listed in the monitor window/tab will be the file it crashed on. Then you can attach that file to the bug. Created attachment 119480 [details]
Troublesome ePub
This file, apparently, makes Baloo crash.
New information was added with comment #4; changing status for inspection. Can reproduce with the test file. I found it to be crashing on https://phabricator.kde.org/source/kfilemetadata/browse/master/src/extractors/epubextractor.cpp$171 (In reply to Alexander Stippich from comment #6) > Can reproduce with the test file. I found it to be crashing on > https://phabricator.kde.org/source/kfilemetadata/browse/master/src/ > extractors/epubextractor.cpp$171 The epub file is invalid, as the last entry in its toc.ncx has a navPoint element without the mandatory navLabel (The bad entry is likely caused by some licensing framework which mangled the original epub): --- <navPoint id="license" playOrder="77"><content src="Testo/license_IvREjeLk.htm"/></navPoint></navMap> --- https://groups.niso.org/apps/group_public/download.php/14650/Z39_86_2005r2012.pdf#page=59 Unfortunately, libepub does not check for this, neither after parsing: https://sourceforge.net/p/ebook-tools/code/HEAD/tree/trunk/ebook-tools/src/libepub/opf.c#l361 nor when accessing it during iterator next: https://sourceforge.net/p/ebook-tools/code/HEAD/tree/trunk/ebook-tools/src/libepub/epub.c#l473 (though here it does: https://sourceforge.net/p/ebook-tools/code/HEAD/tree/trunk/ebook-tools/src/libepub/epub.c#l530 ) Unfortunately, libepub upstream is dormant for 7 years ... Created attachment 119751 [details]
minimal broken sample
Okular also crashes, as it also uses libepub from ebook-tools. Git commit 74c8fcf5bb0df38270fddd625941f4f24ce76d45 by Stefan Brüns. Committed on 30/04/2019 at 17:22. Pushed by bruns into branch 'master'. [balooctl] Add command to show files failed to index Summary: Baloo was missing any means to retrieve the list of files which failed to index. Test Plan: $> balooctl failed Reviewers: #baloo, #frameworks, ngraham, astippich Reviewed By: #baloo, ngraham Subscribers: kde-frameworks-devel Tags: #frameworks, #baloo Differential Revision: https://phabricator.kde.org/D20918 M +6 -0 src/engine/transaction.cpp M +1 -0 src/engine/transaction.h M +27 -0 src/tools/balooctl/main.cpp https://commits.kde.org/baloo/74c8fcf5bb0df38270fddd625941f4f24ce76d45 Created attachment 119785 [details]
Patch for libepub/ebook-tools
Patch pushed to openSUSE Tumbleweed, provided for other distributions to pick up.
I have posted information about it to the distributions mailing list, thanks! Git commit 9f98c010691ed73d11c83a1694823aba60b12e32 by Albert Astals Cid, on behalf of Stefan Brüns. Committed on 22/05/2019 at 22:24. Pushed by aacid into branch 'Applications/19.04'. [EPubGenerator] Avoid crashes due to bogus wrapping of content in table Summary: QTextDocument chokes badly when a some documents are wrapped inside a table, returning e.g. a pagecount of -41292 afterwards. On the downside, this removes any padding from the page. On the upside, it removes any padding from the page. Related: bug 406738, bug 407140 Reviewers: #okular Subscribers: okular-devel Tags: #okular Differential Revision: https://phabricator.kde.org/D20949 M +1 -7 generators/epub/converter.cpp https://commits.kde.org/okular/9f98c010691ed73d11c83a1694823aba60b12e32 *** Bug 411627 has been marked as a duplicate of this bug. *** *** Bug 416199 has been marked as a duplicate of this bug. *** Has to be fixed in distributions by picking up the patch from comment #11 *** Bug 417492 has been marked as a duplicate of this bug. *** *** Bug 417656 has been marked as a duplicate of this bug. *** *** Bug 417677 has been marked as a duplicate of this bug. *** *** Bug 417676 has been marked as a duplicate of this bug. *** Created attachment 130078 [details]
New crash information added by DrKonqi
baloo_file_extractor (5.70.0) using Qt 5.14.2
- What I was doing when the application crashed:
Baloo crashes every time it starts and then launches without any problem by clicking on 'restart program'.
-- Backtrace (Reduced):
#5 0x00007f568dbc1b88 in FindNode () from /lib64/libepub.so.0
#6 0x00007f568dbc0859 in _opf_manifest_get_by_id () from /lib64/libepub.so.0
#7 0x00007f568dbbda0d in _get_spine_it_url () from /lib64/libepub.so.0
#8 0x00007f568dbbdab2 in epub_it_get_curr () from /lib64/libepub.so.0
#9 0x00007f568dbcb0cd in KFileMetaData::EPubExtractor::extract(KFileMetaData::ExtractionResult*) () from /usr/lib64/qt5/plugins/kf5/kfilemetadata/kfilemetadata_epubextractor.so
|