Bug 274482 - Crash when opening a .xps file appended to a Thunderbird mail
Summary: Crash when opening a .xps file appended to a Thunderbird mail
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: XPS backend (show other bugs)
Version: 0.12.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
: 275780 279119 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-29 23:48 UTC by Arbiel Perlacremaz
Modified: 2012-02-22 19:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.7


Attachments
printable file (141.89 KB, application/oxps)
2011-06-04 00:21 UTC, Arbiel Perlacremaz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arbiel Perlacremaz 2011-05-29 23:48:55 UTC
Application: okular (0.12.2)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-8-generic x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed: the application crashed 
when I requested it to open an appended .xps file in a thunderbird e-mail.

The crash can be reproduced every time.

-- Backtrace:
Application: Okular (okular), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fa0eae7e780 (LWP 3334))]

Thread 4 (Thread 0x7fa0dfae4700 (LWP 3335)):
#0  0x00007fa0e8108f03 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fa0e5006104 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fa0e50069f2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fa0e0443c44 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fa0e502d3e4 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fa0e54d1d8c in start_thread (arg=0x7fa0dfae4700) at pthread_create.c:304
#6  0x00007fa0e811604d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fa0c8910700 (LWP 3339)):
[KCrash Handler]
#6  0x0000000000000000 in ?? ()
#7  0x00007fa0c892048c in XpsFile::loadFontByName (this=<value optimized out>, fileName=...) at ../../../../okular/generators/xps/generator_xps.cpp:1503
#8  0x00007fa0c89249a0 in XpsFile::getFontByName (this=0x1d28960, fileName=..., size=15.9961004) at ../../../../okular/generators/xps/generator_xps.cpp:1471
#9  0x00007fa0c8927cc7 in XpsHandler::processGlyph (this=0x7fa0c890fc00, node=...) at ../../../../okular/generators/xps/generator_xps.cpp:805
#10 0x00007fa0c892b629 in XpsHandler::processEndElement (this=0x7fa0c890fc00, node=...) at ../../../../okular/generators/xps/generator_xps.cpp:1295
#11 0x00007fa0c892cd88 in XpsHandler::endElement (this=0x7fa0c890fc00, nameSpace=<value optimized out>, localName=..., qname=<value optimized out>) at ../../../../okular/generators/xps/generator_xps.cpp:778
#12 0x00007fa0e7910243 in QXmlSimpleReaderPrivate::processElementEmptyTag (this=0x7fa0d8023a40) at sax/qxml.cpp:4010
#13 0x00007fa0e7910ce8 in QXmlSimpleReaderPrivate::parseElement (this=0x7fa0d8023a40) at sax/qxml.cpp:3973
#14 0x00007fa0e79114c8 in QXmlSimpleReaderPrivate::parseContent (this=0x7fa0d8023a40) at sax/qxml.cpp:4426
#15 0x00007fa0e7910c68 in QXmlSimpleReaderPrivate::parseElement (this=0x7fa0d8023a40) at sax/qxml.cpp:3952
#16 0x00007fa0e79114c8 in QXmlSimpleReaderPrivate::parseContent (this=0x7fa0d8023a40) at sax/qxml.cpp:4426
#17 0x00007fa0e7910c68 in QXmlSimpleReaderPrivate::parseElement (this=0x7fa0d8023a40) at sax/qxml.cpp:3952
#18 0x00007fa0e7911f70 in QXmlSimpleReaderPrivate::parseBeginOrContinue (this=0x7fa0d8023a40, state=<value optimized out>, incremental=false) at sax/qxml.cpp:3497
#19 0x00007fa0e791225e in QXmlSimpleReader::parse (this=<value optimized out>, input=0x7fa0c890fcc0, incremental=false) at sax/qxml.cpp:3439
#20 0x00007fa0c8920f4a in XpsPage::renderToPainter (this=0x1d2a860, painter=0x7fa0c890fd30) at ../../../../okular/generators/xps/generator_xps.cpp:1453
#21 0x00007fa0c8921213 in XpsPage::renderToImage (this=0x1d2a860, p=0x7fa0c890fdf0) at ../../../../okular/generators/xps/generator_xps.cpp:1432
#22 0x00007fa0c892131f in XpsGenerator::image (this=0x1d27910, request=0x1bc61f0) at ../../../../okular/generators/xps/generator_xps.cpp:2128
#23 0x00007fa0cd345329 in Okular::PixmapGenerationThread::run (this=0x1d299e0) at ../../okular/core/generator_p.cpp:64
#24 0x00007fa0e89b5175 in QThreadPrivate::start (arg=0x1d299e0) at thread/qthread_unix.cpp:320
#25 0x00007fa0e54d1d8c in start_thread (arg=0x7fa0c8910700) at pthread_create.c:304
#26 0x00007fa0e811604d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#27 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fa0c810f700 (LWP 3340)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fa0e89b42b3 in QMutexPrivate::wait (this=0x1d38840, timeout=-1) at thread/qmutex_unix.cpp:84
#2  0x00007fa0e89b0d05 in QMutex::lock (this=0x1a85470) at thread/qmutex.cpp:204
#3  0x00007fa0c89277c2 in QMutexLocker (this=0x1d27910, page=0x1d5f450) at /usr/include/qt4/QtCore/qmutex.h:102
#4  XpsGenerator::textPage (this=0x1d27910, page=0x1d5f450) at ../../../../okular/generators/xps/generator_xps.cpp:2134
#5  0x00007fa0cd345162 in Okular::TextPageGenerationThread::run (this=0x1d2bf00) at ../../okular/core/generator_p.cpp:103
#6  0x00007fa0e89b5175 in QThreadPrivate::start (arg=0x1d2bf00) at thread/qthread_unix.cpp:320
#7  0x00007fa0e54d1d8c in start_thread (arg=0x7fa0c810f700) at pthread_create.c:304
#8  0x00007fa0e811604d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa0eae7e780 (LWP 3334)):
#0  0x00007fa0e8108f03 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fa0e24b1512 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007fa0e24b2b3f in xcb_wait_for_reply () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007fa0e6de08ad in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#4  0x00007fa0e6dd5c30 in XQueryPointer () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#5  0x00007fa0e94e3c3f in QCursor::pos () at kernel/qcursor_x11.cpp:159
#6  0x00007fa0cd62d5e1 in PageView::notifyViewportChanged (this=0x1bbe430, smoothMove=false) at ../../okular/ui/pageview.cpp:939
#7  0x00007fa0cd32f06b in Okular::Document::setViewport (this=0x1ab91f0, viewport=..., excludeId=-1, smoothMove=false) at ../../okular/core/document.cpp:2478
#8  0x00007fa0cd33ca9c in Okular::Document::openDocument (this=0x1ab91f0, docFile=<value optimized out>, url=<value optimized out>, _mime=<value optimized out>) at ../../okular/core/document.cpp:1679
#9  0x00007fa0cd5de5e1 in Okular::Part::openFile (this=0x1aa7770) at ../../okular/part.cpp:955
#10 0x00007fa0eaa6dab0 in KParts::ReadOnlyPartPrivate::openLocalFile (this=0x1a98630) at ../../kparts/part.cpp:592
#11 0x00007fa0eaa6e0f4 in KParts::ReadOnlyPart::openUrl (this=0x1aa7770, url=...) at ../../kparts/part.cpp:556
#12 0x00007fa0cd5d7285 in Okular::Part::openUrl (this=0x1aa7770, _url=<value optimized out>) at ../../okular/part.cpp:1076
#13 0x0000000000408cd4 in Shell::openUrl (this=0x1a47010, url=...) at ../../../okular/shell/shell.cpp:133
#14 0x000000000040a82c in Shell::qt_metacall (this=0x1a47010, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x1ccbf20) at ./shell.moc:94
#15 0x00007fa0e8ab049a in QObject::event (this=0x1a47010, e=<value optimized out>) at kernel/qobject.cpp:1226
#16 0x00007fa0e94ac66d in QWidget::event (this=0x1a47010, event=0x1ced9f0) at kernel/qwidget.cpp:8718
#17 0x00007fa0e987651b in QMainWindow::event (this=0x1a47010, event=0x1ced9f0) at widgets/qmainwindow.cpp:1480
#18 0x00007fa0ea275d8e in KXmlGuiWindow::event (this=0x1a47010, ev=0x1ced9f0) at ../../kdeui/xmlgui/kxmlguiwindow.cpp:126
#19 0x00007fa0e945b9e4 in QApplicationPrivate::notify_helper (this=0x185ecf0, receiver=0x1a47010, e=0x1ced9f0) at kernel/qapplication.cpp:4462
#20 0x00007fa0e94603aa in QApplication::notify (this=<value optimized out>, receiver=0x1a47010, e=0x1ced9f0) at kernel/qapplication.cpp:4341
#21 0x00007fa0ea17a866 in KApplication::notify (this=0x7fff47435950, receiver=0x1a47010, event=0x1ced9f0) at ../../kdeui/kernel/kapplication.cpp:311
#22 0x00007fa0e8a9c49c in QCoreApplication::notifyInternal (this=0x7fff47435950, receiver=0x1a47010, event=0x1ced9f0) at kernel/qcoreapplication.cpp:731
#23 0x00007fa0e8a9fc25 in sendEvent (receiver=0x0, event_type=0, data=0x1814b60) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#24 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1814b60) at kernel/qcoreapplication.cpp:1372
#25 0x00007fa0e8ac7253 in sendPostedEvents (s=0x1862560) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#26 postEventSourceDispatch (s=0x1862560) at kernel/qeventdispatcher_glib.cpp:277
#27 0x00007fa0e5005bcd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007fa0e50063a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007fa0e5006639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007fa0e8ac73ef in QEventDispatcherGlib::processEvents (this=0x1814340, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#31 0x00007fa0e9502dfe in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#32 0x00007fa0e8a9b882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#33 0x00007fa0e8a9babc in QEventLoop::exec (this=0x7fff474358d0, flags=...) at kernel/qeventloop.cpp:201
#34 0x00007fa0e8a9fecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#35 0x000000000040812e in main (argc=4, argv=<value optimized out>) at ../../../okular/shell/main.cpp:85

Reported using DrKonqi
Comment 1 Pino Toscano 2011-05-29 23:58:53 UTC
If the document is not private, can you please provide it?
Comment 2 Arbiel Perlacremaz 2011-06-02 19:26:59 UTC
Be aware that I'm using Gnome, whereas Okular is said to be for a KDE 
environment. However, I've been able to use it for other files.

Le 29/05/2011 23:58, Pino Toscano a écrit :
> https://bugs.kde.org/show_bug.cgi?id=274482
>
>
> Pino Toscano<pino@kde.org>  changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>            Component|general                     |XPS backend
>
>
>
>
> --- Comment #1 from Pino Toscano<pino kde org>   2011-05-29 23:58:53 ---
> If the document is not private, can you please provide it?
>
Comment 3 Pino Toscano 2011-06-02 19:35:41 UTC
(In reply to comment #2)
> Be aware that I'm using Gnome, whereas Okular is said to be for a KDE 
> environment.

Irrelevant (other than wrong).

> However, I've been able to use it for other files.

That's why I asked you about to attach to this bug report the document, if that document can be publically provided.
Comment 4 Arbiel Perlacremaz 2011-06-03 18:07:10 UTC
I thought I did attach the file to my previous message. Please, tell me 
if it is not attached here, in which case I'll transfer you the very 
message the file was attached to.

Best regards

Arbiel

Le 02/06/2011 19:35, Pino Toscano a écrit :
> https://bugs.kde.org/show_bug.cgi?id=274482
>
>
>
>
>
> --- Comment #3 from Pino Toscano<pino kde org>   2011-06-02 19:35:41 ---
> (In reply to comment #2)
>> Be aware that I'm using Gnome, whereas Okular is said to be for a KDE
>> environment.
> Irrelevant (other than wrong).
>
>> However, I've been able to use it for other files.
> That's why I asked you about to attach to this bug report the document, if that
> document can be publically provided.
>
Comment 5 Pino Toscano 2011-06-03 18:32:45 UTC
(In reply to comment #4)
> I thought I did attach the file to my previous message. Please, tell me 
> if it is not attached here, in which case I'll transfer you the very 
> message the file was attached to.

Attaching files to emails sent to bugs has no effect; please open (while you are logged in) the page of this bug - https://bugs.kde.org/show_bug.cgi?id=274482 - click on "Add an attachment" almost at the bottom of the page, and fill the attachment details (including choosing the file from your computer).
Comment 6 Arbiel Perlacremaz 2011-06-04 00:21:53 UTC
Created attachment 60595 [details]
printable file
Comment 7 Pino Toscano 2011-06-04 00:33:55 UTC
Thanks for the document, I'm able to reproduce the crash... getting also two different crash reasons (at least, that's would seem at first).
Comment 8 Pino Toscano 2011-06-04 20:54:58 UTC
Git commit 7e0cfa231927eb1758af91a8bf5348475a6aad4e by Pino Toscano.
Committed on 04/06/2011 at 20:19.
Pushed by pino into branch 'master'.

xps: load fonts with readFileOrDirectoryParts()

apparently, even those can be split in multiple chunks

CCBUG: 274482

M  +2    -2    generators/xps/generator_xps.cpp     

http://commits.kde.org/okular/7e0cfa231927eb1758af91a8bf5348475a6aad4e
Comment 9 Pino Toscano 2011-06-04 20:54:58 UTC
Git commit 31a2e0af57670bfffae1ca62c3e9f13d8e564308 by Pino Toscano.
Committed on 04/06/2011 at 20:52.
Pushed by pino into branch 'master'.

xps: use readFileOrDirectoryParts() also when creating a text page

just like it is done when rendering

CCBUG: 274482

M  +1    -1    generators/xps/generator_xps.cpp     

http://commits.kde.org/okular/31a2e0af57670bfffae1ca62c3e9f13d8e564308
Comment 10 Pino Toscano 2011-06-16 09:28:32 UTC
Both the two crash reasons of this document have been fixed for KDE 4.7.
Comment 11 Pino Toscano 2011-06-16 23:49:31 UTC
*** Bug 275780 has been marked as a duplicate of this bug. ***
Comment 12 Pino Toscano 2011-08-02 08:13:31 UTC
*** Bug 279119 has been marked as a duplicate of this bug. ***