Tracktion / pluginval

Cross platform plugin testing and validation tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when validating vst3 plugins

abrykt opened this issue · comments

We are validating plugins built with juce and we are running VST and AU with no problems. With VST3 we sometimes get a crash with the following stacktrace.

0   pluginval                           0x000000010baab75e _ZN4juce11SystemStats17getStackBacktraceEv + 94
1   pluginval                           0x000000010b571004 _ZN12_GLOBAL__N_119getCrashLogContentsEv + 36
2   pluginval                           0x000000010b570e65 _ZN12_GLOBAL__N_111handleCrashEPv + 21
3   pluginval                           0x000000010baab9f8 _ZN4juceL11handleCrashEi + 24
4   libsystem_platform.dylib            0x00007ff807e9bdfd _sigtramp + 29
5   ???                                 0x00007ff7b49ab7d8 0x0 + 140701863688152
6   libsystem_pthread.dylib             0x00007ff807e8243a _pthread_cond_check_init_slow + 207
7   libsystem_pthread.dylib             0x00007ff807e820a0 pthread_cond_broadcast + 94
8   libc++.1.dylib                      0x00007ff807de4ce5 _ZNSt3__118condition_variable10notify_allEv + 9
9   pluginval                           0x000000010babab80 _ZNK4juce13WaitableEvent6signalEv + 64
10  pluginval                           0x000000010bb853c2 _ZNK4juce14MessageManager4Lock5abortEv + 50
11  pluginval                           0x000000010bb8537e _ZNK4juce14MessageManager4Lock15messageCallbackEv + 46
12  pluginval                           0x000000010bb8e876 _ZN4juce14MessageManager4Lock15BlockingMessage15messageCallbackEv + 70
13  pluginval                           0x000000010bb99813 _ZN4juce12MessageQueue18deliverNextMessageEv + 99
14  pluginval                           0x000000010bb99766 _ZN4juce12MessageQueue15runLoopCallbackEv + 54
15  pluginval                           0x000000010bb99465 _ZN4juce12MessageQueue21runLoopSourceCallbackEPv + 21
16  CoreFoundation                      0x00007ff807f4d19b __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17  CoreFoundation                      0x00007ff807f4d103 __CFRunLoopDoSource0 + 180
18  CoreFoundation                      0x00007ff807f4ce7d __CFRunLoopDoSources0 + 242
19  CoreFoundation                      0x00007ff807f4b898 __CFRunLoopRun + 892
20  CoreFoundation                      0x00007ff807f4ae5c CFRunLoopRunSpecific + 562
21  HIToolbox                           0x00007ff810c9d5e6 RunCurrentEventLoopInMode + 292
22  HIToolbox                           0x00007ff810c9d34a ReceiveNextEventCommon + 594
23  HIToolbox                           0x00007ff810c9d0e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
24  AppKit                              0x00007ff80a9861dd _DPSNextEvent + 927
25  AppKit                              0x00007ff80a98489a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
26  AppKit                              0x00007ff80a976f49 -[NSApplication run] + 586
27  pluginval                           0x000000010bb830a9 _ZN4juce14MessageManager15runDispatchLoopEv + 153
28  pluginval                           0x000000010bb82f8f _ZN4juce19JUCEApplicationBase4mainEv + 399
29  pluginval                           0x000000010bb82d9c _ZN4juce19JUCEApplicationBase4mainEiPPKc + 60
30  pluginval                           0x000000010b573753 main + 51
31  dyld                                0x000000011af0f52e start + 462

This looks similar to an issue we're seeing. When testing a VST3 plugin from the command line, we occasionally get a crash with this stack trace:

Starting test: pluginval / Editor Automation...

*** FAILED: VALIDATION CRASHED WHILST VALIDATING /Library/Audio/Plug-Ins/VST3/CenterOne.vst3
0   pluginval                           0x00000001008721a0 _ZN4juce11SystemStats17getStackBacktraceEv + 64
1   pluginval                           0x00000001006bd9e6 _ZN12_GLOBAL__N_119getCrashLogContentsEv + 38
2   pluginval                           0x00000001006bd98b _Z11getCrashLogv + 107
3   pluginval                           0x00000001006b8122 _ZN20CommandLineValidator14connectionLostEv + 50
4   pluginval                           0x00000001006d26e8 _ZNSt3__110__function6__funcIZN9Validator16ensureConnectionEvE3$_1NS_9allocatorIS3_EEFvvEEclEv + 56
5   pluginval                           0x00000001006d2444 _ZN22ValidatorParentProcess20handleConnectionLostEv + 68
6   pluginval                           0x000000010090f379 _ZN4juce12MessageQueue21runLoopSourceCallbackEPv + 57
7   CoreFoundation                      0x00007ff80880f35a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
8   CoreFoundation                      0x00007ff80880f2c2 __CFRunLoopDoSource0 + 180
9   CoreFoundation                      0x00007ff80880f040 __CFRunLoopDoSources0 + 242
10  CoreFoundation                      0x00007ff80880da50 __CFRunLoopRun + 892
11  CoreFoundation                      0x00007ff80880d014 CFRunLoopRunSpecific + 562
12  HIToolbox                           0x00007ff8119215e6 RunCurrentEventLoopInMode + 292
13  HIToolbox                           0x00007ff81192134a ReceiveNextEventCommon + 594
14  HIToolbox                           0x00007ff8119210e5 _BlockUntilNextEventMatchingListInModeWithFilter + 70
15  AppKit                              0x00007ff80b1831fd _DPSNextEvent + 927
16  AppKit                              0x00007ff80b1818ba -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1394
17  AppKit                              0x00007ff80b173f69 -[NSApplication run] + 586
18  pluginval                           0x0000000100903274 _ZN4juce19JUCEApplicationBase4mainEv + 164
19  pluginval                           0x0000000100903183 _ZN4juce19JUCEApplicationBase4mainEiPPKc + 83
20  dyld                                0x000000020129851e start + 462
21  dyld                                0x0000000201293000 dyld + 0

Binary Images:
0x1006ad000 pluginval
0x7ff808790000 CoreFoundation
0x7ff8118f3000 HIToolbox
0x7ff80b144000 AppKit

libc++abi: Pure virtual function called!

The failure appears to only happen from the command line, I've never had it happen when running from the GUI app (though this may be coincidental).

When I run pluginval --validate <plugin> --strictnessLevel 10 all tests pass, but when I run pluginval --validate <plugin> --strictnessLevel 10 --randomize I get this crash. The crash also occurs when specifying --repeat, --sample-rates or --block-sizes.

@drowaudio does this appear to be an issue in our plugin code? Do you have any ideas where I could start looking?

I figured out what the issue is. See this post for a explanation: https://forum.juce.com/t/blockingmessage-accessing-messagemanager-lock-that-went-out-of-scope/51901

@benthevining Your problem is most likely due to something else. Try running with --validate-in-process in a debugger.