Bug 250728 - crash when opening xps files
Summary: crash when opening xps files
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.10.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-10 01:09 UTC by Peng Zhang
Modified: 2011-06-03 12:27 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
xps file that caused crash (144.82 KB, application/vnd.ms-xpsdocument)
2010-09-10 01:45 UTC, Peng Zhang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Zhang 2010-09-10 01:09:43 UTC
Application: okular (0.10.2)
KDE Platform Version: 4.4.2 (KDE 4.4.2)
Qt Version: 4.6.2
Operating System: Linux 2.6.32-25-generic x86_64
Distribution: Ubuntu 10.04.1 LTS

-- Information about the crash:
create a xps file under windows xp. okular will crash everytime I try to open xps files.

The crash can be reproduced every time.

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

Thread 3 (Thread 0x7fb04241f710 (LWP 5694)):
[KCrash Handler]
#5  QBasicAtomicInt::ref (this=<value optimized out>, fileName=<value optimized out>, size=<value optimized out>) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121
#6  QString (this=<value optimized out>, fileName=<value optimized out>, size=<value optimized out>) at /usr/include/qt4/QtCore/qstring.h:715
#7  XpsFile::getFontByName (this=<value optimized out>, fileName=<value optimized out>, size=<value optimized out>) at ../../../../okular/generators/xps/generator_xps.cpp:1480
#8  0x00007fb04243b468 in XpsHandler::processGlyph (this=0x7fb04241ebe0, node=<value optimized out>) at ../../../../okular/generators/xps/generator_xps.cpp:805
#9  0x00007fb04243c741 in XpsHandler::processEndElement (this=0x7fb04241ebe0, node=...) at ../../../../okular/generators/xps/generator_xps.cpp:1295
#10 0x00007fb04243d849 in XpsHandler::endElement (this=0x7fb04241ebe0, nameSpace=<value optimized out>, localName=..., qname=<value optimized out>)
    at ../../../../okular/generators/xps/generator_xps.cpp:778
#11 0x00007fb04f0d8851 in QXmlSimpleReaderPrivate::processElementEmptyTag (this=0x29f9b30) at sax/qxml.cpp:4010
#12 0x00007fb04f0e1df6 in QXmlSimpleReaderPrivate::parseElement (this=0x29f9b30) at sax/qxml.cpp:3973
#13 0x00007fb04f0e12f8 in QXmlSimpleReaderPrivate::parseContent (this=0x29f9b30) at sax/qxml.cpp:4426
#14 0x00007fb04f0e1d70 in QXmlSimpleReaderPrivate::parseElement (this=0x29f9b30) at sax/qxml.cpp:3952
#15 0x00007fb04f0e4a58 in QXmlSimpleReaderPrivate::parseBeginOrContinue (this=0x29f9b30, state=0, incremental=false) at sax/qxml.cpp:3497
#16 0x00007fb04f0e4df1 in QXmlSimpleReader::parse (this=<value optimized out>, input=0x7fb04241eca0, incremental=false) at sax/qxml.cpp:3439
#17 0x00007fb04242f2b8 in XpsPage::renderToPainter (this=<value optimized out>, painter=<value optimized out>) at ../../../../okular/generators/xps/generator_xps.cpp:1453
#18 0x00007fb04242f620 in XpsPage::renderToImage (this=0x29e6cb0, p=0x7fb04241ede0) at ../../../../okular/generators/xps/generator_xps.cpp:1432
#19 0x00007fb04242f71e in XpsGenerator::image (this=0x29e0ac0, request=0x293b6c0) at ../../../../okular/generators/xps/generator_xps.cpp:2120
#20 0x00007fb045fdf058 in Okular::PixmapGenerationThread::run (this=0x29e8420) at ../../okular/core/generator_p.cpp:64
#21 0x00007fb05069e775 in QThreadPrivate::start (arg=0x29e8420) at thread/qthread_unix.cpp:248
#22 0x00007fb04d89c9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#23 0x00007fb04f3dd72d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#24 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fb041c1e710 (LWP 5695)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fb05069dea3 in QMutexPrivate::wait (this=0x29e1fd0, timeout=-1) at thread/qmutex_unix.cpp:84
#2  0x00007fb050699a05 in QMutex::lock (this=0x29e56d0) at thread/qmutex.cpp:205
#3  0x00007fb04243b26c in QMutexLocker::relock (this=0x29e0ac0, page=0x29e1380) at /usr/include/qt4/QtCore/qmutex.h:120
#4  QMutexLocker (this=0x29e0ac0, page=0x29e1380) at /usr/include/qt4/QtCore/qmutex.h:102
#5  XpsGenerator::textPage (this=0x29e0ac0, page=0x29e1380) at ../../../../okular/generators/xps/generator_xps.cpp:2126
#6  0x00007fb045fdea22 in Okular::TextPageGenerationThread::run (this=0x29e7cf0) at ../../okular/core/generator_p.cpp:103
#7  0x00007fb05069e775 in QThreadPrivate::start (arg=0x29e7cf0) at thread/qthread_unix.cpp:248
#8  0x00007fb04d89c9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007fb04f3dd72d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb052106760 (LWP 5681)):
#0  0x00007fb04f3d0fb3 in *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb04a58629a in ?? () from /usr/lib/libxcb.so.1
#2  0x00007fb04a5867d7 in ?? () from /usr/lib/libxcb.so.1
#3  0x00007fb04a586a85 in xcb_writev () from /usr/lib/libxcb.so.1
#4  0x00007fb04e36f6fa in _XSend () from /usr/lib/libX11.so.6
#5  0x00007fb04e36f839 in _XReply () from /usr/lib/libX11.so.6
#6  0x00007fb04e34cbd3 in XGetSelectionOwner () from /usr/lib/libX11.so.6
#7  0x00007fb05152cd8c in KWindowSystem::compositingActive () at ../../kdeui/windowmanagement/kwindowsystem_x11.cpp:761
#8  0x00007fb04658f515 in OxygenStyle::compositingActive (this=0x25ebb00, obj=0x268fc70, ev=0x7fff58cb9f50) at ../../../kstyles/oxygen/oxygen.cpp:6502
#9  OxygenStyle::eventFilter (this=0x25ebb00, obj=0x268fc70, ev=0x7fff58cb9f50) at ../../../kstyles/oxygen/oxygen.cpp:6208
#10 0x00007fb050792487 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x268fc70, event=0x7fff58cb9f50) at kernel/qcoreapplication.cpp:819
#11 0x00007fb04fb4c1fc in QApplicationPrivate::notify_helper (this=0x2551f80, receiver=0x268fc70, e=0x7fff58cb9f50) at kernel/qapplication.cpp:4296
#12 0x00007fb04fb526fb in QApplication::notify (this=0x7fff58cbd390, receiver=0x268fc70, e=0x7fff58cb9f50) at kernel/qapplication.cpp:4183
#13 0x00007fb0513f4526 in KApplication::notify (this=0x7fff58cbd390, receiver=0x268fc70, event=0x7fff58cb9f50) at ../../kdeui/kernel/kapplication.cpp:302
#14 0x00007fb05079306c in QCoreApplication::notifyInternal (this=0x7fff58cbd390, receiver=0x268fc70, event=0x7fff58cb9f50) at kernel/qcoreapplication.cpp:704
#15 0x00007fb04fba119b in QCoreApplication::sendEvent (this=0x2702f80, recursive=true, disableUpdates=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#16 QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x2702f80, recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7086
#17 0x00007fb04fba110b in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x26455f0, recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7098
#18 0x00007fb04fba110b in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x26f4930, recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7098
#19 0x00007fb04fba110b in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x265f9c0, recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7098
#20 0x00007fb04fba110b in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x2632d70, recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7098
#21 0x00007fb04fba110b in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x261d7a0, recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7098
#22 0x00007fb04fba110b in QWidgetPrivate::sendPendingMoveAndResizeEvents (this=0x260b3a0, recursive=true, disableUpdates=true) at kernel/qwidget.cpp:7098
#23 0x00007fb04fba66fc in QWidgetPrivate::prepareToRender (this=0x260b3a0, region=<value optimized out>, renderFlags=<value optimized out>) at kernel/qwidget.cpp:5163
#24 0x00007fb04fbab577 in QWidget::render (this=<value optimized out>, target=0x7fff58cba680, targetOffset=..., sourceRegion=..., renderFlags=) at kernel/qwidget.cpp:4871
#25 0x00007fb04fc316bb in QPixmap::grabWidget (widget=0x260b1d0, rect=...) at image/qpixmap.cpp:1085
#26 0x00007fb04657ae58 in Oxygen::TransitionWidget::grab (this=0x29acd70, widget=0x1, rect=...) at ../../../kstyles/oxygen/transitions/oxygentransitionwidget.cpp:86
#27 0x00007fb046576ad6 in Oxygen::LineEditData::initializeAnimation (this=0x29acc60) at ../../../kstyles/oxygen/transitions/oxygenlineeditdata.cpp:173
#28 0x00007fb046575e90 in Oxygen::LineEditData::textChanged (this=0x29acc60) at ../../../kstyles/oxygen/transitions/oxygenlineeditdata.cpp:127
#29 0x00007fb0465765c2 in Oxygen::LineEditData::qt_metacall (this=0x29acc60, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff58cbaa10) at ./oxygenlineeditdata.moc:80
#30 0x00007fb0507a5e3f in QMetaObject::activate (sender=0x2979780, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3293
#31 0x00007fb04ff569a2 in QLineEdit::textChanged (this=0x7fff58cb9280, _t1=<value optimized out>) at .moc/release-shared/moc_qlineedit.cpp:238
#32 0x00007fb04ff5a2dc in QLineEdit::qt_metacall (this=0x2979780, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff58cbac00) at .moc/release-shared/moc_qlineedit.cpp:156
#33 0x00007fb0514c9f55 in KLineEdit::qt_metacall (this=0x7fff58cb9280, _c=QMetaObject::ReadProperty, _id=-1, _a=0xffffffffffffffff) at ./klineedit.moc:134
#34 0x00007fb0507a5e3f in QMetaObject::activate (sender=0x2979b10, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3293
#35 0x00007fb0501ea455 in QLineControl::textChanged (this=0x7fff58cb9280, _t1=<value optimized out>) at .moc/release-shared/moc_qlinecontrol_p.cpp:131
#36 0x00007fb04ff605c6 in QLineControl::finishChange (this=0x2979b10, validateFromState=-1, update=<value optimized out>, edited=false) at widgets/qlinecontrol.cpp:605
#37 0x00007fb04ff6083a in QLineControl::internalSetText (this=0x2979b10, txt=<value optimized out>, pos=8, edited=255) at widgets/qlinecontrol.cpp:636
#38 0x00007fb04ff1c5d7 in QComboBoxPrivate::setCurrentIndex (this=0x2978c30, mi=<value optimized out>) at widgets/qcombobox.cpp:1987
#39 0x00007fb04ff1c6dc in QComboBox::setCurrentIndex (this=<value optimized out>, index=0) at widgets/qcombobox.cpp:1975
#40 0x00007fb04ff1fa8b in QComboBoxPrivate::_q_rowsRemoved (this=<value optimized out>, parent=<value optimized out>) at widgets/qcombobox.cpp:1030
#41 0x00007fb04ff21a2f in QComboBox::qt_metacall (this=0x2961660, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff58cbaf60) at .moc/release-shared/moc_qcombobox.cpp:200
#42 0x00007fb0514a8875 in KComboBox::qt_metacall (this=0x7fff58cb9280, _c=QMetaObject::ReadProperty, _id=-1, _a=0xffffffffffffffff) at ./kcombobox.moc:106
#43 0x00007fb0507a5e3f in QMetaObject::activate (sender=0x2978fc0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3293
#44 0x00007fb0507f1274 in QAbstractItemModel::rowsRemoved (this=0x7fff58cb9280, _t1=<value optimized out>, _t2=0, _t3=0) at .moc/release-shared/moc_qabstractitemmodel.cpp:195
#45 0x00007fb05078e1d7 in QAbstractItemModel::endRemoveRows (this=0x2978fc0) at kernel/qabstractitemmodel.cpp:2464
#46 0x00007fb05010d2f9 in QStandardItemModel::removeRows (this=<value optimized out>, row=0, count=1, parent=<value optimized out>) at itemviews/qstandarditemmodel.cpp:2800
#47 0x00007fb05132c245 in KSelectAction::eventFilter (this=0x26fbe80, watched=<value optimized out>, event=<value optimized out>) at ../../kdeui/actions/kselectaction.cpp:739
#48 0x00007fb050792487 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x2961660, event=0x7fff58cbb690) at kernel/qcoreapplication.cpp:819
#49 0x00007fb04fb4c1fc in QApplicationPrivate::notify_helper (this=0x2551f80, receiver=0x2961660, e=0x7fff58cbb690) at kernel/qapplication.cpp:4296
#50 0x00007fb04fb526fb in QApplication::notify (this=0x7fff58cbd390, receiver=0x2961660, e=0x7fff58cbb690) at kernel/qapplication.cpp:4183
#51 0x00007fb0513f4526 in KApplication::notify (this=0x7fff58cbd390, receiver=0x2961660, event=0x7fff58cbb690) at ../../kdeui/kernel/kapplication.cpp:302
#52 0x00007fb05079306c in QCoreApplication::notifyInternal (this=0x7fff58cbd390, receiver=0x2961660, event=0x7fff58cbb690) at kernel/qcoreapplication.cpp:704
#53 0x00007fb04fb97c11 in QCoreApplication::sendEvent (this=0x2961660, action=0x2689e20) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#54 QWidget::removeAction (this=0x2961660, action=0x2689e20) at kernel/qwidget.cpp:3018
#55 0x00007fb05132b480 in KSelectAction::removeAction (this=0x26fbe80, action=0x2689e20) at ../../kdeui/actions/kselectaction.cpp:309
#56 0x00007fb05132a3db in KSelectAction::removeAllActions (this=0x26fbe80) at ../../kdeui/actions/kselectaction.cpp:410
#57 0x00007fb0462d16de in PageView::updateZoomText (this=<value optimized out>) at ../../okular/ui/pageview.cpp:2709
#58 0x00007fb0462d9338 in PageView::notifyViewportChanged (this=0x26b8410, smoothMove=<value optimized out>) at ../../okular/ui/pageview.cpp:916
#59 0x00007fb045fc8093 in Okular::Document::setViewport (this=0x2627330, viewport=..., excludeId=-1, smoothMove=false) at ../../okular/core/document.cpp:2483
#60 0x00007fb045fcec1d in Okular::Document::openDocument (this=0x2627330, docFile=<value optimized out>, url=<value optimized out>, _mime=<value optimized out>) at ../../okular/core/document.cpp:1689
#61 0x00007fb04628986c in Okular::Part::openFile (this=0x26156a0) at ../../okular/part.cpp:930
#62 0x00007fb051cf9117 in KParts::ReadOnlyPart::openUrl (this=0x26156a0, url=<value optimized out>) at ../../kparts/part.cpp:557
#63 0x00007fb04627e04a in Okular::Part::openUrl (this=0x26156a0, _url=<value optimized out>) at ../../okular/part.cpp:1049
#64 0x0000000000409a8a in Shell::openUrl (this=0x260b1d0, url=...) at ../../../okular/shell/shell.cpp:130
#65 0x000000000040a3ac in Shell::qt_metacall (this=0x260b1d0, _c=QMetaObject::InvokeMetaMethod, _id=-1, _a=0x7fff58cbc8e0) at ./shell.moc:94
#66 0x00007fb0507a5e3f in QMetaObject::activate (sender=0x29807f0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3293
#67 0x00007fb0507ad65f in QSingleShotTimer::timerEvent (this=0x29807f0) at kernel/qtimer.cpp:308
#68 0x00007fb0507a2a63 in QObject::event (this=0x29807f0, e=0x7fff58cbd040) at kernel/qobject.cpp:1212
#69 0x00007fb04fb4c22c in QApplicationPrivate::notify_helper (this=0x2551f80, receiver=0x29807f0, e=0x7fff58cbd040) at kernel/qapplication.cpp:4300
#70 0x00007fb04fb526fb in QApplication::notify (this=0x7fff58cbd390, receiver=0x29807f0, e=0x7fff58cbd040) at kernel/qapplication.cpp:4183
#71 0x00007fb0513f4526 in KApplication::notify (this=0x7fff58cbd390, receiver=0x29807f0, event=0x7fff58cbd040) at ../../kdeui/kernel/kapplication.cpp:302
#72 0x00007fb05079306c in QCoreApplication::notifyInternal (this=0x7fff58cbd390, receiver=0x29807f0, event=0x7fff58cbd040) at kernel/qcoreapplication.cpp:704
#73 0x00007fb0507bfd42 in QCoreApplication::sendEvent (this=0x2555c00) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#74 QTimerInfoList::activateTimers (this=0x2555c00) at kernel/qeventdispatcher_unix.cpp:603
#75 0x00007fb0507bc824 in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:184
#76 0x00007fb04babc8c2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#77 0x00007fb04bac0748 in ?? () from /lib/libglib-2.0.so.0
#78 0x00007fb04bac08fc in g_main_context_iteration () from /lib/libglib-2.0.so.0
#79 0x00007fb0507bc513 in QEventDispatcherGlib::processEvents (this=0x2551f40, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#80 0x00007fb04fbfc46e in QGuiEventDispatcherGlib::processEvents (this=0x7fff58cb9280, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#81 0x00007fb050791992 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#82 0x00007fb050791d6c in QEventLoop::exec (this=0x7fff58cbd2e0, flags=) at kernel/qeventloop.cpp:201
#83 0x00007fb050795aab in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#84 0x000000000040889c in main (argc=<value optimized out>, argv=<value optimized out>) at ../../../okular/shell/main.cpp:82

Reported using DrKonqi
Comment 1 Albert Astals Cid 2010-09-10 01:12:27 UTC
Can you attach the file that causes the crash?
Comment 2 Peng Zhang 2010-09-10 01:45:15 UTC
Created attachment 51495 [details]
xps file that caused crash
Comment 3 Albert Astals Cid 2010-09-10 20:21:18 UTC
Works for me, can you please run
valgrind okular /path/to/my/file.xps
and paste the output?
Comment 4 Peng Zhang 2010-09-11 03:24:34 UTC
(In reply to comment #3)
> Works for me, can you please run
> valgrind okular /path/to/my/file.xps
> and paste the output?

==3019== Memcheck, a memory error detector
==3019== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==3019== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==3019== Command: okular /media/PZHANG/mzdhl.xps
==3019== 
okular(3019)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3019)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3019)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
==3019== Thread 3:
==3019== Invalid read of size 4
==3019==    at 0x15721330: XpsFile::getFontByName(QString const&, float) (qatomic_x86_64.h:121)
==3019==    by 0x15722690: XpsPage::textPage() (generator_xps.cpp:1643)
==3019==    by 0x15723295: XpsGenerator::textPage(Okular::Page*) (generator_xps.cpp:2128)
==3019==    by 0x11B99A21: Okular::TextPageGenerationThread::run() (generator_p.cpp:103)
==3019==    by 0x6321774: QThreadPrivate::start(void*) (qthread_unix.cpp:248)
==3019==    by 0x92A39C9: start_thread (pthread_create.c:300)
==3019==    by 0x77BC72C: clone (clone.S:112)
==3019==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==3019== 
KCrash: Application 'okular' crashing...
sock_file=/home/pczhang/.kde/socket-W500/kdeinit4__0

[1]+  Stopped                 valgrind okular /media/PZHANG/mzdhl.xps
Comment 5 Peng Zhang 2010-09-11 03:26:42 UTC
(In reply to comment #3)
> Works for me, can you please run
> valgrind okular /path/to/my/file.xps
> and paste the output?

pczhang@W500:~$ valgrind okular /media/PZHANG/mzdhl.xps
==3019== Memcheck, a memory error detector
==3019== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==3019== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==3019== Command: okular /media/PZHANG/mzdhl.xps
==3019== 
okular(3019)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3019)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
okular(3019)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
==3019== Thread 3:
==3019== Invalid read of size 4
==3019==    at 0x15721330: XpsFile::getFontByName(QString const&, float) (qatomic_x86_64.h:121)
==3019==    by 0x15722690: XpsPage::textPage() (generator_xps.cpp:1643)
==3019==    by 0x15723295: XpsGenerator::textPage(Okular::Page*) (generator_xps.cpp:2128)
==3019==    by 0x11B99A21: Okular::TextPageGenerationThread::run() (generator_p.cpp:103)
==3019==    by 0x6321774: QThreadPrivate::start(void*) (qthread_unix.cpp:248)
==3019==    by 0x92A39C9: start_thread (pthread_create.c:300)
==3019==    by 0x77BC72C: clone (clone.S:112)
==3019==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==3019== 
KCrash: Application 'okular' crashing...
sock_file=/home/pczhang/.kde/socket-W500/kdeinit4__0

[1]+  Stopped                 valgrind okular /media/PZHANG/mzdhl.xps
pczhang@W500:~$ ==3019== 
==3019== HEAP SUMMARY:
==3019==     in use at exit: 6,763,222 bytes in 48,061 blocks
==3019==   total heap usage: 578,044 allocs, 529,983 frees, 120,870,688 bytes allocated
==3019== 
==3019== LEAK SUMMARY:
==3019==    definitely lost: 7,496 bytes in 46 blocks
==3019==    indirectly lost: 21,000 bytes in 659 blocks
==3019==      possibly lost: 1,876,144 bytes in 25,989 blocks
==3019==    still reachable: 4,858,582 bytes in 21,367 blocks
==3019==         suppressed: 0 bytes in 0 blocks
==3019== Rerun with --leak-check=full to see details of leaked memory
==3019== 
==3019== For counts of detected and suppressed errors, rerun with: -v
==3019== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 15 from 5)

[1]+  Exit 253                valgrind okular /media/PZHANG/mzdhl.xps
Comment 6 Albert Astals Cid 2010-09-14 22:31:48 UTC
I see you are using "Ubuntu 10.04.1 LTS", do you have anything installed from packages or do you have some custom compiled packages around?

Also can you please run
  dpkg -l | grep fontconfig
in a shell and paste the output?

And the same for
  set | grep LANG
and
  set | grep LC_
Comment 7 Peng Zhang 2010-09-15 03:49:42 UTC
Hi,

I have installed dropbox and nxclient from debs, and backported auctex and preview-latex from ubuntu maverick.

pczhang@W500:~$ dpkg -l | grep fontconfig
ii  fontconfig                                 2.8.0-2ubuntu1                                  generic font configuration library - support binaries
ii  fontconfig-config                          2.8.0-2ubuntu1                                  generic font configuration library - configuration
ii  libfontconfig1                             2.8.0-2ubuntu1                                  generic font configuration library - runtime

pczhang@W500:~$ set | grep LANG
GDM_LANG=en_US.utf8
LANG=en_US.utf8
LANGUAGE=en_US:en
    LANG=C LC_MESSAGES=C svn info --non-interactive 2> /dev/null | while read line; do
pczhang@W500:~$ set | grep LC_
LC_CTYPE=zh_CN.UTF-8
    local LC_CTYPE=C;
    LANG=C LC_MESSAGES=C svn info --non-interactive 2> /dev/null | while read line; do

Thank you for your time and let me know if I can provide more information.

Best,
Peng

(In reply to comment #6)
> I see you are using "Ubuntu 10.04.1 LTS", do you have anything installed from
> packages or do you have some custom compiled packages around?
> 
> Also can you please run
>   dpkg -l | grep fontconfig
> in a shell and paste the output?
> 
> And the same for
>   set | grep LANG
> and
>   set | grep LC_
Comment 8 Albert Astals Cid 2010-09-22 00:35:54 UTC
LC_CTYPE=zh_CN.UTF-8
is the culprit, i yet have to discover way.
As a temporary workaround you can open a shell and assuming you use bash you can do
export LC_CTYPE=C
and then run okular from that shell
Comment 9 Peng Zhang 2010-09-22 01:12:18 UTC
I can confirm that your workaround solves the problem. Thanks!

(In reply to comment #8)
> LC_CTYPE=zh_CN.UTF-8
> is the culprit, i yet have to discover way.
> As a temporary workaround you can open a shell and assuming you use bash you
> can do
> export LC_CTYPE=C
> and then run okular from that shell
Comment 10 Brad Hards 2010-10-06 00:36:57 UTC
I think this is a bug in Qt. 

I've created a test case and filed an upstream bug report (http://bugreports.qt.nokia.com/browse/QTBUG-14269).

If that gets acknowledged as a Qt bug (rather than the way we're using QFontDatabase), then I'll close this bug.
Comment 11 Brad Hards 2010-10-06 22:41:13 UTC
This was acknowledged as a P2 bug in Qt, planned for a 4.7.x fix.