Bug 111531 - Choosing a special font crashes kwrite
Summary: Choosing a special font crashes kwrite
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: qt (show other bugs)
Version: SVN
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-26 05:31 UTC by patch_linams
Modified: 2008-04-01 21:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
TTF file combination that crashes kwrite (17.13 KB, application/x-bzip2)
2005-08-26 14:50 UTC, patch_linams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description patch_linams 2005-08-26 05:31:46 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Fedora RPMs
Compiler:          gcc (GCC) 3.4.1 20040702 (Red Hat Linux 3.4.1-2) Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --host=i386-redhat-linux
Thread model: posix
OS:                Linux

Hello!

i've got a TTF file (DISSOLVE.TTF). Once it's installed it'll have the font name "sugar [dissolve]" in the font list in "Settings->Configure Editor->Fonts & Colors->Font". Choosing (just selecting) "sugar [dissolve]" crashes kwrite. Here is the backtrace:

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1208125760 (LWP 21584)]
[KCrash handler]
#4  0x048dfc1f in qt_fillFontDef () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#5  0x048e2bb9 in QFontDatabase::font () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#6  0x0513c19b in KFontChooser::style_chosen_slot ()
   from /usr/lib/libkdeui.so.4
#7  0x0513c956 in KFontChooser::family_chosen_slot ()
   from /usr/lib/libkdeui.so.4
#8  0x0513ccb3 in KFontChooser::qt_invoke () from /usr/lib/libkdeui.so.4
#9  0x0491d3f0 in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#10 0x0491d69e in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#11 0x04c5dea5 in QListBox::highlighted ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#12 0x049ef06d in QListBox::setSelected ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#13 0x049f1324 in QListBox::mousePressEventEx ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#14 0x049f18d8 in QListBox::mousePressEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#15 0x049531fd in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#16 0x048be899 in QApplication::internalNotify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#17 0x048bead9 in QApplication::notify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#18 0x04e363b8 in KApplication::notify () from /usr/lib/libkdecore.so.4
#19 0x0485da2e in QETWidget::translateMouseEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#20 0x0485c2c8 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#21 0x0486e6d6 in QEventLoop::processEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#22 0x048d3ec5 in QEventLoop::enterLoop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#23 0x048bdac1 in QApplication::enter_loop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x04a9e120 in QDialog::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0xb7d5ddd2 in KateDocument::configDialog ()
   from /usr/lib/kde3/libkatepart.so
#26 0xb7d72a7b in KateDocument::qt_invoke () from /usr/lib/kde3/libkatepart.so
#27 0x0491d3f0 in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#28 0x0491daca in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#29 0x050e0f49 in KAction::activated () from /usr/lib/libkdeui.so.4
#30 0x050e0f6d in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#31 0x050e101c in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#32 0x0491d3f0 in QObject::activate_signal ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#33 0x04c4e50d in QSignal::signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#34 0x0493612d in QSignal::activate () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#35 0x04a1f586 in QPopupMenu::mouseReleaseEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#36 0x0495334a in QWidget::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#37 0x048be899 in QApplication::internalNotify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#38 0x048bead9 in QApplication::notify ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#39 0x04e363b8 in KApplication::notify () from /usr/lib/libkdecore.so.4
#40 0x0485dc9c in QETWidget::translateMouseEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#41 0x0485c2c8 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#42 0x0486e6d6 in QEventLoop::processEvents ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#43 0x048d3ec5 in QEventLoop::enterLoop ()
   from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#44 0x048d3e1e in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#45 0x048bda9b in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#46 0x00be84c9 in kdemain () from /usr/lib/libkdeinit_kwrite.so
#47 0x08048622 in ?? ()
#48 0x00000001 in ?? ()
#49 0xbfe2d0f4 in ?? ()
#50 0x08049708 in ?? ()
#51 0x0089eff4 in ?? () from /lib/tls/libc.so.6
#52 0x00000000 in ?? ()
#53 0x00776c80 in ?? () from /lib/ld-linux.so.2
#54 0xbfe2d0c8 in ?? ()
#55 0x0078ee33 in __libc_start_main () from /lib/tls/libc.so.6

It's not a kwrite's problem specifically. Any other program that uses the font choosing dialog will crash (kedit, kate, "Appearance & Themes->Fonts->Choose" in kcontrol and so on). Even konqueror crashes when it's run from the command line by typing "konqueror DISSOLVE.TTF". Therefore the crash can be reproduced in many ways. The interesting thing is that kfontview has no problem handling DISSOLVE.TTF.

To reproduce the crash DISSOLVE.TTF is needed so i can send it to the KDE developer the bug will be assigned to.


Bye.
Comment 1 patch_linams 2005-08-26 08:04:53 UTC
Information update:

After taking a look at the code of kfontdialog.cpp i thought there might be a combination of TTF files that crashes kwrite, not a single TTF file. So i left only DISSOLVE.TTF in the ~/.fonts directory, chose "sugar [dissolve]" in the font choosing dialog => no crash; then i installed another font that appeared to be from the same font family (SUGAR.TTF as "sugar"), chose "sugar [dissolve]" => crash.
Comment 2 patch_linams 2005-08-26 14:50:35 UTC
Created attachment 12386 [details]
TTF file combination that crashes kwrite

Well, the crash can be reproduced again and again. Therefore the two TTF files
(DISSOLVE.TTF and SUGAR.TTF) are attached (ttfs.tar.bz2). They can be copied
e.g. to ~/.fonts for testing purposes.
Comment 3 Christoph Cullmann 2005-09-29 19:35:59 UTC
As you see, it already crashs in kdelibs/qt classes
Comment 4 patch_linams 2007-07-19 15:44:20 UTC
An update with another system configuration:

Version:            (using KDE KDE 3.5.7)
Installed from:    SuSE RPMs
Compiler:          gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) Target: i586-suse-linux Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix=-4.1 --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=i586-suse-linux Thread model: posix
OS:                Linux 


It still crashes with the fonts in ttfs.tar.bz2


Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1230764336 (LWP 16928)]
[KCrash handler]
#9  0xb7553932 in bestStyle () from /usr/lib/qt3/lib/libqt-mt.so.3
#10 0xb755a7a6 in QFontDatabase::font () from /usr/lib/qt3/lib/libqt-mt.so.3
#11 0xb6e7834c in KFontChooser::style_chosen_slot ()
   from /opt/kde3/lib/libkdeui.so.4
#12 0xb6ec58f7 in KFontChooser::family_chosen_slot ()
   from /opt/kde3/lib/libkdeui.so.4
#13 0xb6ec5c4b in KFontChooser::qt_invoke () from /opt/kde3/lib/libkdeui.so.4
#14 0xb7591f1d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0xb7592762 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0xb78de7f3 in QListBox::highlighted () from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0xb766aaef in QListBox::setSelected () from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0xb766712a in QListBox::mousePressEventEx ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0xb7667534 in QListBox::mousePressEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0xb75ca89e in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0xb75329c7 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0xb7533909 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0xb7bb8ca2 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#24 0xb74d1f57 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0xb74d10ff in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0xb74e198a in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0xb75497f0 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#28 0xb75324ef in QApplication::enter_loop ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0xb7718d75 in QDialog::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#30 0xb6201d93 in KateDocument::configDialog ()
   from /opt/kde3/lib/kde3/libkatepart.so
#31 0xb628896d in KateDocument::qt_invoke ()
   from /opt/kde3/lib/kde3/libkatepart.so
#32 0xb7591f1d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#33 0xb7592b5d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#34 0xb6e02239 in KAction::activated () from /opt/kde3/lib/libkdeui.so.4
#35 0xb6e408e2 in KAction::slotActivated () from /opt/kde3/lib/libkdeui.so.4
#36 0xb6f08fcd in KAction::slotPopupActivated ()
   from /opt/kde3/lib/libkdeui.so.4
#37 0xb6f09291 in KAction::qt_invoke () from /opt/kde3/lib/libkdeui.so.4
#38 0xb7591f1d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#39 0xb78cd0ae in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
#40 0xb75adff7 in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
#41 0xb76980e7 in QPopupMenu::mouseReleaseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#42 0xb6e0b58e in KPopupMenu::mouseReleaseEvent ()
   from /opt/kde3/lib/libkdeui.so.4
#43 0xb75ca880 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#44 0xb75329c7 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#45 0xb7533909 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#46 0xb7bb8ca2 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#47 0xb74d2859 in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#48 0xb74d10ff in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#49 0xb74e198a in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#50 0xb75497f0 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#51 0xb7549686 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#52 0xb753257f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#53 0xb68a381f in kdemain () from /opt/kde3/lib/libkdeinit_kwrite.so
#54 0xb730a524 in kdeinitmain () from /opt/kde3/lib/kde3/kwrite.so
#55 0x0804e33f in launch ()
#56 0x0804ebca in handle_launcher_request ()
#57 0x0804ef4f in handle_requests ()
#58 0x0805014c in main ()
Comment 5 patch_linams 2008-04-01 21:00:56 UTC
Some time ago I contacted Trolltech about this bug. Here's the tracker:

http://trolltech.com/developer/task-tracker/index_html?method=entry&id=172420

It seems to be fixed in QT 4.
Comment 6 Urs Wolfer 2008-04-01 21:47:17 UTC
Fixed according to comment #5.