Summary: | okular crashed after automatic reload of file | ||
---|---|---|---|
Product: | [Applications] okular | Reporter: | Thomas Rehn <kde> |
Component: | general | Assignee: | Okular developers <okular-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | vcunat |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Thomas Rehn
2009-10-27 16:31:21 UTC
Does this happen with a particular dvi or all? Can you share one that has the problem? I've notices this problem only with one specific dvi file, but this means nothing because I don't use reload on any other file. It's difficult to reproduce the problem. I just has the situation that neither automatic nor manual reload worked on my dvi file and I had to kill okular again. After I restarted okular, both automatic reload (`touch`ing the file) and manual reload did work again. If you could share the file that generates the dvi it would be good since i've been trying to reach this state of reloading not working but i have not achieved it By some kind of manual fuzzing (I ran latex on my existing document in an infinite loop and made parallel many changes to the document) I eventually managed to crash Okular during page reload. One of the two crashes I was able to produce this way has a different stacktrace which I attach to this post. If you like I can send you my LaTeX document that I have used to produce the crash by private email. I don't want it to be on the internet yet :) Thread 1 (Thread 0xb785e700 (LWP 10689)): [KCrash Handler] #6 QBasicAtomicInt::operator!= (this=0xa39b7d0, job=0xa267470) at /usr/include/qt4/QtCore/qbasicatomic.h:69 #7 QMap<int, Okular::PagePrivate::PixmapObject>::detach (this=0xa39b7d0, job=0xa267470) at /usr/include/qt4/QtCore/qmap.h:172 #8 QMap<int, Okular::PagePrivate::PixmapObject>::find (this=0xa39b7d0, job=0xa267470) at /usr/include/qt4/QtCore/qmap.h:565 #9 Okular::PagePrivate::imageRotationDone (this=0xa39b7d0, job=0xa267470) at ../../okular/core/page.cpp:87 #10 0x0138b045 in Okular::PageController::imageRotationDone (this=0x9af5be8, j=0xa267470) at ../../okular/core/pagecontroller.cpp:53 #11 0x0138b12c in Okular::PageController::qt_metacall (this=0x9af5be8, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbfa53c18) at ./pagecontroller_p.moc:72 #12 0x00f7c263 in QMetaObject::activate (sender=0xa4d22b8, from_signal_index=6, to_signal_index=6, argv=0xbfa53c18) at kernel/qobject.cpp:3113 #13 0x00f7cec2 in QMetaObject::activate (sender=0xa4d22b8, m=0x10e2620, local_signal_index=2, argv=0xbfa53c18) at kernel/qobject.cpp:3187 #14 0x010d7833 in ThreadWeaver::WeaverInterface::jobDone (this=0xa4d22b8, _t1=0xa267470) at ./WeaverInterface.moc:99 #15 0x010d795f in ThreadWeaver::WeaverInterface::qt_metacall (this=0xa4d22b8, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbfa53d58) at ./WeaverInterface.moc:74 #16 0x010d7d22 in ThreadWeaver::Weaver::qt_metacall (this=0xa4d22b8, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbfa53d58) at ./ThreadWeaver.moc:58 #17 0x00f7c263 in QMetaObject::activate (sender=0x9d667c8, from_signal_index=6, to_signal_index=6, argv=0xbfa53d58) at kernel/qobject.cpp:3113 #18 0x00f7cec2 in QMetaObject::activate (sender=0x9d667c8, m=0x10e2620, local_signal_index=2, argv=0xbfa53d58) at kernel/qobject.cpp:3187 #19 0x010d7833 in ThreadWeaver::WeaverInterface::jobDone (this=0x9d667c8, _t1=0xa267470) at ./WeaverInterface.moc:99 #20 0x010d795f in ThreadWeaver::WeaverInterface::qt_metacall (this=0x9d667c8, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xa4a2818) at ./WeaverInterface.moc:74 #21 0x010d83ea in ThreadWeaver::WeaverImpl::qt_metacall (this=0x9d667c8, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xa4a2818) at ./WeaverImpl.moc:70 #22 0x00f74f0b in QMetaCallEvent::placeMetaCall (this=0xa2d04f0, object=0x9d667c8) at kernel/qobject.cpp:477 #23 0x00f765fe in QObject::event (this=0x9d667c8, e=0xa2d04f0) at kernel/qobject.cpp:1111 #24 0x088cdf54 in QApplicationPrivate::notify_helper (this=0x9a0e4f8, receiver=0x9d667c8, e=0xa2d04f0) at kernel/qapplication.cpp:4056 #25 0x088d567c in QApplication::notify (this=0xbfa545f8, receiver=0x9d667c8, e=0xa2d04f0) at kernel/qapplication.cpp:3603 #26 0x00830bfa in KApplication::notify (this=0xbfa545f8, receiver=0x9d667c8, event=0xa2d04f0) at ../../kdeui/kernel/kapplication.cpp:302 #27 0x00f666cb in QCoreApplication::notifyInternal (this=0xbfa545f8, receiver=0x9d667c8, event=0xa2d04f0) at kernel/qcoreapplication.cpp:610 #28 0x00f672b2 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x99f8e48) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213 #29 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x99f8e48) at kernel/qcoreapplication.cpp:1247 #30 0x00f6747d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1140 #31 0x00f913ff in QCoreApplication::sendPostedEvents (s=0x9a10910) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218 #32 postEventSourceDispatch (s=0x9a10910) at kernel/qeventdispatcher_glib.cpp:210 #33 0x08597e78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #34 0x0859b720 in ?? () from /lib/libglib-2.0.so.0 #35 0x0859b853 in g_main_context_iteration () from /lib/libglib-2.0.so.0 #36 0x00f9102c in QEventDispatcherGlib::processEvents (this=0x99f8a30, flags=...) at kernel/qeventdispatcher_glib.cpp:327 #37 0x0896ebe5 in QGuiEventDispatcherGlib::processEvents (this=0x99f8a30, flags=...) at kernel/qguieventdispatcher_glib.cpp:202 #38 0x00f64c79 in QEventLoop::processEvents (this=0xbfa544f4, flags=) at kernel/qeventloop.cpp:149 #39 0x00f650ca in QEventLoop::exec (this=0xbfa544f4, flags=...) at kernel/qeventloop.cpp:201 #40 0x00f6753f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888 #41 0x088cddd7 in QApplication::exec () at kernel/qapplication.cpp:3525 #42 0x0804eec9 in main (argc=5, argv=0xbfa547e4) at ../../../okular/shell/main.cpp:81 do you have your document rotated from the original orientation? No, it happened viewing a 'portrait'-style DVI file in (correct) 'portrait' orientation. I didn't change View/Orientation in Okular. Sorry to ask again, but are you sure? The Okular::PageController::imageRotationDone part of your stack trace makes me think you are. Are you sure you didn't rotate it once and forgot about it? What happens if you do View->Orientation->Original Orientation? Does it change the orientation? I never rotated the document. When I clicked View/Orientation/Original Orientation nothing changed. I have run some more fuzzing sessions and I got 2 crashes with the original stack trace of the bug and no crash with imageRotationDone. However, whenever fuzzing has not lead to a crash of Okular, it made the automatic reload stop and manual reload didn't work, as in the original description of this bug. Do you think you can create a script that automates the creation of the problem? Or else provide a very detailed step by step description of what you do to accomplish it? I have now an automated version of my case with two scripts that run in parallel. One adds words to a LaTeX document every second, the other calls latex on the document in an infinite loop. Then I open the resulting DVI file and observe the crashes or the bug. The crucial point is that I could not reproduce the bug with a "simple" document, containing only dummy text. As I already mentioned, I can provide the LaTeX document I work with by private email only, it is not ready for the internet yet. You can send it in private to me (tsdgeos@terra.es) and i promise to use it just to try to fix this bug and remove if afterwards. SVN commit 1047671 by aacid: empty the pixmaps queue stack before doing the loop waiting for executing pixmap requests to empty, otherwise a single shot timed call to sendGeneratorRequest can kick us in the back cause bad things to happen, ranging from crashes to the app waiting forever in the loop Patch provided by pino and tested by me BUG: 212066 M +9 -8 document.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1047671 SVN commit 1047675 by aacid: backport r1047671 okular/trunk/KDE/kdegraphics/okular/core/document.cpp: empty the pixmaps queue stack before doing the loop waiting for executing pixmap requests to empty, otherwise a single shot timed call to sendGeneratorRequest can kick us in the back cause bad things to happen, ranging from crashes to the app waiting forever in the loop Patch provided by pino and tested by me BUG: 212066 M +9 -8 document.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1047675 In which release is the bug fixed? I probably reproduced it on 4.4.1. Couldn't it be connected to bug #232314? Application: Okular (okular), signal: Segmentation fault [KCrash Handler] #6 0xb327af59 in Okular::Page::setPixmap (this=0x9c71050, id=4, pixmap=0xafa13488) at /var/tmp/paludis/kde-base-okular-4.4.1/work/okular-4.4.1/okular/core/page.cpp:426 #7 0xb32766b3 in Okular::GeneratorPrivate::pixmapGenerationFinished (this=0x999f078) at /var/tmp/paludis/kde-base-okular-4.4.1/work/okular-4.4.1/okular/core/generator.cpp:102 #8 0xb32767cb in Okular::Generator::qt_metacall (this=0x999de10, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x99f75d0) at /var/tmp/paludis/kde-base-okular-4.4.1/work/okular-4.4.1_build/okular/generator.moc:93 #9 0xb1b2ef62 in DviGenerator::qt_metacall (this=0x999de10, _c=QMetaObject::InvokeMetaMethod, _id=9, _a=0x99f75d0) at /var/tmp/paludis/kde-base-okular-4.4.1/work/okular-4.4.1_build/okular/generators/dvi/generator_dvi.moc:66 #10 0xb6b461ed in QMetaObject::metacall (object=0xb6980ff4, cl=QMetaObject::InvokeMetaMethod, idx=9, argv=0x99f75d0) at kernel/qmetaobject.cpp:237 #11 0xb6b50974 in QMetaCallEvent::placeMetaCall (this=0x9d345a0, object=0x999de10) at kernel/qobject.cpp:561 #12 0xb6b51f43 in QObject::event (this=0x999de10, e=0x9d345a0) at kernel/qobject.cpp:1240 #13 0xb6013f1c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/qt4/libQtGui.so.4 #14 0xb601b98c in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt4/libQtGui.so.4 #15 0xb715d5ed in KApplication::notify (this=0xbfb16d30, receiver=0x999de10, event=0x9d345a0) at /var/tmp/paludis/kde-base-kdelibs-4.4.1-r1/work/kdelibs-4.4.1/kdeui/kernel/kapplication.cpp:302 #16 0xb6b40dc2 in QCoreApplication::notifyInternal (this=0xbfb16d30, receiver=0x999de10, event=0x9d345a0) at kernel/qcoreapplication.cpp:704 #17 0xb6b41cfe in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x9760038) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215 #18 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9760038) at kernel/qcoreapplication.cpp:1345 #19 0xb6b41ead in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1238 #20 0xb6b6d47d in QCoreApplication::sendPostedEvents (s=0x97712a8) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220 #21 postEventSourceDispatch (s=0x97712a8) at kernel/qeventdispatcher_glib.cpp:276 #22 0xb58d889f in g_main_dispatch (context=0x9770820) at gmain.c:1960 #23 IA__g_main_context_dispatch (context=0x9770820) at gmain.c:2513 #24 0xb58dc10b in g_main_context_iterate (context=0x9770820, block=1, dispatch=1, self=0x976dbc0) at gmain.c:2591 #25 0xb58dc298 in IA__g_main_context_iteration (context=0x9770820, may_block=1) at gmain.c:2654 #26 0xb6b6cf91 in QEventDispatcherGlib::processEvents (this=0x976e4e0, flags=...) at kernel/qeventdispatcher_glib.cpp:412 #27 0xb60d700a in ?? () from /usr/lib/qt4/libQtGui.so.4 #28 0xb6b3f3ea in QEventLoop::processEvents (this=0xbfb16ce0, flags=...) at kernel/qeventloop.cpp:149 #29 0xb6b3f84a in QEventLoop::exec (this=0xbfb16ce0, flags=...) at kernel/qeventloop.cpp:201 #30 0xb6b41f77 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #31 0xb6013fc4 in QApplication::exec() () from /usr/lib/qt4/libQtGui.so.4 #32 0x0804f4e0 in main (argc=11154020, argv=0xb6f85d88) at /var/tmp/paludis/kde-base-okular-4.4.1/work/okular-4.4.1/okular/shell/main.cpp:82 |