[BUG]Squeak VM mac 3.8.18beta1U

John M McIntosh johnmci at smalltalkconsulting.com
Sun Sep 23 01:11:08 UTC 2007


Ah, that would be this routine below (see the assert)

// deallocate a Stream.
//
  void Stream_delete(Stream *s);
void Stream_delete(Stream *s)
{
   assert(s && s->buffer);
   Buffer_delete(s->buffer);
   dprintf("stream %p[%d] deleted\n", s, s->direction);
   free(s);
}

That is called either via

// shut down sound output.
//
  int sound_Stop(void);
  int sound_Stop(void)
{
   dprintf("snd_Stop\n");

   if (output)
     {
       Stream_stop(output);
       Stream_delete(output);
       output= 0;
     }
   return 1;
}

or

  int sound_Start(int frameCount, int samplesPerSec, int stereo, int  
semaIndex);
  int sound_Start(int frameCount, int samplesPerSec, int stereo, int  
semaIndex)
{
   Stream *s= 0;

   dprintf("snd_Start frames: %d samplesPerSec: %d stereo: %d  
semaIndex: %d\n",
	   frameCount, samplesPerSec, stereo, semaIndex);

   if (output)	// there might be a change of sample rate
     sound_Stop();

   if ((s= Stream_new(0)))	// 0utput
     {
       if ((  Stream_setFormat(s, frameCount, samplesPerSec, stereo))
	  && Stream_startSema(s, semaIndex))
	{
	  output= s;
	  return 1;
	}
       Stream_delete(s);
     }
   return primitiveFail();
}


It's possible the

>>> *** malloc_zone_malloc[463]: argument too large: 4294967280

is a clue, I'd check input into the sound primitives...

mmm
Buffer *Buffer_new(int size)
{
   Buffer *b= (Buffer *)malloc(sizeof(Buffer));
   if (!b)
     return 0;

perhaps that malloc failed?

I'll note the buffer is calculated from calling
  int sound_Start(int frameCount, int samplesPerSec, int stereo, int  
semaIndex)



On Sep 22, 2007, at 2:02 PM, Bert Freudenberg wrote:

>>>> s && s->buffer

--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===





More information about the Squeak-dev mailing list