Bug 189623 - okular crashes when refresh compiling DVI files
Summary: okular crashes when refresh compiling DVI files
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: DVI backend (show other bugs)
Version: 0.8.2
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-14 16:42 UTC by Laurent Claessens
Modified: 2009-07-25 18:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace (3.67 KB, text/plain)
2009-04-26 22:56 UTC, Laurent Claessens
Details
A LaTeX file which makes crash Okular when compiling (597 bytes, text/x-tex)
2009-05-04 23:01 UTC, Laurent Claessens
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Claessens 2009-04-14 16:42:34 UTC
Version:           0.8.2 (using 4.2.2 (KDE 4.2.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.28-11-generic

Bug first reported on the Ubuntu's launchpad
https://bugs.launchpad.net/ubuntu/+source/kdegraphics/+bug/360647
(there is a traceback there)

1. Open a large DVI file with Okular (see an example of LaTeX source file bellow)
 2. Compile the tex file
 3. Okular crashes when refresh under certain conditions.

At a certain point during the compilation, Okular remarks that the DVI is being changed. So it empty the content of the DVI being on screen (normal behaviour).
 At that point, if the LaTeX compilation still last some seconds, Okular crashes.
I can reproduce the bug "at will" with the following trick :

------ Structure of a LaTeX file -----------
<Big LaTeX document (around 70 pages)>
\input{foo.tex}
\end{document}
------------ end -----------------
I suppose that the "big file" is just enough in order Okular to set itself in the "waiting" mode.
\input produces an error which stops the compilation until I react.
 If I react sufficiently rapidly, no crash.
 If I leave some seconds without answering, Okular crashes.
It seems to be really a matter of TIME between the moment Okular sees that the DVI is being changed and the moment where the DVI is actually finished.
Comment 1 Laurent Claessens 2009-04-25 14:05:31 UTC
Here is the output in the terminal :

First : 
okular(15814): Attempt to use QAction "bookmark_action_0" with KXMLGUIFactory!
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )

During the compilation of the big document :
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )

... and finally when it crashes :
KCrash: Application 'okular' crashing...
sock_file=/home/kusbiste/.kde/socket-geodiff-pc8/kdeinit4__0


A crash manager is automatically launched, but it complains that the backtrace is probably not enough. Here is :

(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb5fe8700 (LWP 15814)]
[New Thread 0xb2b91b90 (LWP 15815)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb7ff6430 in __kernel_vsyscall ()
[Current thread is 0 (LWP 15814)]

Thread 2 (Thread 0xb2b91b90 (LWP 15815)):
#0  0xb7ff6430 in __kernel_vsyscall ()
#1  0xb67957b1 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7458380 in ?? () from /usr/lib/libQtCore.so.4
#3  0xb738696e in ?? () from /usr/lib/libQtCore.so.4
#4  0xb64234ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb679d49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb5fe8700 (LWP 15814)):
#0  0xb7ff6430 in __kernel_vsyscall ()
#1  0xb67587a6 in nanosleep () from /lib/tls/i686/cmov/libc.so.6
#2  0xb67585be in sleep () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7a8f8b2 in ?? () from /usr/lib/libkdeui.so.5
#4  0xb7a90274 in KCrash::defaultCrashHandler () from /usr/lib/libkdeui.so.5
#5  <signal handler called>
#6  0xb2eddd82 in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#7  0xb2ef4b3f in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#8  0xb2ef52cc in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#9  0xb2edfbb5 in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#10 0xb2edc21a in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#11 0xb476d761 in ?? () from /usr/lib/libokularcore.so.1
#12 0xb477b58d in Okular::Document::openDocument () from /usr/lib/libokularcore.so.1
#13 0xb47fe1a4 in ?? () from /usr/lib/kde4/okularpart.so
#14 0xb7fb896a in KParts::ReadOnlyPart::openUrl () from /usr/lib/libkparts.so.4
#15 0xb4806fcf in ?? () from /usr/lib/kde4/okularpart.so
#16 0xb4807ba2 in ?? () from /usr/lib/kde4/okularpart.so
#17 0xb7490ca8 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#18 0xb7491932 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#19 0xb74cc717 in QTimer::timeout () from /usr/lib/libQtCore.so.4
#20 0xb74966fe in QTimer::timerEvent () from /usr/lib/libQtCore.so.4
#21 0xb748b15f in QObject::event () from /usr/lib/libQtCore.so.4
#22 0xb6a81f2c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#23 0xb6a8a22e in QApplication::notify () from /usr/lib/libQtGui.so.4
#24 0xb7a1f94d in KApplication::notify () from /usr/lib/libkdeui.so.5
#25 0xb747aa3b in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#26 0xb74a9d71 in ?? () from /usr/lib/libQtCore.so.4
#27 0xb74a64e0 in ?? () from /usr/lib/libQtCore.so.4
#28 0xb6352b88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0xb63560eb in ?? () from /usr/lib/libglib-2.0.so.0
#30 0xb6356268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0xb74a6438 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#32 0xb6b233f5 in ?? () from /usr/lib/libQtGui.so.4
#33 0xb747906a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#34 0xb74794aa in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#35 0xb747b959 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#36 0xb6a81da7 in QApplication::exec () from /usr/lib/libQtGui.so.4
#37 0x0804e457 in _start ()
#0  0xb7ff6430 in __kernel_vsyscall ()


The crash occures with DVI files while PDF files are safe.
Comment 2 Albert Astals Cid 2009-04-26 22:14:30 UTC
Please have a look at http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
Comment 3 Albert Astals Cid 2009-04-26 22:15:22 UTC
Please have a look at http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports
The backtrace is not of much use as it is now
Comment 4 Laurent Claessens 2009-04-26 22:56:29 UTC
Created attachment 33140 [details]
backtrace

Produced by gbd
Comment 5 Laurent Claessens 2009-04-26 23:10:17 UTC
(In reply to comment #4)

I read too late that I have to paste instead of attach the backtrace. Sorry for that.



---%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<--

(gdb) thread apply all backtrace

Thread 2 (Thread 0xb2a91b90 (LWP 16503)):
#0  0xb7ef7430 in __kernel_vsyscall ()   
#1  0xb66967b1 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7359380 in QProcessManager::run (this=0x9b85728) at io/qprocess_unix.cpp:305
#3  0xb728796e in QThreadPrivate::start (arg=0x9b85728) at thread/qthread_unix.cpp:189
#4  0xb63244ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0             
#5  0xb669e49e in clone () from /lib/tls/i686/cmov/libc.so.6                          

Thread 1 (Thread 0xb5ee9700 (LWP 16499)):
#0  0xb2dddd82 in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#1  0xb2df4b3f in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#2  0xb2df52cc in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#3  0xb2ddfbb5 in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#4  0xb2ddc21a in ?? () from /usr/lib/kde4/okularGenerator_dvi.so
#5  0xb466e761 in ?? () from /usr/lib/libokularcore.so.1
#6  0xb467bc14 in Okular::Document::openDocument () from /usr/lib/libokularcore.so.1
#7  0xb46ff1a4 in ?? () from /usr/lib/kde4/okularpart.so
#8  0xb7eb996a in KParts::ReadOnlyPart::openUrl (this=0x9c29b48, url=@0xbfc12288)
    at /build/buildd/kde4libs-4.2.2/kparts/part.cpp:558
#9  0xb4707fcf in ?? () from /usr/lib/kde4/okularpart.so
#10 0xb4708ba2 in ?? () from /usr/lib/kde4/okularpart.so
#11 0xb7391ca8 in QMetaObject::activate (sender=0x9e283d0, from_signal_index=4, to_signal_index=4, argv=0x0)
    at kernel/qobject.cpp:3069
#12 0xb7392932 in QMetaObject::activate (sender=0x9e283d0, m=0xb746e904, local_signal_index=0, argv=0x0)
    at kernel/qobject.cpp:3143
#13 0xb73cd717 in QTimer::timeout (this=0x9e283d0) at .moc/release-shared/moc_qtimer.cpp:128
#14 0xb73976fe in QTimer::timerEvent (this=0x9e283d0, e=0xbfc127dc) at kernel/qtimer.cpp:261
#15 0xb738c15f in QObject::event (this=0x9e283d0, e=0xbfc127dc) at kernel/qobject.cpp:1082
#16 0xb6982f2c in QApplicationPrivate::notify_helper (this=0x9b82418, receiver=0x9e283d0, e=0xbfc127dc)
    at kernel/qapplication.cpp:4084
#17 0xb698b22e in QApplication::notify (this=0xbfc12acc, receiver=0x9e283d0, e=0xbfc127dc)
    at kernel/qapplication.cpp:3631
#18 0xb792094d in KApplication::notify (this=0xbfc12acc, receiver=0x9e283d0, event=0xbfc127dc)
    at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307
#19 0xb737ba3b in QCoreApplication::notifyInternal (this=0xbfc12acc, receiver=0x9e283d0, event=0xbfc127dc)
    at kernel/qcoreapplication.cpp:602
#20 0xb73aad71 in QTimerInfoList::activateTimers (this=0x9b85534)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#21 0xb73a74e0 in timerSourceDispatch (source=0x9b85500) at kernel/qeventdispatcher_glib.cpp:164
#22 0xb6253b88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#23 0xb62570eb in ?? () from /usr/lib/libglib-2.0.so.0
#24 0xb6257268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0xb73a7438 in QEventDispatcherGlib::processEvents (this=0x9b70190, flags={i = -1077860008})
    at kernel/qeventdispatcher_glib.cpp:323
#26 0xb6a243f5 in QGuiEventDispatcherGlib::processEvents (this=0x9b70190, flags={i = -1077859960})
    at kernel/qguieventdispatcher_glib.cpp:202
#27 0xb737a06a in QEventLoop::processEvents (this=0xbfc12a00, flags={i = -1077859896}) at kernel/qeventloop.cpp:149
#28 0xb737a4aa in QEventLoop::exec (this=0xbfc12a00, flags={i = -1077859832}) at kernel/qeventloop.cpp:200
#29 0xb737c959 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#30 0xb6982da7 in QApplication::exec () at kernel/qapplication.cpp:3553
#31 0x0804e457 in _start ()

---%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<-----%<--
Comment 6 Albert Astals Cid 2009-04-26 23:41:57 UTC
Still not useful, see all that 
 ?? () from /usr/lib/kde4/okularGenerator_dvi.so
please install kdegraphics-dbg package and post a new backtrace
Comment 7 Laurent Claessens 2009-04-27 00:06:53 UTC
The gdb's output up to crash
 
----------------------------------------------

(gdb) run                                                                                                                                          
Starting program: /usr/bin/okular                                                                                                                  
[Thread debugging using libthread_db enabled]                                                                                                      
[New Thread 0xb6033700 (LWP 19232)]                                                                                                                
okular(19232): Attempt to use QAction "bookmark_action_0" with KXMLGUIFactory!                                                                     
okular(19232) KSharedUiServerProxy::KSharedUiServerProxy: kuiserver registered                                                                     
okular(19232) KFilePlacesSharedBookmarks::slotBookmarksChanged: places bookmarks changed                                                           
okular(19232) KFilePlacesSharedBookmarks::slotSharedBookmarksChanged: shared bookmarks changed                                                     
okular(19232) KBookmarkManager::notifyChanged: KBookmarkManager::notifyChanged (  "" )                                                             
okular(19232) KFilePlacesSharedBookmarks::slotBookmarksChanged: places bookmarks changed                                                           
okular(19232) KFilePlacesSharedBookmarks::slotSharedBookmarksChanged: shared bookmarks changed                                                     
[New Thread 0xb27f6b90 (LWP 19238)]                                                                                                                
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )                                                                
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )                                                                
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )                                                                
Object::connect: No such slot fontProgressDialog::helpClickedSlot( const QString& )                                                                

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6033700 (LWP 19232)]        
bigEndianByteReader::readUINT8 (this=0x8a9b740) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/bigEndianByteReader.cpp:31
31      /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/bigEndianByteReader.cpp: No such file or directory.                  
        in /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/bigEndianByteReader.cpp 


--------------------------------------------------------------------------

The backtrace :

(gdb) thread apply all 

Thread 2 (Thread 0xb27f6b90 (LWP 19238)):
#0  0xb8041430 in __kernel_vsyscall ()   
#1  0xb67e07b1 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb74a3380 in QProcessManager::run (this=0x837a708) at io/qprocess_unix.cpp:305
#3  0xb73d196e in QThreadPrivate::start (arg=0x837a708) at thread/qthread_unix.cpp:189
#4  0xb646e4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0             
#5  0xb67e849e in clone () from /lib/tls/i686/cmov/libc.so.6                          

Thread 1 (Thread 0xb6033700 (LWP 19232)):
#0  bigEndianByteReader::readUINT8 (this=0x8a9b740) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/bigEndianByteReader.cpp:31
#1  0xb2b59b3f in dvifile::read_postamble (this=0x8a9b740) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviFile.cpp:167
#2  0xb2b5a2cc in dvifile (this=0x8a9b740, fname=@0xbfb5dc54, pool=0x9066240)
    at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviFile.cpp:308
#3  0xb2b44bb5 in dviRenderer::setFile (this=0x9066220, fname=@0xbfb5e0f8, base=@0xbfb5dcb8)
    at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviRenderer.cpp:467
#4  0xb2b4121a in DviGenerator::loadDocument (this=0x86f9980, fileName=@0xbfb5e0f8, pagesVector=@0x84526a4)
    at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/generator_dvi.cpp:70
#5  0xb47b8761 in Okular::DocumentPrivate::openDocumentInternal (this=0x84525f0, offer=@0xbfb5deb0, isstdin=false, docFile=@0xbfb5e0f8,
    filedata=@0xbfb5df30) at /build/buildd/kdegraphics-4.2.2/okular/core/document.cpp:643
#6  0xb47c5c14 in Okular::Document::openDocument (this=0x844ef30, docFile=@0xbfb5e0f8, url=@0xbfb5e06c, _mime=@0xbfb5e118)
    at /build/buildd/kdegraphics-4.2.2/okular/core/document.cpp:1593
#7  0xb48491a4 in Part::openFile (this=0x841ed00) at /build/buildd/kdegraphics-4.2.2/okular/part.cpp:877
#8  0xb800396a in KParts::ReadOnlyPart::openUrl (this=0x841ed00, url=@0xbfb5e218) at /build/buildd/kde4libs-4.2.2/kparts/part.cpp:558
#9  0xb4851fcf in Part::slotDoFileDirty (this=0x841ed00) at /build/buildd/kdegraphics-4.2.2/okular/part.cpp:1128
#10 0xb4852ba2 in Part::qt_metacall (this=0x841ed00, _c=QMetaObject::InvokeMetaMethod, _id=55, _a=0xbfb5e2e8)
    at /build/buildd/kdegraphics-4.2.2/obj-i486-linux-gnu/okular/part.moc:228
#11 0xb74dbca8 in QMetaObject::activate (sender=0x8610840, from_signal_index=4, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3069
#12 0xb74dc932 in QMetaObject::activate (sender=0x8610840, m=0xb75b8904, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3143
#13 0xb7517717 in QTimer::timeout (this=0x8610840) at .moc/release-shared/moc_qtimer.cpp:128
#14 0xb74e16fe in QTimer::timerEvent (this=0x8610840, e=0xbfb5e76c) at kernel/qtimer.cpp:261
#15 0xb74d615f in QObject::event (this=0x8610840, e=0xbfb5e76c) at kernel/qobject.cpp:1082
#16 0xb6accf2c in QApplicationPrivate::notify_helper (this=0x83773f0, receiver=0x8610840, e=0xbfb5e76c) at kernel/qapplication.cpp:4084
#17 0xb6ad522e in QApplication::notify (this=0xbfb5ea5c, receiver=0x8610840, e=0xbfb5e76c) at kernel/qapplication.cpp:3631
#18 0xb7a6a94d in KApplication::notify (this=0xbfb5ea5c, receiver=0x8610840, event=0xbfb5e76c)
    at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307
#19 0xb74c5a3b in QCoreApplication::notifyInternal (this=0xbfb5ea5c, receiver=0x8610840, event=0xbfb5e76c) at kernel/qcoreapplication.cpp:602
#20 0xb74f4d71 in QTimerInfoList::activateTimers (this=0x837a534) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#21 0xb74f14e0 in timerSourceDispatch (source=0x837a500) at kernel/qeventdispatcher_glib.cpp:164
#22 0xb639db88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#23 0xb63a10eb in ?? () from /usr/lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#24 0xb63a1268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0xb74f1438 in QEventDispatcherGlib::processEvents (this=0x8365190, flags={i = -1078597400}) at kernel/qeventdispatcher_glib.cpp:323
#26 0xb6b6e3f5 in QGuiEventDispatcherGlib::processEvents (this=0x8365190, flags={i = -1078597352}) at kernel/qguieventdispatcher_glib.cpp:202
#27 0xb74c406a in QEventLoop::processEvents (this=0xbfb5e990, flags={i = -1078597288}) at kernel/qeventloop.cpp:149
#28 0xb74c44aa in QEventLoop::exec (this=0xbfb5e990, flags={i = -1078597224}) at kernel/qeventloop.cpp:200
#29 0xb74c6959 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#30 0xb6accda7 in QApplication::exec () at kernel/qapplication.cpp:3553
#31 0x0804e457 in main (argc=Cannot access memory at address 0xffffff8c
) at /build/buildd/kdegraphics-4.2.2/okular/shell/main.cpp:81


There is still a ?? in 
#23 0xb63a10eb in ?? () from /usr/lib/libglib-2.0.so.0
I installed libglib-dbg, but it does not solve :'(
Comment 8 Laurent Claessens 2009-05-01 21:32:47 UTC
Here is an other backtrace, obtained with an other LaTeX file.


Applicazione: Okular (okular), segnale SIGSEGV
[Current thread is 0 (LWP 19963)]

Thread 2 (Thread 0xb2bdcb90 (LWP 19964)):
#0  0xb8046430 in __kernel_vsyscall ()
#1  0xb67e57b1 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb74a8380 in QProcessManager::run (this=0x8e879f0) at io/qprocess_unix.cpp:305
#3  0xb73d696e in QThreadPrivate::start (arg=0x8e879f0) at thread/qthread_unix.cpp:189
#4  0xb64734ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb67ed49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb6038700 (LWP 19963)):
[KCrash Handler]
#6  bigEndianByteReader::readUINT8 (this=0x9196418) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/bigEndianByteReader.cpp:31
#7  0xb2f3fb3f in dvifile::read_postamble (this=0x9196418) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviFile.cpp:167
#8  0xb2f402cc in dvifile (this=0x9196418, fname=@0xbfd60ee4, pool=0x945e970) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviFile.cpp:308
#9  0xb2f2abb5 in dviRenderer::setFile (this=0x945e950, fname=@0xbfd61388, base=@0xbfd60f48) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviRenderer.cpp:467
#10 0xb2f2721a in DviGenerator::loadDocument (this=0x9180f08, fileName=@0xbfd61388, pagesVector=@0x8f60024) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/generator_dvi.cpp:70
#11 0xb47bd761 in Okular::DocumentPrivate::openDocumentInternal (this=0x8f5ff70, offer=@0xbfd61140, isstdin=false, docFile=@0xbfd61388, filedata=@0xbfd611c0)
    at /build/buildd/kdegraphics-4.2.2/okular/core/document.cpp:643
#12 0xb47cac14 in Okular::Document::openDocument (this=0x8f5c4d0, docFile=@0xbfd61388, url=@0xbfd612fc, _mime=@0xbfd613a8) at /build/buildd/kdegraphics-4.2.2/okular/core/document.cpp:1593
#13 0xb484e1a4 in Part::openFile (this=0x8f2c330) at /build/buildd/kdegraphics-4.2.2/okular/part.cpp:877
#14 0xb800896a in KParts::ReadOnlyPart::openUrl (this=0x8f2c330, url=@0xbfd614a8) at /build/buildd/kde4libs-4.2.2/kparts/part.cpp:558
#15 0xb4856fcf in Part::slotDoFileDirty (this=0x8f2c330) at /build/buildd/kdegraphics-4.2.2/okular/part.cpp:1128
#16 0xb4857ba2 in Part::qt_metacall (this=0x8f2c330, _c=QMetaObject::InvokeMetaMethod, _id=55, _a=0xbfd61578) at /build/buildd/kdegraphics-4.2.2/obj-i486-linux-gnu/okular/part.moc:228
#17 0xb74e0ca8 in QMetaObject::activate (sender=0x9125750, from_signal_index=4, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3069
#18 0xb74e1932 in QMetaObject::activate (sender=0x9125750, m=0xb75bd904, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3143
#19 0xb751c717 in QTimer::timeout (this=0x9125750) at .moc/release-shared/moc_qtimer.cpp:128
#20 0xb74e66fe in QTimer::timerEvent (this=0x9125750, e=0xbfd619fc) at kernel/qtimer.cpp:261
#21 0xb74db15f in QObject::event (this=0x9125750, e=0xbfd619fc) at kernel/qobject.cpp:1082
#22 0xb6ad1f2c in QApplicationPrivate::notify_helper (this=0x8e846e8, receiver=0x9125750, e=0xbfd619fc) at kernel/qapplication.cpp:4084
#23 0xb6ada22e in QApplication::notify (this=0xbfd61cec, receiver=0x9125750, e=0xbfd619fc) at kernel/qapplication.cpp:3631
#24 0xb7a6f94d in KApplication::notify (this=0xbfd61cec, receiver=0x9125750, event=0xbfd619fc) at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307
#25 0xb74caa3b in QCoreApplication::notifyInternal (this=0xbfd61cec, receiver=0x9125750, event=0xbfd619fc) at kernel/qcoreapplication.cpp:602
#26 0xb74f9d71 in QTimerInfoList::activateTimers (this=0x8e87834) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#27 0xb74f64e0 in timerSourceDispatch (source=0x8e87800) at kernel/qeventdispatcher_glib.cpp:164
#28 0xb63a2b88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0xb63a60eb in ?? () from /usr/lib/libglib-2.0.so.0
#30 0xb63a6268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0xb74f6438 in QEventDispatcherGlib::processEvents (this=0x8e72190, flags={i = -1076487304}) at kernel/qeventdispatcher_glib.cpp:323
#32 0xb6b733f5 in QGuiEventDispatcherGlib::processEvents (this=0x8e72190, flags={i = -1076487256}) at kernel/qguieventdispatcher_glib.cpp:202
#33 0xb74c906a in QEventLoop::processEvents (this=0xbfd61c20, flags={i = -1076487192}) at kernel/qeventloop.cpp:149
#34 0xb74c94aa in QEventLoop::exec (this=0xbfd61c20, flags={i = -1076487128}) at kernel/qeventloop.cpp:200
#35 0xb74cb959 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#36 0xb6ad1da7 in QApplication::exec () at kernel/qapplication.cpp:3553
#37 0x0804e457 in main (argc=) at /build/buildd/kdegraphics-4.2.2/okular/shell/main.cpp:81
Comment 9 luis 2009-05-04 18:13:10 UTC
I have exactly the same problem. Large file, and when the .dvi refreshes (from kile) it crashes.
Comment 10 Albert Astals Cid 2009-05-04 22:17:15 UTC
Could you attach the files you use to reproduce this?
Comment 11 Laurent Claessens 2009-05-04 23:01:47 UTC
Created attachment 33352 [details]
A LaTeX file which makes crash Okular when compiling

The precise number of \lipsum needed to produce the crash varies from one computer to an other. The point seems to be the duration of the compilation.
Comment 12 Laurent Claessens 2009-05-04 23:04:00 UTC
The traceback associated with the file exemple-okular.tex



Applicazione: Okular (okular), segnale SIGSEGV
[Current thread is 0 (LWP 4423)]

Thread 2 (Thread 0xb2b89b90 (LWP 4424)):
#0  0xb7fd5430 in __kernel_vsyscall ()
#1  0xb67767b1 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7439380 in QProcessManager::run (this=0x9ffa7a0) at io/qprocess_unix.cpp:305
#3  0xb736796e in QThreadPrivate::start (arg=0x9ffa7a0) at thread/qthread_unix.cpp:189
#4  0xb64044ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#5  0xb677e49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb5fc9700 (LWP 4423)):
[KCrash Handler]
#6  bigEndianByteReader::readUINT8 (this=0xa33fae8) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/bigEndianByteReader.cpp:31
#7  0xb2eecb3f in dvifile::read_postamble (this=0xa33fae8) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviFile.cpp:167
#8  0xb2eed2cc in dvifile (this=0xa33fae8, fname=@0xbf9f2284, pool=0xa5661f0) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviFile.cpp:308
#9  0xb2ed7bb5 in dviRenderer::setFile (this=0xa5661d0, fname=@0xbf9f2728, base=@0xbf9f22e8) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/dviRenderer.cpp:467
#10 0xb2ed421a in DviGenerator::loadDocument (this=0xa2f6490, fileName=@0xbf9f2728, pagesVector=@0xa0ceba4) at /build/buildd/kdegraphics-4.2.2/okular/generators/dvi/generator_dvi.cpp:70
#11 0xb475a761 in Okular::DocumentPrivate::openDocumentInternal (this=0xa0ceaf0, offer=@0xbf9f24e0, isstdin=false, docFile=@0xbf9f2728, filedata=@0xbf9f2560)
    at /build/buildd/kdegraphics-4.2.2/okular/core/document.cpp:643
#12 0xb476858d in Okular::Document::openDocument (this=0xa0c9ef8, docFile=@0xbf9f2728, url=@0xbf9f269c, _mime=@0xbf9f2748) at /build/buildd/kdegraphics-4.2.2/okular/core/document.cpp:1605
#13 0xb47eb1a4 in Part::openFile (this=0xa088720) at /build/buildd/kdegraphics-4.2.2/okular/part.cpp:877
#14 0xb7f9996a in KParts::ReadOnlyPart::openUrl (this=0xa088720, url=@0xbf9f2848) at /build/buildd/kde4libs-4.2.2/kparts/part.cpp:558
#15 0xb47f3fcf in Part::slotDoFileDirty (this=0xa088720) at /build/buildd/kdegraphics-4.2.2/okular/part.cpp:1128
#16 0xb47f4ba2 in Part::qt_metacall (this=0xa088720, _c=QMetaObject::InvokeMetaMethod, _id=55, _a=0xbf9f2918) at /build/buildd/kdegraphics-4.2.2/obj-i486-linux-gnu/okular/part.moc:228
#17 0xb7471ca8 in QMetaObject::activate (sender=0xa29a6a0, from_signal_index=4, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3069
#18 0xb7472932 in QMetaObject::activate (sender=0xa29a6a0, m=0xb754e904, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3143
#19 0xb74ad717 in QTimer::timeout (this=0xa29a6a0) at .moc/release-shared/moc_qtimer.cpp:128
#20 0xb74776fe in QTimer::timerEvent (this=0xa29a6a0, e=0xbf9f2d9c) at kernel/qtimer.cpp:261
#21 0xb746c15f in QObject::event (this=0xa29a6a0, e=0xbf9f2d9c) at kernel/qobject.cpp:1082
#22 0xb6a62f2c in QApplicationPrivate::notify_helper (this=0x9ff7430, receiver=0xa29a6a0, e=0xbf9f2d9c) at kernel/qapplication.cpp:4084
#23 0xb6a6b22e in QApplication::notify (this=0xbf9f308c, receiver=0xa29a6a0, e=0xbf9f2d9c) at kernel/qapplication.cpp:3631
#24 0xb7a0094d in KApplication::notify (this=0xbf9f308c, receiver=0xa29a6a0, event=0xbf9f2d9c) at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307
#25 0xb745ba3b in QCoreApplication::notifyInternal (this=0xbf9f308c, receiver=0xa29a6a0, event=0xbf9f2d9c) at kernel/qcoreapplication.cpp:602
#26 0xb748ad71 in QTimerInfoList::activateTimers (this=0x9ffa174) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#27 0xb74874e0 in timerSourceDispatch (source=0x9ffa140) at kernel/qeventdispatcher_glib.cpp:164
#28 0xb6333b88 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0xb63370eb in ?? () from /usr/lib/libglib-2.0.so.0
#30 0xb6337268 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#31 0xb7487438 in QEventDispatcherGlib::processEvents (this=0x9fe5190, flags={i = -1080086760}) at kernel/qeventdispatcher_glib.cpp:323
#32 0xb6b043f5 in QGuiEventDispatcherGlib::processEvents (this=0x9fe5190, flags={i = -1080086712}) at kernel/qguieventdispatcher_glib.cpp:202
#33 0xb745a06a in QEventLoop::processEvents (this=0xbf9f2fc0, flags={i = -1080086648}) at kernel/qeventloop.cpp:149
#34 0xb745a4aa in QEventLoop::exec (this=0xbf9f2fc0, flags={i = -1080086584}) at kernel/qeventloop.cpp:200
#35 0xb745c959 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#36 0xb6a62da7 in QApplication::exec () at kernel/qapplication.cpp:3553
#37 0x0804e457 in main (argc=) at /build/buildd/kdegraphics-4.2.2/okular/shell/main.cpp:81
Comment 13 Albert Astals Cid 2009-05-05 00:13:33 UTC
Can't get it to crash here :-/
Comment 14 Pino Toscano 2009-05-05 03:19:20 UTC
Btw, is anybody of the people who can steadily reproduce this problem able to compile from sources and/or try a patch?
Comment 15 luis 2009-05-05 08:41:35 UTC
This problem happens to me 95% of the time. My latex files are very big because there are many figures, that's why I cannot attach the files.

I do not know yet how to compile from sources and/or try a patch, but if someone can explain it to me, I am willing to do it. I have installed a fresh ubuntu 9.04 with i686 kernel.
Comment 16 Laurent Claessens 2009-05-05 12:08:42 UTC
@ Albert Astals Cid

Try adding some line (don't hesitate to put a lot of \lipsum). Maybe your computer is fast enough to finish the compilation before making okular crazy.
Comment 17 luis 2009-05-05 23:55:52 UTC
As I said before, I would like to contribute here but I just need some little help. I have been checking around and I have some questions (I know something about subversion and programming but not much)

1) I have found 'http://techbase.kde.org/Getting_Started/Build/KDE4/Kubuntu_and_Debian' with the pre-requisites to be able to compile kde4 programs but it has no explicit information for ubuntu 9.04. Is it the same as for 8.10?

2) I will be doing this in my only home computer or work computer so, in my 'production' machine, which I do not want to mess it up. Is there anything I have to take into account?

3) Do I have to uninstall my current okular before trying to compile my own?

Thanks
Comment 18 Pino Toscano 2009-05-25 18:04:37 UTC
SVN commit 972763 by pino:

when attempting to open a DVI file, check whether the file is correct
if not (for example it is still being (re)generated), then wait 800ms and try again, doing at most 10 waits
this should protect against opening incomplete documents
CCBUG: 189623


 M  +27 -0     generator_dvi.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=972763
Comment 19 Laurent Claessens 2009-05-25 18:17:44 UTC
The file *is not* correct. This is the main point of the bug.

Here is the way to crash :

1. Open a correct DVI file. Everything okay.
2. Compile the tex file ... at this point, the DVI *is* being regenerated, *and* you leave it open in Okular.
3. If the compilation is too long and the file too large, Okular crashes.

Notice that I do not *open* a DVI file being regenerated. What I do is to *leave* open a being regenerated DVI file.

This is annoying because you have to re-open the DVI file each time you compile it. It was not like that when one opened DVI files with KDVI embed in konqueror (KDE3).
Comment 20 Pino Toscano 2009-05-25 18:22:14 UTC
> The file *is not* correct. This is the main point of the bug.

I *understood* that, hence my very recent commit (in trunk).
Comment 21 Laurent Claessens 2009-05-25 18:33:44 UTC
ow. Yes. I misunderstood.


>when attempting to open a DVI file, check whether the file is correct

you were describing the behaviour of your commit. I believed that you asked me more precisions about the bug :)

Sorry for the noise, and thanks for the patch !
Comment 22 Pino Toscano 2009-05-25 18:43:59 UTC
(In reply to comment #21)
> >when attempting to open a DVI file, check whether the file is correct
> 
> you were describing the behaviour of your commit. I believed that you asked me
> more precisions about the bug :)

You know... commit logs are descriptions of the commits ;)

> Sorry for the noise, and thanks for the patch !

No problem; if anybody has the possibility to the newly added change to trunk, feedback about it is very welcome!
Comment 23 Pino Toscano 2009-05-27 00:53:41 UTC
SVN commit 973366 by pino:

the kpart does already loop when refreshing a document, so doing the "wait and try again" ourselves is not useful
thus, then just do the check for document completeness before the actual opening attempt, should be enough
CCBUG: 189623

thanks to Albert for remembering me okular already does many things automagically


 M  +11 -0     generator_dvi.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973366
Comment 24 Pino Toscano 2009-05-27 03:09:50 UTC
SVN commit 973394 by pino:

backport dvi document validity check
please test once kde 4.2.4 is out
CCBUG: 189623


 M  +6 -0      generator_dvi.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973394
Comment 25 Laurent Claessens 2009-05-28 20:46:15 UTC
Well, I confirm that the bug is fixed. I'm installed Kubuntu, karmic koala.
I have Okular version 0.8.80 with KDE 4.2.85 (KDE 4.2.85 (KDE 4.3 Beta1)), and no more crashes ... 

I could probably offer you a beer at next fosdem :)
Comment 26 Pino Toscano 2009-07-25 18:48:13 UTC
Looks like there were no bad news about this, so I can guess this was fixed in 4.2.4 and some beta of 4.3.
Closing then, thanks everybody for the feedback!