Bug 157001 - okular crashes when recompiling already opened ps file (QBasicAtomic::operator!=)
Summary: okular crashes when recompiling already opened ps file (QBasicAtomic::operato...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-31 01:07 UTC by Oliver Putz
Modified: 2008-10-05 18:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace (3.24 KB, application/octet-stream)
2008-10-02 04:55 UTC, Carlo Buratto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Putz 2008-01-31 01:07:17 UTC
Version:           0.6.80 (using 4.00.60 (KDE 4.0.60 >= 20080129), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.23-gentoo-r3

Steps to reproduce:

1) Compile some *.ps file (I use some rather big file (~50Meg) and did not check if smaller files work too)
2) Open that file in okular
3) Recompile that file again (I use kile dvi->ps)
4) See okular crash

Note: When I run okular in Valgrind, it does not crash.

Backtrace:
Application: Okular (okular), signal SIGSEGV
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb64db990 (LWP 22269)]
[New Thread 0xb1c18b90 (LWP 22676)]
[New Thread 0xb27e9b90 (LWP 22639)]
[KCrash handler]
#6  0xb4e6f7a6 in QBasicAtomic::operator!= (this=0x30000cb, x=1)
    at /usr/include/qt4/QtCore/qatomic.h:97
#7  0xb4ea00e0 in QMap<int, Okular::PagePrivate::PixmapObject>::detach (
    this=0x827c390) at /usr/include/qt4/QtCore/qmap.h:159
#8  0xb4ea0338 in QMap<int, Okular::PagePrivate::PixmapObject>::find (
    this=0x827c390, akey=@0xbffe9be8) at /usr/include/qt4/QtCore/qmap.h:551
#9  0xb4e9ed8e in Okular::PagePrivate::imageRotationDone (this=0x827c390, 
    job=0x82197b8)
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics-9999.4/okular/core/page.cpp:84
#10 0xb4ea2628 in Okular::PageController::imageRotationDone (this=0x8183508, 
    j=0x82197b8)
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics-9999.4/okular/core/pagecontroller.cpp:53
#11 0xb4ea26de in Okular::PageController::qt_metacall (this=0x8183508, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbffea12c)
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics_build/okular/pagecontroller_p.moc:70
#12 0xb7e7a1f4 in QMetaObject::activate (sender=0x83bb108, 
    from_signal_index=6, to_signal_index=6, argv=<value optimized out>)
    at kernel/qobject.cpp:3081
#13 0xb7e7ad94 in QMetaObject::activate (sender=0x83bb108, m=0xb4d255c0, 
    local_signal_index=2, argv=0xbffea12c) at kernel/qobject.cpp:3140
#14 0xb4d16bb4 in ThreadWeaver::WeaverInterface::jobDone (this=0x83bb108, 
    _t1=0x82197b8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/threadweaver/Weaver/WeaverInterface.moc:96
#15 0xb4d16cdb in ThreadWeaver::WeaverInterface::qt_metacall (this=0x83bb108, 
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0xbffea65c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/threadweaver/Weaver/WeaverInterface.moc:72
#16 0xb4d170c2 in ThreadWeaver::Weaver::qt_metacall (this=0x83bb108, 
    _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0xbffea65c)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/threadweaver/Weaver/ThreadWeaver.moc:56
#17 0xb7e7a1f4 in QMetaObject::activate (sender=0x832ca38, 
    from_signal_index=6, to_signal_index=6, argv=<value optimized out>)
    at kernel/qobject.cpp:3081
#18 0xb7e7ad94 in QMetaObject::activate (sender=0x832ca38, m=0xb4d255c0, 
    local_signal_index=2, argv=0xbffea65c) at kernel/qobject.cpp:3140
#19 0xb4d16bb4 in ThreadWeaver::WeaverInterface::jobDone (this=0x832ca38, 
    _t1=0x82197b8)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/threadweaver/Weaver/WeaverInterface.moc:96
#20 0xb4d16cdb in ThreadWeaver::WeaverInterface::qt_metacall (this=0x832ca38, 
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x823a770)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/threadweaver/Weaver/WeaverInterface.moc:72
#21 0xb4d1795a in ThreadWeaver::WeaverImpl::qt_metacall (this=0x832ca38, 
    _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x823a770)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs_build/threadweaver/Weaver/WeaverImpl.moc:68
#22 0xb7e752f9 in QMetaCallEvent::placeMetaCall (this=0x832baa0, 
    object=0x832ca38) at kernel/qobject.cpp:536
#23 0xb7e78017 in QObject::event (this=0x832ca38, e=0xb4ec5ff4)
    at kernel/qobject.cpp:1122
#24 0xb6a37e8a in QApplicationPrivate::notify_helper (this=0x8060488, 
    receiver=0x832ca38, e=0x832baa0) at kernel/qapplication.cpp:3556
#25 0xb6a3977a in QApplication::notify (this=0xbffeadb8, receiver=0x832ca38, 
    e=0x832baa0) at kernel/qapplication.cpp:3115
#26 0xb79e8b93 in KApplication::notify (this=0xbffeadb8, receiver=0x832ca38, 
    event=0x832baa0)
    at /var/tmp/portage/kde-base/kdelibs-9999.4/work/kdelibs-9999.4/kdeui/kernel/kapplication.cpp:311
#27 0xb7e66d7b in QCoreApplication::notifyInternal (this=0xbffeadb8, 
    receiver=0x832ca38, event=0x832baa0) at kernel/qcoreapplication.cpp:530
#28 0xb7e6821a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, 
    event_type=0, data=0x8056e50) at kernel/qcoreapplication.h:200
#29 0xb7e6856d in QCoreApplication::sendPostedEvents (receiver=0x0, 
    event_type=0) at kernel/qcoreapplication.cpp:1001
#30 0xb6ac1aee in QEventDispatcherX11::processEvents (this=0x805fdc8, 
    flags=@0xbffead04)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:205
#31 0xb7e66191 in QEventLoop::processEvents (this=0xbffead70, 
    flags=@0xbffead38) at kernel/qeventloop.cpp:140
#32 0xb7e6629a in QEventLoop::exec (this=0xbffead70, flags=@0xbffead78)
    at kernel/qeventloop.cpp:186
#33 0xb7e68626 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:759
#34 0xb6a37487 in QApplication::exec () at kernel/qapplication.cpp:3053
#35 0x0804e6e5 in main (argc=560260, argv=0x815b9e0)
    at /var/tmp/portage/kde-base/kdegraphics-9999.4/work/kdegraphics-9999.4/okular/shell/main.cpp:60
#36 0xb66e9fdc in __libc_start_main (main=0x804e2e0 <main>, argc=6, 
    ubp_av=0xbffeaee4, init=0x80515d0 <__libc_csu_init>, 
    fini=0x80515c0 <__libc_csu_fini>, rtld_fini=0xb7f2a100 <_dl_fini>, 
    stack_end=0xbffeaedc) at libc-start.c:229
#37 0x0804e251 in _start ()
#0  0xffffe410 in __kernel_vsyscall ()


Konsole debug output:
GPL Ghostscript 8.60 (2007-08-01)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
okular(22765)/kio (KDirWatch) KDirWatch::setDirty: "KDirWatch-1" emitting dirty "/mnt/usb/Data/solutions/ass1/MainText/generalText.ps"
okular(22765)/okular (app) Okular::DocumentPrivate::sendGeneratorRequest: sending request id=4 100x142@1 async == true
okular(22765)/okular (Spectre) GSGenerator::generatePixmap: receiving Async PixmapRequest (id: 4) (100x142), prio 2, pageNo 1
GPL Ghostscript 8.60 (2007-08-01)
Copyright (C) 2007 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
okular(22765)/kio (KDirWatch) KDirWatchPrivate::removeEntry: KDirWatchPrivate::removeEntry for "/mnt/usb/Data/solutions/ass1/MainText/generalText.ps" sub_entry: 0x0
okular(22765)/kio (KDirWatch) KDirWatchPrivate::removeEntry: Cancelled INotify (fd 17, 2) for "/mnt/usb/Data/solutions/ass1/MainText/generalText.ps"
okular(22765)/kio (KDirWatch) KDirWatchPrivate::removeEntry: Removed File "/mnt/usb/Data/solutions/ass1/MainText/generalText.ps" for "" ["KDirWatch-1"]
okular(22765)/kdecore (trader) KMimeTypeTrader::weightedOffers: KMimeTypeTrader::weightedOffers(  "application/postscript" , "okular/Generator"  )
okular(22765)/kdecore (trader) KMimeTypeTrader::query: query for mimeType  "application/postscript" ,  "okular/Generator"  :returning  1  offers
okular(22765)/okular (Spectre) GSGenerator::loadDocument: Page count: 38
okular(22765)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added File "/mnt/usb/Data/solutions/ass1/MainText/generalText.ps" for "" ["KDirWatch-1"]
okular(22765)/kio (KDirWatch) KDirWatchPrivate::useINotify: trying to use inotify for monitoring
okular(22765)/kio (KDirWatch) KDirWatchPrivate::useINotify: inotify successfully used for monitoring
okular(22765)/okular (app) Okular::Document::requestPixmaps: request id=3 403x571@0
okular(22765)/okular (app) Okular::Document::requestPixmaps: request id=3 403x571@1
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = okular path = <unknown> pid = 22765
sock_file=/home/kdesvn/.kde4/socket-Remus/kdeinit4__0
Warning: connect() failed: : Connection refused
Comment 1 Pino Toscano 2008-01-31 23:56:24 UTC
Did you rotate your document in Okular before recompiling the .dvi?
Comment 2 Albert Astals Cid 2008-01-31 23:58:43 UTC
No (well, not sure him, but i can reproduce the crash without rotating)
Comment 3 Oliver Putz 2008-02-01 01:29:55 UTC
Hi!
Even if it is outdated by now: No, I did not rotate the document. In fact, I did nothing to the document at all. (except recompiling it)
Comment 4 Pino Toscano 2008-02-01 02:02:36 UTC
Can you reproduce the issue after r769283?
Comment 5 Oliver Putz 2008-02-01 12:43:14 UTC
Hm, I would love to try, but after having recompiled okular, it cannot find any ps backends any longer. (Even tried recompiling the whole KDE4 system). So, if anyone can tell me how to open ps files in a recent version of okular natively again, I'll try to check if this bug is fixed :-)
Comment 6 Oliver Putz 2008-02-01 13:02:34 UTC
Oh, never mind. I just found out that you use libspectre now for ps support. However, as there is no gentoo ebuild for that one, it might take a while until I managed to be able to display ps files in okular again.
Comment 7 Albert Astals Cid 2008-02-02 19:28:23 UTC
You can always use kde4.0 branch that still embedds spectre in okular or bug gentooers to package libspectre or compile libspectre from source ;-)

I'm closing the bug as with the pino patch it does not crashes anymore here. Feel free to reopen if after updating to something with this patch it you still get crashes.
Comment 8 Oliver Putz 2008-02-02 21:42:04 UTC
Hi, as the person that filed this bug, I just wanted to confirm that this problem is indeed now fixed.

@libspectre: The problem was that the gentoo kdegraphics ebuild refused to compile when I compiled libspectre directly from the sources. So I had to write an ebuild for libspectre first.
Comment 9 Carlo Buratto 2008-10-02 04:55:20 UTC
Created attachment 27650 [details]
backtrace
Comment 10 Pino Toscano 2008-10-02 10:17:22 UTC
@Carlo Buratto (comment #9):
please provide a better backtrace, as explained in:
http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports

Als, please provide a description of what happened...
Comment 11 Carlo Buratto 2008-10-05 18:48:41 UTC
I was writing a tex file, i compile it in a dvi and i opened the dvi with okular, then i reconpiled the dvi more times and okular automatically refresh the dvi, but sometimes (very few times) it crashes.

However i recently updated my okular to 0.7.1 and i don't yet experience the crash.

I'm sorry for the bad backtrace.