Bug 424249 - Segmentation fault when closing a tab by using the keyboard shortcuts
Summary: Segmentation fault when closing a tab by using the keyboard shortcuts
Status: RESOLVED DUPLICATE of bug 423335
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-15 18:33 UTC by ParsaMousavi
Modified: 2020-07-16 17:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
sepamou: Usability+


Attachments
Okular crash backtrace (5.27 KB, text/plain)
2020-07-15 18:33 UTC, ParsaMousavi
Details
Okular crash backtrace with debug symbols (8.38 KB, text/plain)
2020-07-15 20:37 UTC, ParsaMousavi
Details
Okular crash backtrace when pressing the X close button (9.92 KB, text/plain)
2020-07-16 06:53 UTC, ParsaMousavi
Details
Okular crash backtrace when closing a tab with the middle-click (8.30 KB, text/plain)
2020-07-16 06:54 UTC, ParsaMousavi
Details
Okular debugging in GDB (11.81 KB, text/plain)
2020-07-16 10:04 UTC, ParsaMousavi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ParsaMousavi 2020-07-15 18:33:08 UTC
Created attachment 130145 [details]
Okular crash backtrace

I've assigned the hotkey "Ctrl+W" for closing a tab in Settings->Configure keyboard shortcuts->Close.
Whenever I close a tab by pressing "Ctrl+W" , Okular crashes and causes all the opened documents to get closed.That only happens when there are at least "2" open documents in the same window.By the way I've enabled the option "Open new files in tabs" if that matters.

The output of Okular in its stderr after the crash :
```
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = okular path = /usr/bin pid = 28214
KCrash: Arguments: /usr/bin/okular some_file.pdf 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi
```

And the full backtrace is included as an attachment although the KDE Crash Handler says it's probably not useful.

STEPS TO REPRODUCE:
1. Open Okular
2. Assign a shortcut for "Close" in Settings->Configure keyboard shortcuts
3. Use that shortcut when you have at least two opened documents at the same time.



SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 5.3.0 / KDE Neon Unstable
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.73.0
Qt Version: 5.14.2
Comment 1 Albert Astals Cid 2020-07-15 19:35:07 UTC
Can you install debug packages of okular in kde neon?

Also which okular version are you running?
Comment 2 ParsaMousavi 2020-07-15 20:35:31 UTC
Yes,of course.I've installed the package "okular-backend-odp-dbgsym" and added the new backtrace as the attachment.BTW I use Okular 1.11.70.
Comment 3 ParsaMousavi 2020-07-15 20:37:02 UTC
Created attachment 130149 [details]
Okular crash backtrace with debug symbols
Comment 4 Albert Astals Cid 2020-07-15 21:04:13 UTC
If you're running an unstable version you need to be totally upfront about it.

@Simone, is this 423335 ?
Comment 5 Simone Gaiarin 2020-07-16 06:29:27 UTC
Does not seem to be 423335.

Does the crash happen if you close the current focused tab with the middle click of the mouse or the X close button?
Comment 6 ParsaMousavi 2020-07-16 06:52:19 UTC
Yes.Please take a look at the two new attachments.
Comment 7 ParsaMousavi 2020-07-16 06:53:29 UTC
Created attachment 130156 [details]
Okular crash backtrace when pressing the X close button
Comment 8 ParsaMousavi 2020-07-16 06:54:12 UTC
Created attachment 130157 [details]
Okular crash backtrace when closing a tab with the middle-click
Comment 9 Simone Gaiarin 2020-07-16 08:00:44 UTC
Can you execute `gdb okular` then `run` and attach the trace of gdb after the crash. (should say something about an assert failing).

Actually seems to be 423335, now that I've read better the trace.

This should be fixed in the 20.08 release of Okular.
Comment 10 ParsaMousavi 2020-07-16 10:04:03 UTC
Created attachment 130167 [details]
Okular debugging in GDB
Comment 11 Albert Astals Cid 2020-07-16 17:16:40 UTC

*** This bug has been marked as a duplicate of bug 423335 ***
Comment 12 Simone Gaiarin 2020-07-16 17:23:45 UTC
From what I understand from the gdb backtrace it seems that it fails in the cast after the assert, so does not seem exactly 423335 (sorry for changing my mind three times).

I would be good to test this again with the fix to 423335 (I am not sure the version of Okular you are using has that fix yet) and in case reopen this bug.