Bug 234398 - strigi flac analyser crashes with floating point (arithmetic) exception
Summary: strigi flac analyser crashes with floating point (arithmetic) exception
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
: 240935 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-15 00:33 UTC by Georg Wolfram
Modified: 2010-06-10 02:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Wolfram 2010-04-15 00:33:23 UTC
Version:            (using KDE 4.4.2)
Compiler:          gcc (GCC) 4.4.3 20100316 
OS:                Linux
Installed from:    Archlinux Packages

gdb output from core file analysis:
------
Core was generated by `/usr/bin/nepomukservicestub nepomukstrigiservice'.
Program terminated with signal 8, Arithmetic exception.
#0  0xb6544073 in __udivmoddi4 () from /lib/libc.so.6

(gdb) bt
#0  0xb6544073 in __udivmoddi4 () from /lib/libc.so.6
#1  0xb65442f8 in __divdi3_internal () from /lib/libc.so.6
#2  0xb51087cd in FlacEndAnalyzer::analyze (this=0xb2b68fb8, indexable=..., in=0x9c10320)
    at /home/georg/pacman/strigi/src/strigi-0.7.2/src/streamanalyzer/endanalyzers/flacendanalyzer.cpp:288
#3  0xb50ff68a in Strigi::StreamAnalyzerPrivate::analyze (this=0xb2b01de0, idx=..., input=0x9c10320)
    at /home/georg/pacman/strigi/src/strigi-0.7.2/src/streamanalyzer/streamanalyzer.cpp:421
#4  0xb50d8dad in Strigi::AnalysisResult::index (this=0xb34d4e08, file=0xb34d4da4) at /home/georg/pacman/strigi/src/strigi-0.7.2/src/streamanalyzer/analysisresult.cpp:233
#5  0xb4d44b74 in Nepomuk::IndexScheduler::analyzeFile(QFileInfo const&, Strigi::StreamAnalyzer*) () from /usr/lib/kde4/nepomukstrigiservice.so
#6  0xb4d45e63 in Nepomuk::IndexScheduler::updateDir(QString const&, Strigi::StreamAnalyzer*, QFlags<Nepomuk::IndexScheduler::UpdateDirFlag>) ()
   from /usr/lib/kde4/nepomukstrigiservice.so
#7  0xb4d460a5 in Nepomuk::IndexScheduler::updateDir(QString const&, Strigi::StreamAnalyzer*, QFlags<Nepomuk::IndexScheduler::UpdateDirFlag>) ()
   from /usr/lib/kde4/nepomukstrigiservice.so
#8  0xb4d460a5 in Nepomuk::IndexScheduler::updateDir(QString const&, Strigi::StreamAnalyzer*, QFlags<Nepomuk::IndexScheduler::UpdateDirFlag>) ()
   from /usr/lib/kde4/nepomukstrigiservice.so
#9  0xb4d47c3b in Nepomuk::IndexScheduler::run() () from /usr/lib/kde4/nepomukstrigiservice.so
#10 0xb758727e in ?? () from /usr/lib/libQtCore.so.4
#11 0xb751494c in start_thread () from /lib/libpthread.so.0
#12 0xb65faeae in clone () from /lib/libc.so.6

(gdb) select-frame 2
(gdb) info locals
buf = 0xacbff0a0 ""
blocktype = -127 '\201'
nreq = 0
duration = 0
in_size = <value optimized out>
nread = <value optimized out>
blocksize = 4064
albumArtNum = 0 '\000'
-----

Source code in flacendanalyzer.cpp:288:
    if(in_size>=0)
      indexable.addValue(factory->bitRateField,(uint32_t)(8*((in_size-in->position())/duration)));


If duration is 0 then this will result in a division by zero.
Comment 1 Sebastian Trueg 2010-04-15 15:22:01 UTC
SVN commit 1115155 by trueg:

The stupid fix to a division by zero problem. There probably is a better solution but this at least stops Strigi from crashing.

BUG: 234398


 M  +1 -1      flacendanalyzer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1115155
Comment 2 Christoph Feck 2010-06-10 02:05:25 UTC
*** Bug 240935 has been marked as a duplicate of this bug. ***