Jarvik7 / sdl-wii

Automatically exported from code.google.com/p/sdl-wii
0 stars 0 forks source link

Crash in SDL_wiiaudio.c #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build DOSBox with latest SDL
2. Delete .conf file and use default settings
3. Run DOSBox on Wii
4. Play Alleycat (an old PC Speaker game)

What is the expected output? What do you see instead?

No crash. A crash.

Please use labels and text to provide additional information.

SDL_wiiaudio.c, line 106 causes a crash (reported in lwp_threads.c:0):

else
{
  //printf("conversion is not needed\n");
  //SDL_mutexP(current_audio->mixer_lock);
  current_audio->spec.callback(
    current_audio->spec.userdata,
    (Uint8 *)dma_buffers[whichab], SAMPLES_PER_DMA_BUFFER);
    //SDL_mutexV(current_audio->mixer_lock);
}

This function is supposedly called by DOSBox's hardware/mixer.cpp, line 
480. But that line doesn't seem to call any functions:

/* Reduce done count in all channels */
for (MixerChannel * chan=mixer.channels;chan;chan=chan->next) {
  if (chan->done>reduce) chan->done-=reduce; // **** this line here ****
  else chan->done=0;
}

Original issue reported on code.google.com by Carl.Kenner@gmail.com on 10 May 2009 at 11:22

GoogleCodeExporter commented 9 years ago
My mistake, the arrows are backwards (who designed that crash screen???). The 
crash 
is in DOSBox's mixer.cpp which is called by SDL's SDL_wiiaudio.c. That doesn't 
necessarily mean SDL is innocent though.

It's a DSI (Data Storage Interrupt) exception, so I think that means the 
pointer chan 
actually contains garbage (but not NULL). Which means one of the chan->next 
pointers 
in the linked list is either not set properly, or overwritten by garbage from 
something else.

Original comment by Carl.Kenner@gmail.com on 10 May 2009 at 1:18

GoogleCodeExporter commented 9 years ago
Does my compiled version (0.72.01) work or still crash? Remember to delete your 
conf 
file first just in case.

Original comment by dborth@gmail.com on 16 May 2009 at 4:17

GoogleCodeExporter commented 9 years ago
I can't confirm this issue with the latest SVN source. I also don't get a crash 
on 
alleycat on the newest 0.73.01. Hopefully this is gone for you.

Original comment by dborth@gmail.com on 4 Jun 2009 at 5:33