Bug 83210

Summary: konqueror crashes viewing directory with specific (corrupted?) mp3 file present
Product: [Unmaintained] taglib Reporter: Hans Honecker <hans.honecker>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: crash CC: maksim
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Hans Honecker 2004-06-11 12:37:41 UTC
Version:           3.2.1 (using KDE 3.2.1, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.4-54.5-default

I frequently run into trouble when entering directory containing a specific mp3 file. In many cases Konqueror crashes immediately after I enter that directory. 

I can't tell if the mp3 file I experience that behavior with is corrupt since XMMS seems to have no trouble. Anyway, I don't think Konqueror should crash on that.

I prepared two directorys for download to confirm the problem:

1. http://www.hh-webberatung.de/konqueror/mp3_crash_konqueror_on_view_directory.tar.gz
contains a directory konqueror crashes after entering with no further user action. The crash report can be found at
http://www.hh-webberatung.de/konqueror/mp3_crash_konqueror_on_view_directory.txt .

2. http://www.hh-webberatung.de/konqueror/mp3_crash_konqueror_on_copy_testcase.wav_to_testcase_1.wav.tar.gz contains a directory konqueror crashes after entering and copying testcase.wav to testcase_1.wav. The crash report for that can be found at http://www.hh-webberatung.de/konqueror/mp3_crash_konqueror_on_copy_testcase.wav_to_testcase_1.wav.txt .
I must confess I clicked twice in the konqueror window after copying since it took a few seconds to crash. Eventually the directory crashed too without doing the copying at all, but sometimes Konqueror seemed to survive.

I no case I had to click on the mp3 or wav files to make Konqueror crash.

If there are any further questions please contact me.

Thanks a lot for your excellent work :-)
Comment 1 Hans Honecker 2004-06-17 11:48:23 UTC
I confirmed this bug on a second computer. Both computers I tested this bug on where set up using SuSE Linux 9.1 with different configurations and are different in speed. The second crashes much faster ;-)
Comment 2 Maksim Orlovich 2004-06-17 17:16:30 UTC
wheels: backtraces show crashes inside TagLib
Comment 3 Scott Wheeler 2004-06-17 17:33:57 UTC
CVS commit by wheeler: 

Ah, this one's easy -- though an odd corer case; there's a Xing header here
but no MPEG frames.  This was triggering a divide by zero.

CCMAIL:83210-done@bugs.kde.org


  M +1 -1      mpegproperties.cpp   1.12


--- kdesupport/taglib/mpeg/mpegproperties.cpp  #1.11:1.12
@@ -193,5 +193,5 @@ void MPEG::Properties::read()
       timePerFrame = timePerFrame / firstHeader.sampleRate();
       d->length = int(timePerFrame * xingHeader.totalFrames());
-      d->bitrate = xingHeader.totalSize() * 8 / d->length / 1000;
+      d->bitrate = d->length == 0 ? 0 : xingHeader.totalSize() * 8 / d->length / 1000;
   }