Bug 345082 - Crash when inline note or note pin is dragged out of document border
Summary: Crash when inline note or note pin is dragged out of document border
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.21.1
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-12 10:26 UTC by Simone Gaiarin
Modified: 2015-03-13 22:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: KDE Applications 15.04 Beta 3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Gaiarin 2015-03-12 10:26:54 UTC
If an inline note is dragged out of the document borders (while holding Ctrl in order to reposition it) when the mouse button is released the dashed contour remain still and nothing happens. If the left mouse button is clicked okular crashes.


Reproducible: Always

Steps to Reproduce:
1.Create an inline note
2.Hold Ctrl and drag it with the mouse outside document border
3.Release mouse button
4.Click left mouse button

Actual Results:  
Okular crash

Expected Results:  
The inline note is repositioned.

Distro: Manjaro
Comment 1 Christoph Feck 2015-03-12 21:26:12 UTC
Do you get the crash dialog? If yes, please add the backtrace as a comment. For more information, please see https://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 2 Albert Astals Cid 2015-03-12 23:07:08 UTC
Waiting for backtrace
Comment 3 Oliver Sander 2015-03-13 05:35:05 UTC
Is the following sufficient, or should I additionally install the Qt debugging symbols?

The crash is reproduced easily on current git master compiled against Debian Jessie.

Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#6  PageViewItem::pageNumber (this=0x0) at /home/sander/okular/ui/pageviewutils.cpp:66
#7  0x00007fc8e5c60be9 in PageView::mousePressEvent (this=0x0, e=0x304) at /home/sander/okular/ui/pageview.cpp:2119
#8  0x00007fc8f58362c7 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007fc8f5bf783e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007fc8e5c66196 in PageView::viewportEvent (this=0xfa1720, e=0x7fff48361ec0) at /home/sander/okular/ui/pageview.cpp:3149
#11 0x00007fc8f4b6b886 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#12 0x00007fc8f57e246c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#13 0x00007fc8f57e910f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#14 0x00007fc8f655a1aa in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#15 0x00007fc8f4b6b71d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#16 0x00007fc8f57e876f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#17 0x00007fc8f585f432 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#18 0x00007fc8f585de2c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#19 0x00007fc8f5886ed2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#20 0x00007fc8f10e0c5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007fc8f10e0f48 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007fc8f10e0ffc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007fc8f4b9ad1d in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#24 0x00007fc8f5886f96 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007fc8f4b6a271 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#26 0x00007fc8f4b6a5d5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#27 0x00007fc8f4b70059 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#28 0x00000000004093d0 in main (argc=<optimized out>, argv=<optimized out>) at /home/sander/okular/shell/main.cpp:64
Comment 4 Simone Gaiarin 2015-03-13 06:56:26 UTC
(In reply to Christoph Feck from comment #1)
> Do you get the crash dialog? If yes, please add the backtrace as a comment.
> For more information, please see
> https://techbase.kde.org/Development/Tutorials/Debugging/
> How_to_create_useful_crash_reports

I don't have the backtrace because manjaro do not compile applications with debug symbols.
Comment 5 Simone Gaiarin 2015-03-13 15:19:50 UTC
Ok. I've downloaded okular from the git repository and compiled it with:

cmake .. -DCMAKE_INSTALL_PREFIX=/mypath -DCMAKE_BUILD_TYPE=debugfull
make

This is the trace I get when the crash occurs.

It seems still unuseful. Is okular actually running the code in the test prefix where I've installed it or it's running code from /usr where my main system is installed?
I see that there are not debug symbols from the component /usr/lib/kde4/okularpart.so (which appear to be called from /usr).

I'm sorry but I'm not experienced with trace generation.

I think that my trace doesn't add anything to the one already provided by Oliver, but I wanted to try to generate a trace.


Application: Okular (okular), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe9aea47780 (LWP 7089))]

Thread 2 (Thread 0x7fe997a85700 (LWP 7090)):
#0  0x00007fe9aaa844ed in poll () from /usr/lib/libc.so.6
#1  0x00007fe9a7f80c94 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fe9a7f80dac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fe9abbc1397 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007fe9abb90de1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007fe9abb91145 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007fe9aba857f9 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007fe9abb716c3 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007fe9aba8805f in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fe9ab7f6374 in start_thread () from /usr/lib/libpthread.so.0
#10 0x00007fe9aaa8d27d in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fe9aea47780 (LWP 7089)):
[KCrash Handler]
#6  0x00007fe99ce5f980 in ?? () from /usr/lib/kde4/okularpart.so
#7  0x00007fe99ce56ce2 in ?? () from /usr/lib/kde4/okularpart.so
#8  0x00007fe9ac600787 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#9  0x00007fe9ac9bff7e in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#10 0x00007fe99ce5c346 in ?? () from /usr/lib/kde4/okularpart.so
#11 0x00007fe9abb923f6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#12 0x00007fe9ac5ac98c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#13 0x00007fe9ac5b356f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#14 0x00007fe9ad57925a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#15 0x00007fe9abb9228d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#16 0x00007fe9ac5b2bcf in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#17 0x00007fe9ac6297a2 in ?? () from /usr/lib/libQtGui.so.4
#18 0x00007fe9ac62819c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#19 0x00007fe9ac6502e2 in ?? () from /usr/lib/libQtGui.so.4
#20 0x00007fe9a7f80a0d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#21 0x00007fe9a7f80cf8 in ?? () from /usr/lib/libglib-2.0.so.0
#22 0x00007fe9a7f80dac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#23 0x00007fe9abbc137d in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#24 0x00007fe9ac6503a6 in ?? () from /usr/lib/libQtGui.so.4
#25 0x00007fe9abb90de1 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#26 0x00007fe9abb91145 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#27 0x00007fe9abb966e9 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#28 0x0000000000409dbc in main (argc=1, argv=0x7fff6d69c5c8) at /media/dataHD/development/kde/bugs/okular/shell/main.cpp:64
Comment 6 Albert Astals Cid 2015-03-13 22:26:53 UTC
Git commit 9c98ac0f8b52b4005a272097078f1a396bd36d14 by Albert Astals Cid.
Committed on 13/03/2015 at 22:26.
Pushed by aacid into branch 'Applications/15.04'.

Always release annotation on mouse release
FIXED-IN: KDE Applications 15.04 Beta 3

M  +9    -9    ui/pageview.cpp

http://commits.kde.org/okular/9c98ac0f8b52b4005a272097078f1a396bd36d14