Plugin Fails Logic Pro X AUVal


#1

Hello all,

One of my testers pointed out to me that that my plugin fails the Auval run by Logic Pro X. I was able to test it out, and sure enough, it does.

However, if I manually enable the plugin, it seems to run fine within Logic.

Since this is a commercial product I’ve been developing as an intern, I’d rather not leave it with the hacky fix of forcing end-users to manually enable the plug-in. What follows is the log I get from auval when scanning the plug-in- any ideas on how I can troubleshoot this?

validating Audio Unit SNESVerb by Impact Soundworks:

    AU Validation Tool
    Version: 1.6.1a1 
    Copyright 2003-2013, Apple Inc. All Rights Reserved.
    Specify -h (-help) for command options

--------------------------------------------------
VALIDATING AUDIO UNIT: 'aufx' - 'Snvb' - 'ImSw'
--------------------------------------------------
Manufacturer String: Impact Soundworks
AudioUnit Name: SNESVerb
Component Version: 1.0.0 (0x10000)

* * PASS
--------------------------------------------------
TESTING OPEN TIMES:
COLD:
Time to open AudioUnit:         11.497 ms
WARM:
Time to open AudioUnit:         0.128  ms
FIRST TIME:
Time for initialization:        0.386 ms

* * PASS
--------------------------------------------------
VERIFYING DEFAULT SCOPE FORMATS:
Input Scope Bus Configuration:
 Default Bus Count:1
    Bus Name: Input
    Default Format: AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved

Output Scope Bus Configuration:
 Default Bus Count:1
    Bus Name: Output
    Default Format: AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved

* * PASS
--------------------------------------------------
VERIFYING REQUIRED PROPERTIES:

* * PASS
--------------------------------------------------
VERIFYING RECOMMENDED PROPERTIES:
  VERIFYING PROPERTY: Latency
    PASS
  VERIFYING PROPERTY: Tail Time
    PASS
  VERIFYING PROPERTY: Bypass Effect
    PASS

* * PASS
--------------------------------------------------
VERIFYING OPTIONAL PROPERTIES:

* * PASS
--------------------------------------------------
VERIFYING SPECIAL PROPERTIES:

VERIFYING CUSTOM UI
Cocoa Views Available: 1
  JUCE_AUCocoaViewClass_cd97dcd8359d0c9c
    PASS

HAS FACTORY PRESETS

VERIFYING CLASS INFO
    PASS

TESTING HOST CALLBACKS
    PASS

* * PASS
--------------------------------------------------
PUBLISHED PARAMETER INFO:

# # # 10 Global Scope Parameters:

* * PASS
--------------------------------------------------
FORMAT TESTS:

Reported Channel Capabilities (explicit):
      [2, 2]  

Input/Output Channel Handling:
1-1   1-2   1-4   1-5   1-6   1-7   1-8   2-2   2-4   2-5   2-6   2-7   2-8   4-4   4-5   5-5   6-6   7-7   8-8
                                          X                                                                       

* * PASS
--------------------------------------------------
RENDER TESTS:

Input Format: AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved
Output Format: AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000029) 32-bit little-endian float, deinterleaved
Render Test at 512 frames
Slicing Render Test at 64 frames
  PASS


Render Test at 64 frames, sample rate: 22050 Hz
Render Test at 137 frames, sample rate: 96000 Hz
Render Test at 4096 frames, sample rate: 48000 Hz
Render Test at 4096 frames, sample rate: 192000 Hz
Render Test at 4096 frames, sample rate: 11025 Hz
Render Test at 512 frames, sample rate: 44100 Hz
auvaltool(1189,0x7fff7d995000) malloc: *** error for object 0x7f9afb02ca08: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug


validation result: crashed validation

I seemingly don’t get any memory leaks or issues when running the plugin in the included plugin host with debugging enabled… so I’m not certain what’s up with that error.


#2

all dynamic allocation is being done with ScopedPointer’s… so I don’t think delete is being called on anything non-existent… I’m unsure of how to debug checking what the object in memory causing the malloc error is, as this bug seems to occur exclusively with the auval tool… :-/

If I rerun the validation using ‘Reset & Rescan Selection’ in Logic, it sometimes passes, it sometimes does not.


#3

I’d try debugging auvaltool validating the plugin, and maybe try to “set a breakpoint in malloc_error_break to debug” like the error message suggests.


#4

took me a while to figure out how to do this, but I did and I think I’ve now caught the issue, thank you for the suggestion.

There is a ‘downsampler’ effect in this plug-in with fixed frequencies to select from; however, auval ran tests with a host frequency below the target downsampling frequency. This lead to the downsampling algorithm trying to access values that went beyond the size of the original buffer.

I missed this bug as nobody thought to test the plug-in hosted at a frequency below the fixed frequencies to choose from.


#5

To debug the plug-in auval you need to set auvaltool as the executable in the, by selecting “other” in the Run section of the Scheme:

Hit Command-Shift-G and enter /usr/bin

Then select auvaltool fromt the list (not auval).

Finally, you need to enter the arguments to the auvaltool to debug your plugin. This will be:
-v aufx <Plugin Manufacturer Code> <Plugin Code>
for a processor plug-in, and:
-v aumu <Plugin Manufacturer Code> <Plugin Code>
for a synth.

Where Plugin Manufacturer Code and Plugin Code are the four char codes from your Projucer project.

Then you can debug and see where auval is actually crashing.

BTW on 10.11 you might need to disable System Integrity Protection, otherwise the dubugger will fail to connect to auvaltool as it is at the system level:


#6

Instead of disabling SIP you can also copy auvaltool to your home folder and debug it from there


#7

OK thanks!