Bug 211016 - Choqok crash at startup [QPixmapData::fromData with invalid data (xml/html as input), Choqok::MediaManager::slotImageFetched]
Summary: Choqok crash at startup [QPixmapData::fromData with invalid data (xml/html as...
Status: RESOLVED UPSTREAM
Alias: None
Product: choqok
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Mehrdad Momeny
URL:
Keywords:
: 215566 218059 221675 221819 221941 222194 223990 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-18 22:10 UTC by julian
Modified: 2010-01-24 20:18 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description julian 2009-10-18 22:10:08 UTC
Application that crashed: choqok
Version of the application: 1.0 Alpha2 (0.9.4)
KDE Version: 4.3.2 (KDE 4.3.2)
Qt Version: 4.6.0
Operating System: Linux 2.6.30-2-686 i686
Distribution: Debian GNU/Linux unstable (sid)

What I was doing when the application crashed:
Choqok crashes at startup. Just one second after showing the main window.
libqt4 has been updated to 4.6 just few hours before. This seems to be the only difference on my system which could be causing this.
I'm using choqok and libqt4 provided by debian.

 -- Backtrace:
Application: Choqok (choqok), signal: Segmentation fault
[Current thread is 1 (Thread 0xb5ed6700 (LWP 22962))]

Thread 3 (Thread 0xb1a3fb90 (LWP 23007)):
#0  0xb8084424 in __kernel_vsyscall ()
#1  0xb6318292 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb66c48b4 in pthread_cond_timedwait () from /lib/i686/cmov/libc.so.6
#3  0xb74ab96c in QWaitConditionPrivate::wait (this=0xa68f72c, mutex=0xa68f728, time=30000) at thread/qwaitcondition_unix.cpp:85
#4  QWaitCondition::wait (this=0xa68f72c, mutex=0xa68f728, time=30000) at thread/qwaitcondition_unix.cpp:159
#5  0xb74a08db in QThreadPoolThread::run (this=0x98cf0d0) at concurrent/qthreadpool.cpp:140
#6  0xb74aaa9e in QThreadPrivate::start (arg=0x98cf0d0) at thread/qthread_unix.cpp:244
#7  0xb63144b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8  0xb66b5a5e in clone () from /lib/i686/cmov/libc.so.6

Thread 2 (Thread 0xb1220b90 (LWP 23009)):
#0  0xb8084424 in __kernel_vsyscall ()
#1  0xb6318292 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb66c48b4 in pthread_cond_timedwait () from /lib/i686/cmov/libc.so.6
#3  0xb74ab96c in QWaitConditionPrivate::wait (this=0xa68f72c, mutex=0xa68f728, time=30000) at thread/qwaitcondition_unix.cpp:85
#4  QWaitCondition::wait (this=0xa68f72c, mutex=0xa68f728, time=30000) at thread/qwaitcondition_unix.cpp:159
#5  0xb74a08db in QThreadPoolThread::run (this=0x986a598) at concurrent/qthreadpool.cpp:140
#6  0xb74aaa9e in QThreadPrivate::start (arg=0x986a598) at thread/qthread_unix.cpp:244
#7  0xb63144b5 in start_thread () from /lib/i686/cmov/libpthread.so.0
#8  0xb66b5a5e in clone () from /lib/i686/cmov/libc.so.6

Thread 1 (Thread 0xb5ed6700 (LWP 22962)):
[KCrash Handler]
#6  QImageData::checkForAlphaPixels (this=0x0) at image/qimage.cpp:273
#7  0xb6abf9db in QX11AlphaDetector::hasAlpha (this=0x9e71ac8, img=..., flags=...) at image/qpixmap_x11.cpp:380
#8  QX11AlphaDetector::hasXRenderAndAlpha (this=0x9e71ac8, img=..., flags=...) at image/qpixmap_x11.cpp:387
#9  QX11PixmapData::fromImage (this=0x9e71ac8, img=..., flags=...) at image/qpixmap_x11.cpp:431
#10 0xb6ab1f1f in QPixmapData::fromData (this=0x9e71ac8, 
    buf=0xa68fe50 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>BED7945888176FAA</RequestId><HostId>Pq4pP2o0YQF0cZi1oYDuZdo6XH5yHj/PONJzEfKfweKWOkEPWf"..., len=231, format=0x0, flags=...) at image/qpixmapdata.cpp:106
#11 0xb6aa8d7a in QPixmap::loadFromData (this=0xbfcd79e4, 
    buf=0xa68fe50 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>BED7945888176FAA</RequestId><HostId>Pq4pP2o0YQF0cZi1oYDuZdo6XH5yHj/PONJzEfKfweKWOkEPWf"..., len=231, format=0x0, flags=...) at image/qpixmap.cpp:866
#12 0xb79f9515 in Choqok::MediaManager::slotImageFetched(KJob*) () from /usr/lib/libchoqok.so.0
#13 0xb79f9829 in Choqok::MediaManager::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libchoqok.so.0
#14 0xb75b2a35 in QMetaObject::metacall (object=0x0, cl=QMetaObject::InvokeMetaMethod, idx=7, argv=0xbfcd7b2c) at kernel/qmetaobject.cpp:237
#15 0xb75c18c5 in QMetaObject::activate (sender=0x9bee2f8, m=0xb796fc28, local_signal_index=3, argv=0xbfcd7b2c) at kernel/qobject.cpp:3398
#16 0xb78124d3 in KJob::result(KJob*) () from /usr/lib/libkdecore.so.5
#17 0xb7812979 in KJob::emitResult() () from /usr/lib/libkdecore.so.5
#18 0xb7ae2bd5 in KIO::SimpleJob::slotFinished() () from /usr/lib/libkio.so.5
#19 0xb7ae3533 in KIO::TransferJob::slotFinished() () from /usr/lib/libkio.so.5
#20 0xb7adfac3 in KIO::TransferJob::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#21 0xb7adfdea in KIO::StoredTransferJob::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#22 0xb75b2a35 in QMetaObject::metacall (object=0x0, cl=QMetaObject::InvokeMetaMethod, idx=47, argv=0xbfcd7db8) at kernel/qmetaobject.cpp:237
#23 0xb75c18c5 in QMetaObject::activate (sender=0xa58cb28, m=0xb7c8aba4, local_signal_index=4, argv=0x0) at kernel/qobject.cpp:3398
#24 0xb7ba87d7 in KIO::SlaveInterface::finished() () from /usr/lib/libkio.so.5
#25 0xb7bac587 in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /usr/lib/libkio.so.5
#26 0xb7ba8cb7 in KIO::SlaveInterface::dispatch() () from /usr/lib/libkio.so.5
#27 0xb7b9ac9d in KIO::Slave::gotInput() () from /usr/lib/libkio.so.5
#28 0xb7b9d183 in KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#29 0xb75b2a35 in QMetaObject::metacall (object=0x0, cl=QMetaObject::InvokeMetaMethod, idx=30, argv=0xbfcd8088) at kernel/qmetaobject.cpp:237
#30 0xb75c18c5 in QMetaObject::activate (sender=0x9d38168, m=0xb7c874e0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3398
#31 0xb7aa6d57 in KIO::Connection::readyRead() () from /usr/lib/libkio.so.5
#32 0xb7aa8663 in ?? () from /usr/lib/libkio.so.5
#33 0xb7aa8a46 in KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#34 0xb75b2a35 in QMetaObject::metacall (object=0x0, cl=QMetaObject::InvokeMetaMethod, idx=5, argv=0xa29db58) at kernel/qmetaobject.cpp:237
#35 0xb75bcf56 in QMetaCallEvent::placeMetaCall (this=0x9cf9690, object=0x9d38168) at kernel/qobject.cpp:562
#36 0xb75be3f3 in QObject::event (this=0xbfcd80d0, e=0xa590618) at kernel/qobject.cpp:1246
#37 0xb69c037c in QApplicationPrivate::notify_helper (this=0x94318f0, receiver=0x9d38168, e=0x9cf9690) at kernel/qapplication.cpp:4277
#38 0xb69c7c0e in QApplication::notify (this=0xbfcd88a4, receiver=0x9d38168, e=0x9cf9690) at kernel/qapplication.cpp:3702
#39 0xb7ead0fd in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#40 0xb75ad6eb in QCoreApplication::notifyInternal (this=0xbfcd88a4, receiver=0xbfcd88a4, event=0x9cf9690) at kernel/qcoreapplication.cpp:704
#41 0xb75ae61f in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x9406de8) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#42 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9406de8) at kernel/qcoreapplication.cpp:1345
#43 0xb75ae7cd in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1238
#44 0xb75d9bdf in QCoreApplication::sendPostedEvents (s=0x9429110) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#45 postEventSourceDispatch (s=0x9429110) at kernel/qeventdispatcher_glib.cpp:276
#46 0xb627fe98 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#47 0xb6283623 in ?? () from /lib/libglib-2.0.so.0
#48 0xb62837a8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#49 0xb75d96f1 in QEventDispatcherGlib::processEvents (this=0x9406948, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#50 0xb6a728c5 in QGuiEventDispatcherGlib::processEvents (this=0x9406948, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#51 0xb75abd5a in QEventLoop::processEvents (this=0xbfcd8830, flags=...) at kernel/qeventloop.cpp:149
#52 0xb75ac1a2 in QEventLoop::exec (this=0xbfcd8830, flags=...) at kernel/qeventloop.cpp:201
#53 0xb75ae899 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#54 0xb69c0417 in QApplication::exec () at kernel/qapplication.cpp:3616
#55 0x08054c78 in _start ()

Reported using DrKonqi
Comment 1 Dario Andres 2009-11-21 16:23:46 UTC
*** Bug 215566 has been marked as a duplicate of this bug. ***
Comment 2 Dario Andres 2009-11-21 16:25:22 UTC
It seems that Qt4.6 is less tolerant about loading invalid data as a pixmap...
Comment 3 Dario Andres 2009-11-27 17:22:31 UTC
Fixed already: http://bugreports.qt.nokia.com/browse/QTBUG-5840
Comment 4 Dario Andres 2009-12-10 03:12:36 UTC
*** Bug 218059 has been marked as a duplicate of this bug. ***
Comment 5 William Chambers 2009-12-16 22:08:25 UTC
Any suggestions of how to get the qt fixes for Choqok to run? Or a possible workaround for now?
Comment 6 Dario Andres 2009-12-16 22:39:42 UTC
Simple patch(workaround) to bypass this issue:

Index: libchoqok/mediamanager.cpp
===================================================================
--- libchoqok/mediamanager.cpp	(revision 1063057)
+++ libchoqok/mediamanager.cpp	(working copy)
@@ -120,7 +120,8 @@
         emit fetchError( remote, errMsg );
     } else {
         QPixmap p;
-        if( p.loadFromData( baseJob->data() ) ) {
+        if( !baseJob->data().startsWith(QByteArray("<?xml version=\"")) &&
+            p.loadFromData( baseJob->data() ) ) {
             d->cache.insert( remote, p );
             emit imageFetched( remote, p );
         } else {
Comment 7 William Chambers 2009-12-17 01:32:54 UTC
Thank you very much Dario, that got it working perfectly.
Comment 8 Dario Andres 2010-01-08 14:27:31 UTC
*** Bug 221675 has been marked as a duplicate of this bug. ***
Comment 9 Dario Andres 2010-01-08 18:39:55 UTC
*** Bug 221819 has been marked as a duplicate of this bug. ***
Comment 10 Dario Andres 2010-01-09 19:26:56 UTC
*** Bug 221941 has been marked as a duplicate of this bug. ***
Comment 11 Dario Andres 2010-01-11 13:32:57 UTC
*** Bug 222194 has been marked as a duplicate of this bug. ***
Comment 12 Dario Andres 2010-01-24 20:18:11 UTC
*** Bug 223990 has been marked as a duplicate of this bug. ***