Bug 95488 - kio data crashes applications (but not Konqueror)
Summary: kio data crashes applications (but not Konqueror)
Status: RESOLVED WORKSFORME
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Leo Savernik
URL:
Keywords:
: 92408 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-19 22:38 UTC by Jonathan Riddell
Modified: 2009-06-02 21:43 UTC (History)
4 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 Jonathan Riddell 2004-12-19 22:38:21 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

Applications crash when using a data: URL.  Try 

data:text/html;hello

in Kate.  KWord and Gwenview also crash with the same backtrace.  Konqueror does not.

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1096652928 (LWP 3703)]
[KCrash handler]
#6  0x00000089 in ?? ()
#7  0x40cc7738 in QObject::connect () from /usr/lib/libqt-mt.so.3
#8  0x401a57f8 in QObject::connect (this=0x8539658, sender=0x0, 
    signal=0x4037dd80 "2statEntry( const KIO::UDSEntry& )", 
    member=0x4037dd40 "1slotStatEntry( const KIO::UDSEntry & )")
    at qobject.h:228
#9  0x401d5075 in KIO::StatJob::start (this=0x8539658, slave=0x8827ff0)
    at /home/jr/devel/kdelibs/kio/kio/job.cpp:754
#10 0x401cb670 in KIO::Scheduler::startJobDirect (this=0x81790a0)
    at /home/jr/devel/kdelibs/kio/kio/scheduler.cpp:446
#11 0x401ca9fc in KIO::Scheduler::startStep (this=0x81790a0)
    at /home/jr/devel/kdelibs/kio/kio/scheduler.cpp:273
#12 0x401cdc50 in KIO::Scheduler::qt_invoke (this=0x81790a0, _id=4, 
    _o=0xbfffe2c0) at scheduler.moc:161
#13 0x40cc851c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#14 0x40cc8344 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#15 0x4100826b in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#16 0x40ce9d32 in QTimer::event () from /usr/lib/libqt-mt.so.3
#17 0x40c6bbbf in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#18 0x40c6b1be in QApplication::notify () from /usr/lib/libqt-mt.so.3
#19 0x407eb43b in KApplication::notify (this=0xbffff5d0, receiver=0x81790c8, 
    event=0xbfffe620) at /home/jr/devel/kdelibs/kdecore/kapplication.cpp:528
#20 0x40c5b3f5 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#21 0x40c14c3b in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#22 0x40c7df18 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#23 0x40c6be71 in QApplication::enter_loop () from /usr/lib/libqt-mt.so.3
#24 0x40e52560 in QDialog::exec () from /usr/lib/libqt-mt.so.3
#25 0x40377cba in KEncodingFileDialog::getOpenURLsAndEncoding (
    encoding=@0xbfffe9f0, startDir=@0xbfffea40, filter=@0x4113c0dc, 
    parent=0x82cc8c0, caption=@0xbfffea50)
    at /home/jr/devel/kdelibs/kio/kfile/kencodingfiledialog.cpp:158
#26 0x4170d5f6 in KateViewManager::slotDocumentOpen (this=0x8280c08)
    at /home/jr/devel/kdebase/kate/app/kateviewmanager.cpp:377
#27 0x4170b451 in KateViewManager::qt_invoke (this=0x8280c08, _id=10, 
    _o=0xbfffeb30) at kateviewmanager.moc:213
#28 0x40cc851c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#29 0x40cc8344 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#30 0x40520dbe in KAction::activated (this=0x82b7000) at kaction.moc:157
#31 0x40520770 in KAction::slotActivated (this=0x82b7000)
    at /home/jr/devel/kdelibs/kdeui/kaction.cpp:1102
#32 0x405210bf in KAction::qt_invoke (this=0x82b7000, _id=14, _o=0xbfffec40)
    at kaction.moc:181
#33 0x40cc8496 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#34 0x40cc8344 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#35 0x4100d27e in QButton::clicked () from /usr/lib/libqt-mt.so.3
#36 0x40d5a96a in QButton::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#37 0x40cfe687 in QWidget::event () from /usr/lib/libqt-mt.so.3
#38 0x40c6bbbf in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#39 0x40c6b2b4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#40 0x407eb43b in KApplication::notify (this=0xbffff5d0, receiver=0x83ba910, 
    event=0xbffff090) at /home/jr/devel/kdelibs/kdecore/kapplication.cpp:528
#41 0x40c00630 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#42 0x40bfe2be in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#43 0x40c15194 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#44 0x40c7df18 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#45 0x40c7ddc8 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#46 0x40c6be11 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#47 0x409b2bcf in kdemain (argc=3, argv=0x80898b0)
    at /home/jr/devel/kdebase/kate/app/katemain.cpp:107
#48 0x0804e474 in launch (argc=3, _name=0x808a33c "kate", args=0x808a382 "", 
    cwd=0x0, envc=0, envs=0x808a386 "", reset_env=false, tty=0x0, 
    avoid_loops=false, startup_id_str=0x8053107 "0")
    at /home/jr/devel/kdelibs/kinit/kinit.cpp:623
#49 0x0804f788 in handle_launcher_request (sock=8)
    at /home/jr/devel/kdelibs/kinit/kinit.cpp:1187
#50 0x0804fe7b in handle_requests (waitForPid=0)
    at /home/jr/devel/kdelibs/kinit/kinit.cpp:1388
#51 0x080514e5 in main (argc=2, argv=0xbffffd64, envp=0xbffffd70)
    at /home/jr/devel/kdelibs/kinit/kinit.cpp:1841
Comment 1 Leo Savernik 2004-12-20 00:22:20 UTC
Can't reproduce.

Does it still crash if you use the correct syntax?

data:text/html, bla

(note the comma instead of the semicolon)
Comment 2 Jonathan Riddell 2004-12-20 01:39:37 UTC
Yes it does.  I've done cvs update on kdelibs/kio and it still crashes.

Anecdotally on #kde-devel one person had it crash, another didn't.
Comment 3 Thiago Macieira 2004-12-20 02:00:42 UTC
Here's what I gathered:

with the URL "data:text/html,abc":
- Typing it in Konqueror's location bar works
- Selecting Open with KWrite on Konqueror's Location menu afterwards works
- Running "kate data:text/html,abc" works

But:
- File, Open on Kate, typing the URL crashes

The same symptoms can be observed with KWrite, KEdit, KHexEdit, KGhostView, KPDF, ... basically every KDE app, except those from KOffice. Those crash even with the command-line name.
Comment 4 Thiago Macieira 2004-12-20 02:11:24 UTC
No crash inside valgrind, but got something interesting:

==214642== Invalid read of size 4
==214642==    at 0x1BB9689A: KIO::StatJob::start(KIO::Slave*) (qobject.h:227)
==214642==    by 0x1BB767BD: KIO::Scheduler::startJobDirect() (/home/thiago/programs/src/kde/kdelibs/kio/kio/scheduler.cpp:446)
==214642==    by 0x1BB76C0B: KIO::Scheduler::startStep() (/home/thiago/programs/src/kde/kdelibs/kio/kio/scheduler.cpp:273)
==214642==    by 0x1BB76D47: KIO::Scheduler::qt_invoke(int, QUObject*) (./kio/kio/scheduler.moc:161)
==214642==  Address 0x1DA19D74 is 108 bytes inside a block of size 268 free'd
==214642==    at 0x1B90813F: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck.so)
==214642==    by 0x1BB9DA9F: KIO::StatJob::~StatJob() (job.cpp:4570)
==214642==    by 0x1BB7F1E7: KIO::Job::emitResult() (job.cpp:218)
==214642==    by 0x1BB81C6B: KIO::SimpleJob::slotFinished() (job.cpp:536)
==214642==
==214642== Invalid read of size 4
==214642==    at 0x1C71901C: QObject::connect(QObject const*, char const*, QObject const*, char const*) (in /home/thiago/programs/src/kde/qt-copy/lib/libqt-mt.so.3.3.3)
==214642==    by 0x1BB968BF: KIO::StatJob::start(KIO::Slave*) (qobject.h:227)
==214642==    by 0x1BB767BD: KIO::Scheduler::startJobDirect() (/home/thiago/programs/src/kde/kdelibs/kio/kio/scheduler.cpp:446)
==214642==    by 0x1BB76C0B: KIO::Scheduler::startStep() (/home/thiago/programs/src/kde/kdelibs/kio/kio/scheduler.cpp:273)
==214642==  Address 0x1DA19D08 is 0 bytes inside a block of size 268 free'd
==214642==    at 0x1B90813F: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck.so)
==214642==    by 0x1BB9DA9F: KIO::StatJob::~StatJob() (job.cpp:4570)
==214642==    by 0x1BB7F1E7: KIO::Job::emitResult() (job.cpp:218)
==214642==    by 0x1BB81C6B: KIO::SimpleJob::slotFinished() (job.cpp:536)
==214642==
==214642== Invalid read of size 4
==214642==    at 0x1C7190F8: QObject::connect(QObject const*, char const*, QObject const*, char const*) (in /home/thiago/programs/src/kde/qt-copy/lib/libqt-mt.so.3.3.3)
==214642==    by 0x1BB968E5: KIO::StatJob::start(KIO::Slave*) (qobject.h:227)
==214642==    by 0x1BB767BD: KIO::Scheduler::startJobDirect() (/home/thiago/programs/src/kde/kdelibs/kio/kio/scheduler.cpp:446)
==214642==    by 0x1BB76C0B: KIO::Scheduler::startStep() (/home/thiago/programs/src/kde/kdelibs/kio/kio/scheduler.cpp:273)
==214642==  Address 0x1DA19D08 is 0 bytes inside a block of size 268 free'd
==214642==    at 0x1B90813F: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck.so)
==214642==    by 0x1BB9DA9F: KIO::StatJob::~StatJob() (job.cpp:4570)
==214642==    by 0x1BB7F1E7: KIO::Job::emitResult() (job.cpp:218)
==214642==    by 0x1BB81C6B: KIO::SimpleJob::slotFinished() (job.cpp:536)
==214642==
==214642== Invalid read of size 4
==214642==    at 0x1C716A1B: err_member_notfound(int, QObject const*, char const*, char const*) (in /home/thiago/programs/src/kde/qt-copy/lib/libqt-mt.so.3.3.3)
==214642==    by 0x1C71912F: QObject::connect(QObject const*, char const*, QObject const*, char const*) (in /home/thiago/programs/src/kde/qt-copy/lib/libqt-mt.so.3.3.3)
==214642==    by 0x1BB968E5: KIO::StatJob::start(KIO::Slave*) (qobject.h:227)
==214642==    by 0x1BB767BD: KIO::Scheduler::startJobDirect() (/home/thiago/programs/src/kde/kdelibs/kio/kio/scheduler.cpp:446)
==214642==  Address 0x1DA19D08 is 0 bytes inside a block of size 268 free'd
==214642==    at 0x1B90813F: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck.so)
==214642==    by 0x1BB9DA9F: KIO::StatJob::~StatJob() (job.cpp:4570)
==214642==    by 0x1BB7F1E7: KIO::Job::emitResult() (job.cpp:218)
==214642==    by 0x1BB81C6B: KIO::SimpleJob::slotFinished() (job.cpp:536)
==214642==
==214642== Invalid read of size 4
==214642==    at 0x1C71666A: QObject::name() const (in /home/thiago/programs/src/kde/qt-copy/lib/libqt-mt.so.3.3.3)
==214642==    by 0x1C716AC9: err_info_about_objects(char const*, QObject const*, QObject const*) (in /home/thiago/programs/src/kde/qt-copy/lib/libqt-mt.so.3.3.3)
==214642==    by 0x1C719154: QObject::connect(QObject const*, char const*, QObject const*, char const*) (in /home/thiago/programs/src/kde/qt-copy/lib/libqt-mt.so.3.3.3)
==214642==    by 0x1BB968E5: KIO::StatJob::start(KIO::Slave*) (qobject.h:227)
==214642==  Address 0x1DA19D10 is 8 bytes inside a block of size 268 free'd
==214642==    at 0x1B90813F: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck.so)
==214642==    by 0x1BB9DA9F: KIO::StatJob::~StatJob() (job.cpp:4570)
==214642==    by 0x1BB7F1E7: KIO::Job::emitResult() (job.cpp:218)
==214642==    by 0x1BB81C6B: KIO::SimpleJob::slotFinished() (job.cpp:536)
Comment 5 Leo Savernik 2004-12-20 12:27:51 UTC
I started up KDE, opened KWrite.

Then I opened the file picker and entered

data:text/html, lala

and got an error dialog running:

"The given file could not be read, check if it exists or if it is readable for the current user."

I'll update kio to check if the cause for the crash has been introduced recently.
Comment 6 Thiago Macieira 2005-02-13 03:41:54 UTC
Still an issue.
Comment 7 Leo Savernik 2005-02-27 20:10:14 UTC
Recently David Faure has commited a fix to prevent premature deletion of a kio_data job. Can you check whether this bug has been fixed by it?
Comment 8 Thiago Macieira 2005-02-27 21:25:30 UTC
Checking... still crashing. 3.4.0 rc1 (20050225)
Comment 9 Pascal Létourneau 2005-03-18 23:21:37 UTC
CVS commit by pletourn: 

Don't crash if the slave emits an error inside SimpleJob::start()
(this will delete the job)
CCBUG:95488
I guess DataSlave needs to implement 'stat' to make it work


  M +5 -5      job.cpp   1.431.2.2


--- kdelibs/kio/kio/job.cpp  #1.431.2.1:1.431.2.2
@@ -626,8 +626,8 @@ MkdirJob::MkdirJob( const KURL& url, int
 void MkdirJob::start(Slave *slave)
 {
-    SimpleJob::start(slave);
-
     connect( slave, SIGNAL( redirection(const KURL &) ),
              SLOT( slotRedirection(const KURL &) ) );
+    
+    SimpleJob::start(slave);
 }
 
@@ -753,10 +753,10 @@ void StatJob::start(Slave *slave)
     m_outgoingMetaData.replace( "details", QString::number(m_details) );
 
-    SimpleJob::start(slave);
-
-    connect( m_slave, SIGNAL( statEntry( const KIO::UDSEntry& ) ),
+    connect( slave, SIGNAL( statEntry( const KIO::UDSEntry& ) ),
              SLOT( slotStatEntry( const KIO::UDSEntry & ) ) );
     connect( slave, SIGNAL( redirection(const KURL &) ),
              SLOT( slotRedirection(const KURL &) ) );
+
+    SimpleJob::start(slave);
 }
 
Comment 10 Nicolas Goutte 2005-08-06 21:21:05 UTC
It seems that now the data: URL is not recognised anymore and Kate tries to load by file: which of course fails.
Comment 11 Thiago Macieira 2005-08-06 21:41:49 UTC
No, Nicolas, that looks like a kfile bug instead. I can still open data: URIs in Konqueror and in KWrite by Location | Open in KWrite (from Konqueror) and via the command-line
Comment 12 Tommi Tervo 2005-08-19 15:34:08 UTC
*** Bug 92408 has been marked as a duplicate of this bug. ***
Comment 13 Thiago Macieira 2005-10-27 22:02:19 UTC
Bug 115218 says Konqueror crashes too.
Comment 14 Dario Andres 2009-05-31 16:38:05 UTC
Just test to update status:

Here using:

Qt: 4.5.1 (qt-copy  971295)
KDE: 4.2.88 (KDE 4.2.88 (KDE 4.3 >= 20090527))
kdelibs svn rev. 975695 / kdebase svn rev. 975695
on ArchLinux i686 - Kernel 2.6.29.4

- Opening Konqueror, browse "data:text/html,foobar" WORKS
- Launching Konqueror from shell as "konqueror data:text/html,foobar" WORKS
- Opening KWrite, open the Open File dialog browser and entering "data:text/html,foobar" only shows an error about that string not being a file, the "foobar" text do not appear but the application do not crash neither.
- Launching KWrite from shell as "kwrite data:text/html,foobar" WORKS and the text is shown.
- Launching Dolphin from shell as "dolphin data:text/html,foobar" opens Dolphin and shows an error "Protocol not handled, launching Konqueror".  Konqueror is shown with the foobar message on it.

So.. no crashes...
Should this be closed, can anyone else confirm this ?

Thanks
Comment 15 Dario Andres 2009-05-31 16:41:51 UTC
Also, Gwenview (kdegraphics svnrev. 975699) do not crash when launching "gwenview data:image/png,hello", it doesn't show anything but a loading image.
Comment 16 Leo Savernik 2009-06-01 21:07:07 UTC
Am Sonntag, 31. Mai 2009 schrieb Dario Andres:
> So.. no crashes...

If the crash is gone, it should be closed.
Comment 17 A. Spehr 2009-06-02 21:43:49 UTC
Verified by request. :)