Bug 155317 - crash while updating dvi file that was regenerated
Summary: crash while updating dvi file that was regenerated
Alias: None
Product: okular
Classification: Applications
Component: DVI backend (show other bugs)
Version: 0.6
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
Depends on:
Reported: 2008-01-09 02:00 UTC by Frederik Schwarzer
Modified: 2008-02-27 01:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Frederik Schwarzer 2008-01-09 02:00:01 UTC
Version:           0.6 (using KDE Devel)
Installed from:    Compiled sources

The situation:
I have a dvi file opened that I created with latex.
Now I work on the latex document and rerun the latex command to create the new dvi file.
In one of ~20 cases, Okular crashes here while updating the document with the following backtrace.
I hope it helps:

Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb65366c0 (LWP 3529)]
[New Thread 0xb2b9cb90 (LWP 3530)]
[KCrash handler]
#6  0xb66dea9f in FT_List_Find () from /usr/lib/libfreetype.so.6
#7  0xb66df329 in FT_Done_Face () from /usr/lib/libfreetype.so.6
#8  0xb2bccfb4 in ~TeXFont_PFB (this=0x842dee0)
    at /root/kde/src/KDE/kdegraphics/okular/generators/dvi/TeXFont_PFB.cpp:135
#9  0xb2bcb366 in ~TeXFontDefinition (this=0x83244c0)
    at /root/kde/src/KDE/kdegraphics/okular/generators/dvi/TeXFontDefinition.cpp:67
#10 0xb2bda66e in Q3PtrList<TeXFontDefinition>::deleteItem (this=0x83565f0, 
    d=0x83244c0) at /usr/include/qt4/Qt3Support/q3ptrlist.h:153
#11 0xb320b71a in Q3GList::clear () from /usr/lib/libQt3Support.so.4
#12 0xb2bda279 in Q3PtrList<TeXFontDefinition>::clear (this=0x83565f0)
    at /usr/include/qt4/Qt3Support/q3ptrlist.h:96
#13 0xb2bda5c6 in ~Q3PtrList (this=0x83565f0)
    at /usr/include/qt4/Qt3Support/q3ptrlist.h:73
#14 0xb2bd979e in ~fontPool (this=0x83565e8)
    at /root/kde/src/KDE/kdegraphics/okular/generators/dvi/fontpool.cpp:115
#15 0xb2bb14e1 in ~dviRenderer (this=0x83565c8)
    at /root/kde/src/KDE/kdegraphics/okular/generators/dvi/dviRenderer.cpp:92
#16 0xb2baa412 in DviGenerator::doCloseDocument (this=0x83f3b48)
    at /root/kde/src/KDE/kdegraphics/okular/generators/dvi/generator_dvi.cpp:88
#17 0xb4bd7ab8 in Okular::Generator::closeDocument (this=0x83f3b48)
    at /root/kde/src/KDE/kdegraphics/okular/core/generator.cpp:182
#18 0xb4bc3fda in Okular::Document::closeDocument (this=0x818b618)
    at /root/kde/src/KDE/kdegraphics/okular/core/document.cpp:1309
#19 0xb4c3781c in Part::closeUrl (this=0x816dcf8)
    at /root/kde/src/KDE/kdegraphics/okular/part.cpp:866
#20 0xb76d2307 in KParts::ReadOnlyPart::openUrl (this=0x816dcf8, 
    url=@0xbfa48a74) at /root/kde/src/KDE/kdelibs/kparts/part.cpp:533
#21 0xb4c36e95 in Part::slotDoFileDirty (this=0x816dcf8)
    at /root/kde/src/KDE/kdegraphics/okular/part.cpp:936
#22 0xb4c3892b in Part::qt_metacall (this=0x816dcf8, 
    _c=QMetaObject::InvokeMetaMethod, _id=51, _a=0xbfa48f48)
    at /root/kde/build/KDE/kdegraphics/okular/part.moc:217
#23 0xb7f25e0a in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#24 0xb7f269c2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#25 0xb7f44217 in QTimer::timeout () from /usr/lib/libQtCore.so.4
#26 0xb7f2c98e in QTimer::timerEvent () from /usr/lib/libQtCore.so.4
#27 0xb7f24a64 in QObject::event () from /usr/lib/libQtCore.so.4
#28 0xb6c6321d in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#29 0xb6c66c77 in QApplication::notify () from /usr/lib/libQtGui.so.4
#30 0xb7abd871 in KApplication::notify (this=0xbfa49638, receiver=0x81ea110, 
    at /root/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:314
#31 0xb7f12ffb in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#32 0xb7f39f79 in ?? () from /usr/lib/libQtCore.so.4
#33 0xbfa49638 in ?? ()
#34 0x081ea110 in ?? ()
#35 0xbfa493f8 in ?? ()
#36 0xb688cee5 in ?? () from /usr/lib/libgthread-2.0.so.0
#37 0x00000001 in ?? ()
#38 0x081ea110 in ?? ()
#39 0x00000001 in ?? ()
#40 0x00000004 in ?? ()
#41 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()
Comment 1 Oliver Putz 2008-01-31 01:24:46 UTC
I am not 100% sure if this is the right place, but I think I just experienced this bug. I recompiled a *.dvi file that was opened in an okular instance and as I tried to reload the okular docuement three or four times (hitting F5 pretty fast), it crashed. However, my backtrace is completely different from the one posted above...

Application: Okular (okular), signal SIGSEGV
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb6595990 (LWP 22527)]
[KCrash handler]
#6  0xb5080039 in Okular::Page::setPixmap (this=0x82d29e8, id=3, 
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics-9999.4/okular/core/page.cpp:371
#7  0xb3a2dcb2 in PDFGenerator::threadFinished (this=0x8232e38)
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics-9999.4/okular/generators/poppler/generator_pdf.cpp:1588
#8  0xb3a2de73 in PDFGenerator::qt_metacall (this=0x8232e38, 
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x824fab0)
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics_build/okular/generators/poppler/generator_pdf.moc:74
#9  0xb7f2f2f9 in QMetaCallEvent::placeMetaCall (this=0x81ed198, 
    object=0x8232e38) at kernel/qobject.cpp:536
#10 0xb7f32017 in QObject::event (this=0x8232e38, e=0x8105d90)
    at kernel/qobject.cpp:1122
#11 0xb6af1e8a in QApplicationPrivate::notify_helper (this=0x8060238, 
    receiver=0x8232e38, e=0x81ed198) at kernel/qapplication.cpp:3556
#12 0xb6af377a in QApplication::notify (this=0xbfbb7b58, receiver=0x8232e38, 
    e=0x81ed198) at kernel/qapplication.cpp:3115
#13 0xb7aa2b93 in KApplication::notify (this=0xbfbb7b58, receiver=0x8232e38, 
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kdeui/kernel/kapplication.cpp:311
#14 0xb7f20d7b in QCoreApplication::notifyInternal (this=0xbfbb7b58, 
    receiver=0x8232e38, event=0x81ed198) at kernel/qcoreapplication.cpp:530
#15 0xb7f2221a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, 
    event_type=0, data=0x8056e50) at kernel/qcoreapplication.h:200
#16 0xb7f4a905 in QEventDispatcherUNIX::processEvents (this=0x80603a8, 
    flags=@0xbfbb7a78) at kernel/qeventdispatcher_unix.cpp:858
#17 0xb6b7bcce in QEventDispatcherX11::processEvents (this=0x80603a8, 
    flags=@0xbfbb7aa4) at kernel/qeventdispatcher_x11.cpp:145
#18 0xb7f20191 in QEventLoop::processEvents (this=0xbfbb7b10, 
    flags=@0xbfbb7ad8) at kernel/qeventloop.cpp:140
#19 0xb7f2029a in QEventLoop::exec (this=0xbfbb7b10, flags=@0xbfbb7b18)
    at kernel/qeventloop.cpp:186
#20 0xb7f22626 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:759
#21 0xb6af1487 in QApplication::exec () at kernel/qapplication.cpp:3053
#22 0x0804e6e5 in main (argc=-1232354816, argv=0x0)
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics-9999.4/okular/shell/main.cpp:60
#23 0xb67a3fdc in __libc_start_main (main=0x804e2e0 <main>, argc=6, 
    ubp_av=0xbfbb7c84, init=0x80515d0 <__libc_csu_init>, 
    fini=0x80515c0 <__libc_csu_fini>, rtld_fini=0xb7fe4100 <_dl_fini>, 
    stack_end=0xbfbb7c7c) at libc-start.c:229
#24 0x0804e251 in _start ()
#0  0xffffe410 in __kernel_vsyscall ()
Comment 2 Pino Toscano 2008-02-01 01:47:33 UTC
> I am not 100% sure if this is the right place, but I think I just experienced this bug.

It's not, but it should be fixed now.
Comment 3 Pino Toscano 2008-02-27 01:42:03 UTC
SVN commit 779799 by pino:

Make sure to unload the fonts before unloading freetype. Otherwise the freetype fonts can use the (unloaded in the meanwhile) freetype, and bad things happen.

BUG: 155317

 M  +3 -0      fontpool.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=779799
Comment 4 Pino Toscano 2008-02-27 01:42:07 UTC
SVN commit 779800 by pino:

Backport: make sure to unload the fonts before unloading freetype.

CCBUG: 155317

 M  +3 -0      fontpool.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=779800