Bug 426020 - Okular crashes when attempting to open .cbr files
Summary: Okular crashes when attempting to open .cbr files
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 1.11.0
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2020-08-31 14:19 UTC by Ben Schröder
Modified: 2020-12-16 21:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
.cbr book for testing (2.90 MB, application/vnd.comicbook-rar)
2020-08-31 15:11 UTC, Ben Schröder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Schröder 2020-08-31 14:19:33 UTC
Application: okular (1.11.0)

Qt Version: 5.15.0
Frameworks Version: 5.73.0
Operating System: Linux 5.8.2-1-default x86_64
Windowing system: X11
Distribution: "openSUSE Tumbleweed"

-- Information about the crash:
- What I was doing when the application crashed: Trying to open a file in the .cbr (comic book) format.

- Unusual behavior I noticed: The application opens for a second but doesn't display any content, then crashes.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f0f20d1434c in QString::size (this=<optimized out>) at ../../include/QtCore/../../src/corelib/text/qstring.h:277
#5  QStringView::QStringView<QString, true> (str=..., this=<optimized out>) at ../../include/QtCore/../../src/corelib/text/qstringview.h:210
#6  QString::endsWith (this=<optimized out>, c=c@entry=..., cs=cs@entry=Qt::CaseSensitive) at text/qstring.cpp:5105
#7  0x00007f0f14030b6a in Unrar::list (this=<optimized out>) at /usr/include/qt5/QtCore/qchar.h:102
#8  ComicBook::Document::open (this=this@entry=0x55bcc7d19be8, fileName=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/generators/comicbook/document.cpp:119
#9  0x00007f0f14031ad9 in ComicBookGenerator::loadDocument (this=0x55bcc7d19bd0, fileName=..., pagesVector=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/generators/comicbook/generator_comicbook.cpp:40
#10 0x00007f0f160a62b6 in Okular::Generator::loadDocumentWithPassword (this=<optimized out>, fileName=..., pagesVector=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/core/generator.cpp:204
#11 0x00007f0f1607ab1e in Okular::DocumentPrivate::openDocumentInternal (this=0x55bcc7655f00, offer=..., isstdin=<optimized out>, docFile=..., filedata=..., password=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/core/document.cpp:894
#12 0x00007f0f160874bb in Okular::Document::openDocument (this=this@entry=0x55bcc7652160, docFile=..., url=..., _mime=..., password=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/core/document.cpp:2340
#13 0x00007f0f161eaca5 in Okular::Part::doOpenFile (this=this@entry=0x55bcc7623fd0, mimeA=..., fileNameToOpenA=..., isCompressedFile=isCompressedFile@entry=0x7fffe29274e7) at /usr/src/debug/okular-20.08.0-1.2.x86_64/part.cpp:1372
#14 0x00007f0f161eb993 in Okular::Part::openFile (this=0x55bcc7623fd0) at /usr/src/debug/okular-20.08.0-1.2.x86_64/part.cpp:1488
#15 0x00007f0f225b48a5 in KParts::ReadOnlyPartPrivate::openLocalFile (this=this@entry=0x55bcc761f010) at /usr/src/debug/kparts-5.73.0-1.2.x86_64/src/readonlypart.cpp:190
#16 0x00007f0f225b9327 in KParts::ReadOnlyPart::openUrl (this=0x55bcc7623fd0, url=...) at /usr/src/debug/kparts-5.73.0-1.2.x86_64/src/readonlypart.cpp:152
#17 0x00007f0f161e908e in Okular::Part::openUrl (this=0x55bcc7623fd0, _url=..., swapInsteadOfOpening=<optimized out>) at /usr/src/debug/okular-20.08.0-1.2.x86_64/part.cpp:1675
#18 0x000055bcc6d3f27d in Shell::openUrl (this=<optimized out>, url=..., serializedOptions=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/shell/shell.cpp:271
#19 0x000055bcc6d4185b in Shell::openDocument (this=0x55bcc75f6600, url=..., serializedOptions=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/shell/shell.cpp:222
#20 0x000055bcc6d39a3e in Shell::openDocument (serializedOptions=..., url=..., this=0x55bcc75f6600) at /usr/src/debug/okular-20.08.0-1.2.x86_64/shell/okular_main.cpp:162
#21 Okular::main (serializedOptions=..., paths=...) at /usr/src/debug/okular-20.08.0-1.2.x86_64/shell/okular_main.cpp:166
#22 main (argc=<optimized out>, argv=0x7fffe2927a40) at /usr/src/debug/okular-20.08.0-1.2.x86_64/shell/main.cpp:97
[Inferior 1 (process 28740) detached]

Possible duplicates by query: bug 421857, bug 358035, bug 357345, bug 355792, bug 355111.

Reported using DrKonqi
Comment 1 Yuri Chornoivan 2020-08-31 14:22:20 UTC
Does it happen for every .cbr file or just one?

If that happens just for one file, can you attach it to this bug report?

Thanks in advance for your answers.
Comment 2 Ben Schröder 2020-08-31 15:02:39 UTC
So far it happens with all the comic books i own.
I will upload one for testing.

If i open the book trough Calibre Okular is able to display the book normally and doesn't crash. If i try to open the file directly in Dolphin the bug returns and the program crashes when trying to open it.
Comment 3 Ben Schröder 2020-08-31 15:11:11 UTC
Created attachment 131313 [details]
.cbr book for testing
Comment 4 Yuri Chornoivan 2020-08-31 15:27:31 UTC
Does not crash here (Okular 1.11.0).

Can you try to install RAR temporarily for testing?

https://www.rarlab.com/download.htm
Comment 5 Ben Schröder 2020-08-31 15:48:47 UTC
I have installed it now.
I have sent you a mail with a link to a bigger book for testing.
Comment 6 Yuri Chornoivan 2020-08-31 15:54:16 UTC
Does not crash either. Let's see if anyone has a recipe or an idea on how to fix this.
Comment 7 Albert Astals Cid 2020-08-31 17:41:55 UTC
Please run kdebugsettings
inside it search for comic and in the okular comicbook generator change the setting to full debug

Then run okular, try to open a cbr and it will say something like

org.kde.okular.generators.comicbook: detected: "/usr/bin/unar" ( "unar" )

Can you post exactly what you get?
Comment 8 Ben Schröder 2020-09-01 15:33:12 UTC
(In reply to Albert Astals Cid from comment #7)
> Please run kdebugsettings
> inside it search for comic and in the okular comicbook generator change the
> setting to full debug
> 
> Then run okular, try to open a cbr and it will say something like
> 
> org.kde.okular.generators.comicbook: detected: "/usr/bin/unar" ( "unar" )
> 
> Can you post exactly what you get?

Sadly kdebugsettings does not want to open on my machine, here is the log:

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
error: XDG_RUNTIME_DIR not set in the environment.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted

I have already tried to reinstall KDE but it still won't launch.
This problem first occured with the KDE/Qt Version shipped in Open Suse Tumbleweed Build 20200826.
Comment 9 Albert Astals Cid 2020-09-01 17:35:38 UTC
Your system is broken, i can't really help you there, fix it and come back to us once you can provide the appropiate information.
Comment 10 Justin Zobel 2020-12-02 01:37:25 UTC
(In reply to Ben Schröder from comment #8)
> (In reply to Albert Astals Cid from comment #7)
> > Please run kdebugsettings
> > inside it search for comic and in the okular comicbook generator change the
> > setting to full debug
> > 
> > Then run okular, try to open a cbr and it will say something like
> > 
> > org.kde.okular.generators.comicbook: detected: "/usr/bin/unar" ( "unar" )
> > 
> > Can you post exactly what you get?
> 
> Sadly kdebugsettings does not want to open on my machine, here is the log:
> 
> qt.qpa.xcb: could not connect to display 
> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though
> it was found.
> error: XDG_RUNTIME_DIR not set in the environment.
> Failed to create wl_display (No such file or directory)
> qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even
> though it was found.
> This application failed to start because no Qt platform plugin could be
> initialized. Reinstalling the application may fix this problem.
> 
> Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb,
> minimal, minimalegl, offscreen, vnc, wayland-egl, wayland,
> wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
> 
> Aborted
> 
> I have already tried to reinstall KDE but it still won't launch.
> This problem first occured with the KDE/Qt Version shipped in Open Suse
> Tumbleweed Build 20200826.

Hey Ben, were you able to get your system fixed to do further troubleshooting on this issue?
Comment 11 Ben Schröder 2020-12-02 21:23:58 UTC
Hi,
yes this bug was fixed at the beginning of October.
Sorry for not updating the ticket, the bug can be marked as fixed.
Comment 12 Christoph Feck 2020-12-16 21:22:16 UTC
Thanks for the update; changing status.