View Issue Details

IDProjectCategoryView StatusLast Update
0014568Lazarus CCROtherpublic2009-09-12 21:40
ReporterBernhardAssigned ToChristian 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Summary0014568: ACS crashes when playing a certain file
DescriptionHello,

I get a run error (200) when I try to play a certain, short mp3 file with the ACS lib. I've attached that file.

I found that the error occurs in this file:

https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/acs/Src/fileformats/acs_dsfiles.pas

In the procedure "procedure TDSIn.OpenFile;", almost at the end of the procedure, you have

...
    if fDuration = 0 then exit;
    FSize :=(FDuration div 10000000) *
            FSR *
            FChan *
            FBPS div 8;
    FSeekScale := FDuration div FSize;
...

And when the program crashes, it stops at the last div statement.

I found that I can make it work by inserting another check if fsize is zero:

...
    if fDuration = 0 then exit;
    FSize :=(FDuration div 10000000) *
            FSR *
            FChan *
            FBPS div 8;
    if fsize=0 then exit;
    FSeekScale := FDuration div FSize;
...

It is working now, but, to be honest, I have no idea how the code works, and if my insertion was "legal".

Bernhard
TagsNo tags attached.
WidgetsetWin32/Win64
Attached Files

Activities

2009-09-12 12:57

 

0001_01 m.mp3 (10,208 bytes)

Issue History

Date Modified Username Field Change
2009-09-12 12:57 Bernhard New Issue
2009-09-12 12:57 Bernhard File Added: 0001_01 m.mp3
2009-09-12 12:57 Bernhard Widgetset => Win32/Win64
2009-09-12 21:39 Vincent Snijders Project Lazarus => Lazarus CCR
2009-09-12 21:40 Vincent Snijders Assigned To => Christian
2009-09-12 21:40 Vincent Snijders Status new => assigned