Opened 12 years ago

Closed 12 years ago

#4825 closed bug (fixed)

BSoundPlayer segv

Reported by: Adek336 Owned by: nobody
Priority: normal Milestone: R1
Component: Kits/Media Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


#include <Sound.h>
#include <SoundPlayer.h>
#include <Entry.h>

void playsound(const char *path) {
   BSound *sound;
   BSoundPlayer player;
   entry_ref ref;
   BEntry entry(path, true);
   BSoundPlayer::play_id id;

   if (entry.InitCheck() == B_OK) {
      if (entry.GetRef(&ref) == B_OK) {
         sound = new BSound(&ref);
         if (sound->InitCheck() == B_OK) {
            id = player.StartPlaying(sound);

int main()
    return 0;

Put a wave file as /boot/home/sample.wav, compile and run.

It either crashes or prints

WavReader::GetNextChunk: LAST BUFFER ERROR at time   1000000

and hangs.

Reproduced on Alpha 1, also on gcc4+2 hybrid hrev33542.

The playsound function comes from the Be Book

Change History (2)

comment:1 by marcusoverhagen, 12 years ago

Owner: changed from marcusoverhagen to nobody

comment:2 by mmlr, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in hrev33705.

Note: See TracTickets for help on using tickets.