• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Bug in auval ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in auval ?


  • Subject: Bug in auval ?
  • From: Antoine Missout <email@hidden>
  • Date: Mon, 24 May 2010 10:14:03 -0400

Hi all,

Using auval with guard malloc (export DYLD_FORCE_FLAT_NAMESPACE=1; export DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib; export MALLOC_VECTOR_SIZE=1), my audiounit consistently crashes in GetProperty.

At the end of the email is the relevant code. The property is 48 bytes long, but auval only mallocs 16 bytes as can be seen from the log & crash report. If I comment the memcpy, everything validates fine.

It used to validate fine. Is there anything else I should do to ensure auval allocates the correct number of bytes ?

Thanks in advance,
- Antoine

(full code is at http://code.google.com/p/octogris/ )

===============================================================

VALIDATING AUDIO UNIT: 'aufx' - '1212' - 'UDMG'
--------------------------------------------------
Manufacturer String: UDM
AudioUnit name: Octogris 12x12
[...]
  VERIFYING PROPERTY Host Callbacks
    PASS
makmak: 48
makmak: 48
makmak: 0x1c675ff0

===============================================================

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x000000001c676000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   com.udm.Octogris              	0x0127edc9 Octogris<12, 12>::GetProperty(unsigned long, unsigned long, unsigned long, void*) + 227 (Octogris.cpp:506)

===============================================================

template<int mNumberOfSources, int mNumberOfSpeakers>
OSStatus			Octogris<mNumberOfSources, mNumberOfSpeakers>::GetPropertyInfo (AudioUnitPropertyID	inID,
                                                        AudioUnitScope		inScope,
                                                        AudioUnitElement	inElement,
                                                        UInt32 &		outDataSize,
                                                        Boolean &		outWritable)
{
	if (inScope == kAudioUnitScope_Global)
	{
		switch (inID)
		{
			[...]

			case kLevelsPropertyID:
				outWritable = false;
				outDataSize = sizeof (float) * mNumberOfSpeakers;
				printf("makmak: %d\n", (int)outDataSize);
				return noErr;

			[...]
		}
	}

	return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
}

//------------------------------------------------------------------------------------------
template<int mNumberOfSources, int mNumberOfSpeakers>
OSStatus Octogris<mNumberOfSources, mNumberOfSpeakers>::GetProperty(	AudioUnitPropertyID inID,
                                                        AudioUnitScope 		inScope,
                                                        AudioUnitElement 	inElement,
                                                        void *			outData )
{
	if (inScope == kAudioUnitScope_Global)
	{
		switch (inID)
		{
			[...]

			case kLevelsPropertyID:
				printf("makmak: %p\n", outData);
				memcpy(outData, mLevels, sizeof (float) * mNumberOfSpeakers);
				return noErr;

			[...]
		}
	}


	return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
} _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Bug in auval ?
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: How to set Sample Rate Conversion quality
  • Next by Date: Re: Garbage collector in an audio unit
  • Previous by thread: Re: How to set Sample Rate Conversion quality
  • Next by thread: Re: Bug in auval ?
  • Index(es):
    • Date
    • Thread