Created attachment 50874 [details] DVI-File that crashes okular Version: unspecified (using KDE 4.4.2) OS: Linux When I load any dvi containing eps-figures, okular crashes with the given backtrace. Reproducible: Always Steps to Reproduce: Copy the attachments epsdvi.dvi and epsdvi.eps into the same directory and open okular on epsdvi.dvi Actual Results: Okular crashes Expected Results: Okular should display the file including the eps The backtrace: Thread 3 (Thread 0xb4bfeb70 (LWP 23789)): [KCrash Handler] #6 0x00152bc6 in QDBusAdaptorConnector::relaySlot (this=0x99edce8, argv=0xb4bf9168) at qdbusabstractadaptor.cpp:268 #7 0x00153564 in QDBusAdaptorConnector::qt_metacall (this=0x99edce8, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xb4bf9168) at qdbusabstractadaptor.cpp:364 #8 0x00e3bc9a in QMetaObject::metacall (object=0x99edce8, cl=3032453480, idx=4, argv=0xb4bf9168) at kernel/qmetaobject.cpp:237 #9 0x00e4a3d5 in QMetaObject::activate (sender=0x99da248, m=0xf45250, local_signal_index=0, argv=0xb4bf9168) at kernel/qobject.cpp:3293 #10 0x00e4a7d3 in QObject::destroyed (this=0x99da248, _t1=0x99da248) at .moc/release-shared/moc_qobject.cpp:149 #11 0x00e4cf9a in ~QObject (this=0x99da248, __in_chrg=<value optimized out>) at kernel/qobject.cpp:869 #12 0x00152ea8 in ~QDBusAbstractAdaptor (this=0x99da248, __in_chrg=<value optimized out>) at qdbusabstractadaptor.cpp:149 #13 0x004ad80a in ~KBookmarkManagerAdaptor (this=0x99da248, __in_chrg=<value optimized out>) at ../../kio/bookmarks/kbookmarkmanageradaptor_p.h:28 #14 0x00e4618f in QObjectPrivate::deleteChildren (this=0x99d7060) at kernel/qobject.cpp:1986 #15 0x00e4d29d in ~QObject (this=0x99da390, __in_chrg=<value optimized out>) at kernel/qobject.cpp:975 #16 0x004a7598 in ~KBookmarkManager (this=0x99da390, __in_chrg=<value optimized out>) at ../../kio/bookmarks/kbookmarkmanager.cc:326 #17 0x004a749e in qDeleteAll<QList<KBookmarkManager*>::iterator> () at /usr/include/qt4/QtCore/qalgorithms.h:322 #18 ~KBookmarkManagerList () at ../../kio/bookmarks/kbookmarkmanager.cc:53 #19 destroy () at ../../kio/bookmarks/kbookmarkmanager.cc:59 #20 0x003a6fcb in ~KCleanUpGlobalStatic (this=0x5736ec, __in_chrg=<value optimized out>) at ../../kdecore/kernel/kglobal.h:62 #21 0x026ac1bf in ?? () from /lib/tls/i686/cmov/libc.so.6 #22 0x026ac22f in exit () from /lib/tls/i686/cmov/libc.so.6 #23 0x011025fb in qt_xio_errhandler () at kernel/qapplication_x11.cpp:734 #24 0x009bfbfa in KApplication::xioErrhandler (this=0xbfcfb3c0, dpy=0x98b7be8) at ../../kdeui/kernel/kapplication.cpp:408 #25 0x009bfc36 in kde_xio_errhandler (dpy=0x98b7be8) at ../../kdeui/kernel/kapplication.cpp:125 #26 0x03eacc16 in _XIOError (dpy=0x99bd3a8) at ../../src/XlibInt.c:3138 #27 0x03eb51a1 in _XReply (dpy=0x98b7be8, rep=0xb4bf9490, extra=0, discard=0) at ../../src/xcb_io.c:522 #28 0x03e91739 in XGetImage (dpy=0x98b7be8, d=111149406, x=0, y=0, width=100, height=12, plane_mask=4294967295, format=1) at ../../src/GetImage.c:77 #29 0x01191108 in QX11PixmapData::toImage (this=0x9bfab20) at image/qpixmap_x11.cpp:1492 #30 0x01176c6b in QPixmap::toImage (this=0xb4bf98a0) at image/qpixmap.cpp:486 #31 0x0139da5f in QFontEngineXLFD::addOutlineToPath (this=0x9c09a08, x=196, y=198, glyphs=..., path=0xb4bf993c, flags=...) at text/qfontengine_x11.cpp:676 #32 0x011de15b in QPaintEngine::drawTextItem (this=0x9ba67f0, p=..., textItem=...) at painting/qpaintengine.cpp:758 #33 0x0127e3e2 in QRasterPaintEngine::drawTextItem (this=0x9ba67f0, p=..., textItem=...) at painting/qpaintengine_raster.cpp:3314 #34 0x011fca26 in QPainter::drawTextItem (this=0x9a157e0, p=..., _ti=...) at painting/qpainter.cpp:6237 #35 0x01313480 in drawMenuText (this=0xb4bfdbb4, p=0x9a157e0, pos=..., selection=0x0) at text/qtextlayout.cpp:2016 #36 QTextLine::draw (this=0xb4bfdbb4, p=0x9a157e0, pos=..., selection=0x0) at text/qtextlayout.cpp:2201 #37 0x011f4185 in qt_format_text (fnt=..., _r=..., tf=132, option=0x0, str=..., brect=0x0, tabstops=0, tabarraylen=0, painter=0x9a157e0) at painting/qpainter.cpp:7795 #38 0x011f520a in QPainter::drawText (this=0x9a157e0, r=..., flags=132, str=..., br=0x0) at painting/qpainter.cpp:5788 #39 0x06db4547 in dviRenderer::epsf_special (this=0x9b6f9b0, cp=...) at ../../../../okular/generators/dvi/special.cpp:425 #40 0x06dba5ec in dviRenderer::applicationDoSpecial (this=0x9b6f9b0, cp=0x9be5ad8 "PSfile=\"epsdvi.eps\" llx=0 lly=0 urx=73 ury=42 rwi=730 ") at ../../../../okular/generators/dvi/special.cpp:546 #41 0x06daab0e in dviRenderer::draw_part (this=0x9b6f9b0, current_dimconv=16.604400166044002, is_vfmacro=false) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:536 #42 0x06dabc23 in dviRenderer::draw_page (this=0x9b6f9b0) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:649 #43 0x06da7e24 in dviRenderer::drawPage (this=0x9b6f9b0, page=0x9ba93e8) at ../../../../okular/generators/dvi/dviRenderer.cpp:175 #44 0x06da443c in dviRenderer::getText (this=0x9b6f9b0, page=0x9ba93e8) at ../../../../okular/generators/dvi/dviRenderer.cpp:264 #45 0x06da06fe in DviGenerator::textPage (this=0x9b6f1e8, page=0x9a61660) at ../../../../okular/generators/dvi/generator_dvi.cpp:298 #46 0x022d9f4a in Okular::TextPageGenerationThread::run (this=0x9bd82b8) at ../../okular/core/generator_p.cpp:103 #47 0x00d3432e in QThreadPrivate::start (arg=0x9bd82b8) at thread/qthread_unix.cpp:248 #48 0x0592896e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #49 0x0274aa4e in clone () from /lib/tls/i686/cmov/libc.so.6
Created attachment 50875 [details] Accompanying EPS-image Here's the accompanying EPS-image. You need this, too. Otherwise, the image will not be found.
Looks like a problem of the raster rendering engine, which Qt version do you have? Also, does it still crash if you run `okular --graphicssystem native`?
Yes, it does. The error message looks different, and I get no bt. My Qt version is 4.6.2, fwiw. okular --graphicssystem native epsdvi.dvi KCrash: Application 'okular' crashing... Fatal Error: Accessed global static 'KGlobalPrivate *globalData()' after destruction. Defined at ../../kdecore/kernel/kglobal.cpp:116 Unable to start Dr. Konqi Then I tried gdb okular set args --graphicssystem native epsdvi.dvi r and got: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb3dffb70 (LWP 3999)] 0x00a44bc6 in QDBusAdaptorConnector::relaySlot (this=0x8131d40, argv=0xb3dfb9c8) at qdbusabstractadaptor.cpp:268 268 qdbusabstractadaptor.cpp: No such file or directory. in qdbusabstractadaptor.cpp (gdb) bt #0 0x00a44bc6 in QDBusAdaptorConnector::relaySlot (this=0x8131d40, argv=0xb3dfb9c8) at qdbusabstractadaptor.cpp:268 #1 0x00a45564 in QDBusAdaptorConnector::qt_metacall (this=0x8131d40, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xb3dfb9c8) at qdbusabstractadaptor.cpp:364 #2 0x00be8c9a in QMetaObject::metacall (object=0x8131d40, cl=3017783752, idx=4, argv=0xb3dfb9c8) at kernel/qmetaobject.cpp:237 #3 0x00bf73d5 in QMetaObject::activate (sender=0x8136c48, m=0xcf2250, local_signal_index=0, argv=0xb3dfb9c8) at kernel/qobject.cpp:3293 #4 0x00bf77d3 in QObject::destroyed (this=0x8136c48, _t1=0x8136c48) at .moc/release-shared/moc_qobject.cpp:149 #5 0x00bf9f9a in ~QObject (this=0x8136c48, __in_chrg=<value optimized out>) at kernel/qobject.cpp:869 #6 0x00a44ea8 in ~QDBusAbstractAdaptor (this=0x8136c48, __in_chrg=<value optimized out>) at qdbusabstractadaptor.cpp:149 #7 0x0032880a in ~KBookmarkManagerAdaptor (this=0x8136c48, __in_chrg=<value optimized out>) at ../../kio/bookmarks/kbookmarkmanageradaptor_p.h:28 #8 0x00bf318f in QObjectPrivate::deleteChildren (this=0x81324f0) at kernel/qobject.cpp:1986 #9 0x00bfa29d in ~QObject (this=0x812c948, __in_chrg=<value optimized out>) at kernel/qobject.cpp:975 #10 0x00322598 in ~KBookmarkManager (this=0x812c948, __in_chrg=<value optimized out>) at ../../kio/bookmarks/kbookmarkmanager.cc:326 #11 0x0032249e in qDeleteAll<QList<KBookmarkManager*>::iterator> () at /usr/include/qt4/QtCore/qalgorithms.h:322 #12 ~KBookmarkManagerList () at ../../kio/bookmarks/kbookmarkmanager.cc:53 #13 destroy () at ../../kio/bookmarks/kbookmarkmanager.cc:59 #14 0x00221fcb in ~KCleanUpGlobalStatic (this=0x3ee6ec, __in_chrg=<value optimized out>) at ../../kdecore/kernel/kglobal.h:62 #15 0x0189a1bf in ?? () from /lib/tls/i686/cmov/libc.so.6 #16 0x0189a22f in exit () from /lib/tls/i686/cmov/libc.so.6 #17 0x00eaf5fb in qt_xio_errhandler () at kernel/qapplication_x11.cpp:734 #18 0x005cebfa in KApplication::xioErrhandler (this=0xbffff1e0, dpy=0x8086eb0) at ../../kdeui/kernel/kapplication.cpp:408 #19 0x005cec36 in kde_xio_errhandler (dpy=0x8086eb0) at ../../kdeui/kernel/kapplication.cpp:125 #20 0x01c6ec16 in _XIOError (dpy=0x812a8c0) at ../../src/XlibInt.c:3138 #21 0x01c771a1 in _XReply (dpy=0x8086eb0, rep=0xb3dfbce0, extra=0, discard=0) at ../../src/xcb_io.c:522 #22 0x01c50d59 in XListFonts (dpy=0x8086eb0, pattern=0x82bdf08 "-*-Helvetica-*-*-*-*-*-*-*-*-*-*-*-*", maxNames=65535, actualCount=0xb3dfbdf8) at ../../src/FontNames.c:60 #23 0x01094289 in loadXlfds (reqFamily=<value optimized out>, encoding_id=<value optimized out>) at text/qfontdatabase_x11.cpp:627 #24 0x01094b20 in load (family=..., script=<value optimized out>, forceXLFD=true) at text/qfontdatabase_x11.cpp:1247 #25 0x01095cc5 in match (script=<value optimized out>, request=..., family_name=..., foundry_name=..., force_encoding_id=-1, desc=0xb3dfbf9c, blacklistedFamilies=..., forceXLFD=<value optimized out>) at text/qfontdatabase.cpp:1362 #26 0x010993ff in QFontDatabase::loadXlfd (screen=0, script=0, request=..., force_encoding_id=-1) at text/qfontdatabase_x11.cpp:1819 #27 0x0109b2ba in QFontDatabase::load (d=0x83890d8, script=0) at text/qfontdatabase_x11.cpp:1969 #28 0x010735c0 in QFontPrivate::engineForScript (this=0x83890d8, script=0) at text/qfont.cpp:270 #29 0x0108b017 in QFontMetricsF::leading (this=0xb3dfebc8) at text/qfontmetrics.cpp:1188 #30 0x00fa0f0a in qt_format_text (fnt=..., _r=..., tf=132, option=0x0, str=..., brect=0x0, tabstops=0, tabarraylen=0, painter=0x833ae58) at painting/qpainter.cpp:7719 #31 0x00fa220a in QPainter::drawText (this=0x833ae58, r=..., flags=132, str=..., br=0x0) at painting/qpainter.cpp:5788 #32 0x026c3547 in dviRenderer::epsf_special (this=0x82ebfd0, cp=...) at ../../../../okular/generators/dvi/special.cpp:425 #33 0x026c95ec in dviRenderer::applicationDoSpecial (this=0x82ebfd0, cp=0x8323900 "PSfile=\"epsdvi.eps\" llx=0 lly=0 urx=73 ury=42 rwi=730 ") at ../../../../okular/generators/dvi/special.cpp:546 #34 0x026b9b0e in dviRenderer::draw_part (this=0x82ebfd0, current_dimconv=16.604400166044002, is_vfmacro=false) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:536 #35 0x026bac23 in dviRenderer::draw_page (this=0x82ebfd0) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:649 #36 0x026b6e24 in dviRenderer::drawPage (this=0x82ebfd0, page=0x8349f38) at ../../../../okular/generators/dvi/dviRenderer.cpp:175 #37 0x026b343c in dviRenderer::getText (this=0x82ebfd0, page=0x8349f38) at ../../../../okular/generators/dvi/dviRenderer.cpp:264 #38 0x026af6fe in DviGenerator::textPage (this=0x82ecfc8, page=0x833abb8) at ../../../../okular/generators/dvi/generator_dvi.cpp:298 #39 0x024abf4a in Okular::TextPageGenerationThread::run (this=0xb3e00468) at ../../okular/core/generator_p.cpp:103 #40 0x00ae132e in QThreadPrivate::start (arg=0xb3e00468) at thread/qthread_unix.cpp:248 #41 0x01dc796e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #42 0x01938a4e in clone () from /lib/tls/i686/cmov/libc.so.6 After that I tried gdb okular set args --graphicssystem raster epsdvi.dvi r Which resulted in the same backtrace as above. After that I tried gdb okular set args --graphicssystem doesnotexist epsdvi.dvi r resulting in Program received signal SIGABRT, Aborted. [Switching to Thread 0xb42f4b70 (LWP 4042)] 0x0012d422 in __kernel_vsyscall () (gdb) bt #0 0x0012d422 in __kernel_vsyscall () #1 0x01895651 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0x01898a82 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0x0188e718 in __assert_fail () from /lib/tls/i686/cmov/libc.so.6 #4 0x01c771d2 in _XReply (dpy=0x8086ee0, rep=0xb42f0ce0, extra=0, discard=0) at ../../src/xcb_io.c:452 #5 0x01c50d59 in XListFonts (dpy=0x8086ee0, pattern=0xb3635b00 "-*-Helvetica-*-*-*-*-*-*-*-*-*-*-*-*", maxNames=65535, actualCount=0xb42f0df8) at ../../src/FontNames.c:60 #6 0x01094289 in loadXlfds (reqFamily=<value optimized out>, encoding_id=<value optimized out>) at text/qfontdatabase_x11.cpp:627 #7 0x01094b20 in load (family=..., script=<value optimized out>, forceXLFD=true) at text/qfontdatabase_x11.cpp:1247 #8 0x01095cc5 in match (script=<value optimized out>, request=..., family_name=..., foundry_name=..., force_encoding_id=-1, desc=0xb42f0f9c, blacklistedFamilies=..., forceXLFD=<value optimized out>) at text/qfontdatabase.cpp:1362 #9 0x010993ff in QFontDatabase::loadXlfd (screen=0, script=0, request=..., force_encoding_id=-1) at text/qfontdatabase_x11.cpp:1819 #10 0x0109b2ba in QFontDatabase::load (d=0xb3614700, script=0) at text/qfontdatabase_x11.cpp:1969 #11 0x010735c0 in QFontPrivate::engineForScript (this=0xb3614700, script=0) at text/qfont.cpp:270 #12 0x0108b017 in QFontMetricsF::leading (this=0xb42f3bc8) at text/qfontmetrics.cpp:1188 #13 0x00fa0f0a in qt_format_text (fnt=..., _r=..., tf=132, option=0x0, str=..., brect=0x0, tabstops=0, tabarraylen=0, painter=0xb360dff0) at painting/qpainter.cpp:7719 #14 0x00fa220a in QPainter::drawText (this=0xb360dff0, r=..., flags=132, str=..., br=0x0) at painting/qpainter.cpp:5788 #15 0x026c3547 in dviRenderer::epsf_special (this=0x82978a8, cp=...) at ../../../../okular/generators/dvi/special.cpp:425 #16 0x026c95ec in dviRenderer::applicationDoSpecial (this=0x82978a8, cp=0xb3604ad0 "PSfile=\"epsdvi.eps\" llx=0 lly=0 urx=73 ury=42 rwi=730 ") at ../../../../okular/generators/dvi/special.cpp:546 #17 0x026b9b0e in dviRenderer::draw_part (this=0x82978a8, current_dimconv=16.604400166044002, is_vfmacro=false) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:536 #18 0x026bac23 in dviRenderer::draw_page (this=0x82978a8) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:649 #19 0x026b6e24 in dviRenderer::drawPage (this=0x82978a8, page=0xb3600ae8) at ../../../../okular/generators/dvi/dviRenderer.cpp:175 #20 0x026b343c in dviRenderer::getText (this=0x82978a8, page=0xb3600ae8) at ../../../../okular/generators/dvi/dviRenderer.cpp:264 #21 0x026af6fe in DviGenerator::textPage (this=0x82eca50, page=0x833e7d0) at ../../../../okular/generators/dvi/generator_dvi.cpp:298 #22 0x024abf4a in Okular::TextPageGenerationThread::run (this=0x8344748) at ../../okular/core/generator_p.cpp:103 #23 0x00ae132e in QThreadPrivate::start (arg=0x8344748) at thread/qthread_unix.cpp:248 #24 0x01dc796e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #25 0x01938a4e in clone () from /lib/tls/i686/cmov/libc.so.6 Here's another one I received with using graphicssystem native X Error: BadIDChoice (invalid resource ID chosen for this connection) 14 Major opcode: 53 (X_CreatePixmap) Resource id: 0x54000be X Error: BadIDChoice (invalid resource ID chosen for this connection) 14 Extension: 148 (RENDER) Minor opcode: 4 (RenderCreatePicture) Resource id: 0x54000bf okular: ../../src/xcb_io.c:249: process_responses: Assertion `(((long) (dpy- >last_request_read) - (long) (dpy->request)) <= 0)' failed. Program received signal SIGABRT, Aborted. 0x0012d422 in __kernel_vsyscall () #0 0x0012d422 in __kernel_vsyscall () #1 0x01895651 in raise () from /lib/tls/i686/cmov/libc.so.6 #2 0x01898a82 in abort () from /lib/tls/i686/cmov/libc.so.6 #3 0x0188e718 in __assert_fail () from /lib/tls/i686/cmov/libc.so.6 #4 0x01c76a8d in process_responses (dpy=0x8086eb0, wait_for_first_event=<value optimized out>, current_error=0x0, current_request=0) at ../../src/xcb_io.c:249 #5 0x01c77356 in _XEventsQueued (dpy=0x8086eb0, mode=2) at ../../src/xcb_io.c:263 #6 0x01c5fadf in XEventsQueued (dpy=0x8086eb0, mode=2) at ../../src/Pending.c:44 #7 0x00eee305 in x11EventSourceCheck (s=0x80765e8) at kernel/qguieventdispatcher_glib.cpp:87 #8 0x01efe799 in g_main_context_check () from /lib/libglib-2.0.so.0 #9 0x01eff0ce in ?? () from /lib/libglib-2.0.so.0 #10 0x01eff4b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0 #11 0x00c0f60f in QEventDispatcherGlib::processEvents (this=0x805eb60, flags=...) at kernel/qeventdispatcher_glib.cpp:414 #12 0x00eee135 in QGuiEventDispatcherGlib::processEvents (this=0x805eb60, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #13 0x00be2059 in QEventLoop::processEvents (this=0xbffff0e4, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece. ) at kernel/qeventloop.cpp:149 #14 0x00be24aa in QEventLoop::exec (this=0xbffff0e4, flags=...) at kernel/qeventloop.cpp:201 #15 0x00be669f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981 #16 0x00e2e577 in QApplication::exec () at kernel/qapplication.cpp:3579 #17 0x0804ef09 in main (argc=4, argv=0xbffff3d4) at ../../../okular/shell/main.cpp:82 Interestingly, sometimes the Diagram is displayed before the program freezes (in gdb), and sometimes okular doesn't even crash. Seems pretty fscked up. I may note that the eps contains text in Helvetica which is a bitmap font on my system. Two of the traces hint this might be the source of trouble.
Seems like we try to load a X bitmap font in the non main thread and everything is going bad because of that. Can anyone confirm that is not a valid thing (load X bitmap font from non main thread)
Created attachment 86571 [details] Guard the drawText() calls to not fail when X-bitmap fonts are used Hi, I was trying again to reproduce the bug; I couldn't reproduce it in the past and I can't still reproduce it. This comment seems to be the important part: > I may note that the eps contains text in Helvetica which is a bitmap font on my system. > Two of the traces hint this might be the source of trouble. According to the trace, it crashes on two drawText calls when the text is extracted. The attached patch should avoid the crash (thanks Albert for the hints), but I have some trouble trying to reproduce it, specifically how to change the mapping so that X bitmap fonts are used. Do you have the crashing environment around, or do you remember how to setup it? Or any other hint to reproduce this? :)
Marking as NEEDINFO
I can still reproduce the crash. However, I can't set up a build environment ATM. I aim to retry with your patch applied about the end of May/beginning of July.
(In reply to comment #7) > I can still reproduce the crash. However, I can't set up a build environment > ATM. I aim to retry with your patch applied about the end of May/beginning > of July. Great, thanks! In the meantime, could you at least describe how to build that environment?
I installed bitmap fonts like this. YMMV under different distributions. dpkg-reconfigure x-server-xorg # Select: Support bitmap fonts apt-get install xfonts-100dpi-transcoded xfonts-75dpi-transcoded xfonts-bolkhov-75dpi rm /etc/fonts/conf.d/70-no-bitmaps.conf ln -s ../conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d/70-yes-bitmaps.conf cat <<EOF > /etc/fonts/conf.avail/71-fixed-bitmaps.conf <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!-- Enabled Fixed bitmap fonts --> <selectfont> <acceptfont> <pattern> <patelt name="family"><string>Fixed</string></patelt> </pattern> </acceptfont> </selectfont> </fontconfig> EOF ln -s ../conf.avail/71-fixed-bitmaps.conf /etc/fonts/conf.d/71-fixed-bitmaps.conf dpkg-reconfigure fontconfig-config fontconfig # Restart X11 here Here are the steps I performed to rebuild okular with the patch mkdir okular cd okular apt-get source okular sudo apt-get build-dep okular # downloaded attachment http://bugsfiles.kde.org/attachment.cgi?id=86571 as fix-font-threading.diff cd kdegraphics-4.4.5 ( cd okular ; patch -p1 < ../../fix-font-threading.diff ) dch -v 4:4.4.5-0ubuntu1.1-local0 dpkg-buildpackage -us -uc cd .. # installing sudo dpkg -i okular_4.4.5-0ubuntu1.1-local0_i386.deb okular-extra-backends_4.4.5-0ubuntu1.1-local0_i386.deb kdegraphics-dbg_4.4.5-0ubuntu1.1-local0_i386.deb Okular is still unstable. It looks like nothing changed. Here's the backtrace. In X11 any drawing operations outside of the GUI thread are disallowed. The DVI-renderer probably voilates that invariant. Log output (stdout/stderr): okular: ../../src/xcb_io.c:452: _XReply: Zusicherung »!dpy->xcb->reply_data« nicht erfüllt. KCrash: Application 'okular' crashing... sock_file=/home/user/.kde/socket-local/kdeinit4__0 QSocketNotifier: Invalid socket 20 and type 'Read', disabling... Backtrace: Thread 4 (Thread 0xb39bab70 (LWP 14120)): [KCrash Handler] #6 0x009c6422 in __kernel_vsyscall () #7 0x02b21651 in raise () from /lib/tls/i686/cmov/libc.so.6 #8 0x02b24a82 in abort () from /lib/tls/i686/cmov/libc.so.6 #9 0x02b1a718 in __assert_fail () from /lib/tls/i686/cmov/libc.so.6 #10 0x089831d2 in _XReply (dpy=0x9f62c00, rep=0xb39b6ce0, extra=0, discard=0) at ../../src/xcb_io.c:452 #11 0x0895cd59 in XListFonts (dpy=0x9f62c00, pattern=0xa314bc8 "-*-Helvetica-*-*-*-*-*-*-*-*-*-*-*-*", maxNames=65535, actualCount=0xb39b6df8) at ../../src/FontNames.c:60 #12 0x01398289 in loadXlfds (reqFamily=<value optimized out>, encoding_id=<value optimized out>) at text/qfontdatabase_x11.cpp:627 #13 0x01398b20 in load (family=..., script=<value optimized out>, forceXLFD=true) at text/qfontdatabase_x11.cpp:1247 #14 0x01399cc5 in match (script=<value optimized out>, request=..., family_name=..., foundry_name=..., force_encoding_id=-1, desc=0xb39b6f9c, blacklistedFamilies=..., forceXLFD=<value optimized out>) at text/qfontdatabase.cpp:1362 #15 0x0139d3ff in QFontDatabase::loadXlfd (screen=0, script=0, request=..., force_encoding_id=-1) at text/qfontdatabase_x11.cpp:1819 #16 0x0139f2ba in QFontDatabase::load (d=0xa2e36f0, script=0) at text/qfontdatabase_x11.cpp:1969 #17 0x013775c0 in QFontPrivate::engineForScript (this=0xa2e36f0, script=0) at text/qfont.cpp:270 #18 0x0138f017 in QFontMetricsF::leading (this=0xb39b9bc8) at text/qfontmetrics.cpp:1188 #19 0x012a4f0a in qt_format_text (fnt=..., _r=..., tf=132, option=0x0, str=..., brect=0x0, tabstops=0, tabarraylen=0, painter=0xa1a3d80) at painting/qpainter.cpp:7719 #20 0x012a620a in QPainter::drawText (this=0xa1a3d80, r=..., flags=132, str=..., br=0x0) at painting/qpainter.cpp:5788 #21 0x04dd2744 in dviRenderer::epsf_special (this=0xa1d50a8, cp=...) at ../../../../okular/generators/dvi/special.cpp:431 #22 0x04dd85ec in dviRenderer::applicationDoSpecial (this=0xa1d50a8, cp=0xa2d9968 "PSfile=\"epsdvi.eps\" llx=0 lly=0 urx=73 ury=42 rwi=730 ") at ../../../../okular/generators/dvi/special.cpp:553 #23 0x04dc8b7e in dviRenderer::draw_part (this=0xa1d50a8, current_dimconv=16.604400166044002, is_vfmacro=false) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:536 #24 0x04dc9c93 in dviRenderer::draw_page (this=0xa1d50a8) at ../../../../okular/generators/dvi/dviRenderer_draw.cpp:649 #25 0x04dc5e94 in dviRenderer::drawPage (this=0xa1d50a8, page=0xa1f7ad8) at ../../../../okular/generators/dvi/dviRenderer.cpp:175 #26 0x04dc24ac in dviRenderer::getText (this=0xa1d50a8, page=0xa1f7ad8) at ../../../../okular/generators/dvi/dviRenderer.cpp:264 #27 0x04dbe76e in DviGenerator::textPage (this=0xa1d3f48, page=0xa2789a0) at ../../../../okular/generators/dvi/generator_dvi.cpp:298 #28 0x097ec38a in ?? () from /usr/lib/libokularcore.so.1 #29 0x00de532e in QThreadPrivate::start (arg=0xa2bf738) at thread/qthread_unix.cpp:248 #30 0x0070096e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0 #31 0x02bc4a4e in clone () from /lib/tls/i686/cmov/libc.so.6
I tried to install Kubuntu Lucid (10.04) in a VMs (according the package version, it seems to be the distribution used). I followed the steps, and I found that: - dpkg-reconfigure xserver-xorg does not produce any output (not even with -plow), is it supposed to do something? - I needed to install texlive-binaries (kpsewhich of course) and texlive-base (otherwise tex-common fails) - after that, the file can be opened without problems. Not sure if the behavior would be different in a real system (not a VM). Could you please provide the list of installed packages, if possible? Did you happen to try the same configuration on a newer system?
If you can provide the information requested in comment #10, please add it.
Sorry, at the moment I'm severely time constrained. I'll try to supply the informaption ASAP.
Leo, any update? Hopefully this won't leave our radar :)
I finally set up my own VirtualBox image trying to reproduce the bug. I applied your patch -- and I cannot reproduce the bug with the given testcase under the VM. I tried to reproduce the crash with another test case which crashes okular frequently under 10.4. When I tried the very same file within the VM I could not reproduce the crash. The difference seems to be this message: QPixmap: It is not safe to use pixmaps outside the GUI thread If it appears (without patch), I can crash okular frequently. If it doesn't, okular runs. Therefore, I'm closing this bug. Thanks for your efforts.
(In reply to Leo Savernik from comment #14) > I finally set up my own VirtualBox image trying to reproduce the bug. I > applied your patch -- and I cannot reproduce the bug with the given testcase > under the VM. I tried to reproduce the crash with another test case which > crashes okular frequently under 10.4. > > When I tried the very same file within the VM I could not reproduce the > crash. > > The difference seems to be this message: > QPixmap: It is not safe to use pixmaps outside the GUI thread > > If it appears (without patch), I can crash okular frequently. If it doesn't, > okular runs. > > Therefore, I'm closing this bug. Thanks for your efforts. Thank you for testing! I'm not sure I understand if you needed the patch or not, because it was not applied yet, and if you need it the bug is not INVALID!
Well, yes, I applied the patch in the VM, otherwise I'll keep getting this error message: Am Freitag, 19. September 2014 schrieb Luigi Toscano: > QPixmap: It is not safe to use pixmaps outside the GUI thread Within the VM I could never reproduce any crashes. When I get said crash on the main system, this message always appeared immediately before the crash. That's why I suspect the patch to be necessary, but I could never prove it. Therefore I marked the bug as INVALID.
Git commit 5e2d190ebf5d29f975cbffb3bc3a6f4452367994 by Luigi Toscano. Committed on 22/09/2014 at 20:49. Pushed by ltoscano into branch 'KDE/4.14'. Guard drawText() when X-bitmap fonts are used If the fonts are mapped for some reason to X bitmap fonts, the call to drawText() in the non-GUI thread will produce a crash. Ensure that the rendering of the text is performed only if the threaded font rendering is available - a rare event nowadays, but still possible. M +12 -5 generators/dvi/special.cpp http://commits.kde.org/okular/5e2d190ebf5d29f975cbffb3bc3a6f4452367994