My project has been plagued with a problem ever since its beginning over a year ago. Basically, the program locks up at what appears to be completely random points. The program is a dual MP3 player that simply plays MP3s from a playlist, fading one into the other. No big deal, right?
Well, here's the situation. I've stripped everything down to the barebones (no visuals) with extensive trace logging to isolate the problem. I'm using the same playlist (~500 songs) each time. Sometimes the program will make it through 50-60 songs before it bombs, and sometimes it takes only a few. There's no pattern. If running under the IDE, I usually get an A/V that does not appear to be comming from the main thread. If running outside of Delphi, the program just stops and the sounds sticks until I kill the task.
The last error that I got was:
A/V at 0x1000bc42 read of 0x0000111c
Logs showed:
12:26:52:359 ==========================
12:26:52:359 Loading C:\My Music\SHAG CDs\Shag CD # 02\#02 - 02 - Coastline - New Old Songs.mp3
12:26:52:875 Stream created 1610612926
12:26:52:875 Reading Tag
12:26:52:875 Tag Read
12:26:52:875 Setting Syncs
12:26:52:875 Syncs Set
12:26:52:890 Analyzer Start
12:26:53:062 Got Info
12:26:55:578 Analyzer Stop
12:26:55:593 Track Cued
12:26:55:593 Setting Syncs
12:26:55:593 Syncs Set
12:27:01:859 - Fade -
12:27:02:468 - Mix -
12:27:07:343 - End -
12:27:11:859 - Load -
12:27:11:859 ==========================
12:27:11:859 Loading C:\My Music\SHAG CDs\Shag CD # 02\#02 - 03 - Clovers - Drive It Home.mp3
The code executed in main thread:
Trace('==========================');
Trace('Loading '+AFile);
H := BASS_StreamCreateFile(FALSE, PChar(AFile), 0, 0,
BASS_MP3_SETPOS);
Trace('Stream created '+IntToStr(H));
BASS_StreamPreBuf(H);
FVolume := 100;
FLength := BASS_StreamGetLength(H);
From the appearance of the logs, it looks to me like the BASS_StreamCreateFile() faulted. But this is just one case, I'm sure that if I run it again, it will fail in some other place.
Well, actually it just failed while I was typing this. This time, the A/V is at 0x1000aa2b write of 0x0000000c. The log seems to show the problem occurred on the same call, but on a different song in the list - (6 songs earlier this time).
Any light that you can shed on this would be very much appreciated, as this has hampered what would otherwise would be a very exciting project. Thanks.
--------
Delphi 5 - BASS 1.8a - Win 2000 - SB Live
My Dell has dual processors, but the problem occurs on other machines, too.