https://bugs.kde.org/show_bug.cgi?id=378696
Bug ID: 378696 Summary: Selecting annotation and reloading file crashes Okular Product: okular Version: 1.0.0 Platform: Other OS: Linux Status: UNCONFIRMED Severity: crash Priority: NOR Component: PDF backend Assignee: okular-devel@kde.org Reporter: oliver.san...@tu-dresden.de Target Milestone: --- Created attachment 104988 --> https://bugs.kde.org/attachment.cgi?id=104988&action=edit Example pdf file with a single annotation The attached sample file contains nothing but a single freetext annotation. It was created using LaTeX and the pdfcomment package. 1) Open the file in Okular 2) Click on the annotation 3) Press F5 to reload the file 4) -> Okular segfaults reproducibly This happens with the current git master. The backtrace is Thread 1 "okular" received signal SIGSEGV, Segmentation fault. 0x00007fffd70d684b in Okular::AnnotationUtils::annotationGeometry (ann=0x555555ebec70, scaledWidth=256, scaledHeight=213461900) at /home/sander/okular/core/annotations.cpp:158 158 if ( ann->subType() == Annotation::AText && ( ( (TextAnnotation*)ann )->textType() == TextAnnotation::Linked ) ) (gdb) bt #0 0x00007fffd70d684b in Okular::AnnotationUtils::annotationGeometry (ann=0x555555ebec70, scaledWidth=256, scaledHeight=213461900) at /home/sander/okular/core/annotations.cpp:158 #1 0x00007fffd74f86bd in MouseAnnotation::routePaint (this=0x555555becf90, painter=0x7fffffffac98, paintRect=...) at /home/sander/okular/ui/pageviewmouseannotation.cpp:275 #2 0x00007fffd750502e in PageView::paintEvent (this=0x555555bf5e10, pe=0x7fffffffb230) at /home/sander/okular/ui/pageview.cpp:1757 #3 0x00007ffff4945278 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #4 0x00007ffff4a2da0e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #5 0x00007fffd750dd32 in PageView::viewportEvent (this=0x555555bf5e10, e=0x7fffffffb230) at /home/sander/okular/ui/pageview.cpp:3318 #6 0x00007ffff3f8e741 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #7 0x00007ffff48fdb65 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #8 0x00007ffff4905341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #9 0x00007ffff3f8e9e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #10 0x00007ffff493dfda in QWidgetPrivate::sendPaintEvent(QRegion const&) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #11 0x00007ffff493e646 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #12 0x00007ffff493f34c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #13 0x00007ffff493f239 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #14 0x00007ffff493e1a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007ffff493f34c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007ffff493f239 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #17 0x00007ffff493e1a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007ffff493f34c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #19 0x00007ffff493e1a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #20 0x00007ffff493f34c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007ffff493e1a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #22 0x00007ffff493f34c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #23 0x00007ffff493e1a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #24 0x00007ffff493f34c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #25 0x00007ffff493e1a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #26 0x00007ffff493f34c in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #27 0x00007ffff493e1a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #28 0x00007ffff490df8a in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #29 0x00007ffff490e147 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #30 0x00007ffff492cf8f in QWidgetPrivate::syncBackingStore() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #31 0x00007ffff4945348 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #32 0x00007ffff4a4492b in QMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #33 0x00007ffff6dc8097 in KMainWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5 #34 0x00007ffff6e0cbb5 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libKF5XmlGui.so.5 #35 0x00007ffff48fdb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #36 0x00007ffff4905341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #37 0x00007ffff3f8e9e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #38 0x00007ffff490e965 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #39 0x00007ffff490f62d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #40 0x00007ffff492f9c8 in QWidget::repaint(QRect const&) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #41 0x00007fffd750de67 in PageView::scrollContentsBy (this=0x555555bf5e10, dx=0, dy=1) at /home/sander/okular/ui/pageview.cpp:3330 #42 0x00007ffff4ab65e1 in QAbstractScrollAreaPrivate::_q_vslide(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #43 0x00007ffff3fba5e9 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #44 0x00007ffff49e947e in QAbstractSlider::valueChanged(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #45 0x00007ffff49e9b0b in QAbstractSlider::setValue(int) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #46 0x00007fffd75126e5 in PageView::scrollTo (this=0x555555bf5e10, x=0, y=4) at /home/sander/okular/ui/pageview.cpp:4148 #47 0x00007fffd7512621 in PageView::center (this=0x555555bf5e10, cx=688, cy=503) at /home/sander/okular/ui/pageview.cpp:4135 #48 0x00007fffd7502fc8 in PageView::slotRealNotifyViewportChanged (this=0x555555bf5e10, smoothMove=false) at /home/sander/okular/ui/pageview.cpp:1279 #49 0x00007fffd7517dba in PageView::qt_static_metacall (_o=0x555555bf5e10, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x555555e5f2e0) at /home/sander/okular/build/moc_pageview.cpp:301 #50 0x00007ffff3fbb499 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #51 0x00007ffff494546b in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #52 0x00007ffff4a2da0e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #53 0x00007ffff4ab6e03 in QAbstractScrollArea::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #54 0x00007fffd7503bc2 in PageView::event (this=0x555555bf5e10, event=0x555555eb8a90) at /home/sander/okular/ui/pageview.cpp:1512 #55 0x00007ffff48fdb8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #56 0x00007ffff4905341 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #57 0x00007ffff3f8e9e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #58 0x00007ffff3f9116d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #59 0x00007ffff3fe2c43 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #60 0x00007fffef1f47f7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #61 0x00007fffef1f4a60 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #62 0x00007fffef1f4b0c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #63 0x00007ffff3fe304f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #64 0x00007ffff3f8c9ca in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #65 0x00007ffff3f9513c in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #66 0x0000555555561308 in main (argc=2, argv=0x7fffffffe0d8) at /home/sander/okular/shell/main.cpp:85 -- You are receiving this mail because: You are the assignee for the bug.