Bug 56316 - crash on start if ~/.thumbnail folder is not
Summary: crash on start if ~/.thumbnail folder is not
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-24 15:05 UTC by Tommi Tervo
Modified: 2003-05-13 04:33 UTC (History)
0 users

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 Tommi Tervo 2003-03-24 15:05:13 UTC
Version:            (using KDE KDE 3.1.1)
Installed from:    Unspecified Linux
Compiler:          gcc-3.2 Debian unstable
OS:          Linux

I had ro-folder .thumbnails in my home directory and when I updated kde to 3.1.1 konqi crashed always if it was started in file-browser mode.
KTempFile: Error trying to create /home/luser/.thumbnails/normal/kde-tmp-XXXXXX.png: 
Permission denied
-> crash
Comment 1 George Staikos 2003-03-24 15:27:38 UTC
Subject: Re:  New: crash on start if ~/.thumbnail folder is readonly

On Monday 24 March 2003 09:05, Tommi Tervo wrote:
> Version:            (using KDE KDE 3.1.1)
> Installed from:    Unspecified Linux
> Compiler:          gcc-3.2 Debian unstable
> OS:          Linux
>
> I had ro-folder .thumbnails in my home directory and when I updated kde to
> 3.1.1 konqi crashed always if it was started in file-browser mode.
> KTempFile: Error trying to create
> /home/luser/.thumbnails/normal/kde-tmp-XXXXXX.png: Permission denied
> -> crash

  Please provide a backtrace of the crash.

Comment 2 Tommi Tervo 2003-03-24 15:38:36 UTC
<URL: http://vodka.tky.hut.fi/~teve/crash.txt> (sorry, no debug build) 
Comment 3 George Staikos 2003-03-24 15:43:30 UTC
Subject: Re:  crash on start if ~/.thumbnail folder is readonly

On Monday 24 March 2003 09:38, Tommi Tervo wrote:

> ------- Additional Comments From teve@vodka.tky.hut.fi  2003-03-24 15:38
> ------- <URL: http://vodka.tky.hut.fi/~teve/crash.txt> (sorry, no debug
> build) _______________________________________________

  Hm crash in libpng called out to by Qt.

Comment 4 Maksim Orlovich 2003-05-13 03:27:05 UTC
Can reproduce. 
 
Comment 5 Maksim Orlovich 2003-05-13 04:33:23 UTC
Subject: kdelibs/kio/kio

CVS commit by orlovich: 


Don't try to write out thumbnails when temp file creation fails. 
QImage::save crashes rather badly when we do that (i.e. when 
passing it QString::null, if the KTempFile docs are right)

CCMAIL:56316-done@bugs.kde.org


  M +5 -2      previewjob.cpp   1.37


--- kdelibs/kio/kio/previewjob.cpp  #1.36:1.37
@@ -441,6 +441,9 @@ void PreviewJob::slotThumbData(KIO::Job 
         thumb.setText("Software", 0, "KDE Thumbnail Generator");
         KTempFile temp(d->thumbPath + "kde-tmp-", ".png");
+        if (temp.status() == 0) //Only try to write out the thumbnail if we 
+        {                       //actually created the temp file.
         thumb.save(temp.name(), "PNG");
         rename(QFile::encodeName(temp.name()), QFile::encodeName(d->thumbPath + d->thumbName));
+        }
     }
     emitPreview( thumb );