[AAX] Deadlock / hang after COMPARE in Pro Tools

I’m working on a new update for a plugin.

We’re now getting the following issue when using the “Compare” function in Pro Tools. It seems to go into a deadlock.

Here is the stack trace when I pause execution:

semaphore_timedwait_trap 0x000000018040fea8
CAAXAutomationDelegate::GetNumberOfChanges(int *) 0x0000000122c2713c
CFicAAXWidget::GetNumPluginChanges(SFicPlugInSpec *, long *) 0x0000000122c5117c
SMgr_PlugInInst::GetPlugInChangeCount() 0x0000000125245a00
SMgr_PlugInInst::CurrentSettingsMatchPreset(bool) 0x0000000125245cd4
SMgr_PlugInInst::UpdateCompareState(bool) 0x0000000125246794
SMgr_PlugInInst::SetLiveSettings(SMgr_PISettingsData *, bool) 0x0000000125246748
SMgr_PlugInInst::DoCompareCommand() 0x0000000125247594
SMgr_PlugInInstSet::DoCompareCommand(short) 0x000000012525a830
TATimeView::GetClassDescDynamic() const 0x0000000281b76148
TFXNumField::IFXNumField(TFXWindow *) 0x0000000282325010
TView::HandleMouseDown(const VPoint &, TToolboxEvent *, _CPoint) 0x00000001028e12e0
TView::HandleMouseDown(const VPoint &, TToolboxEvent *, _CPoint) 0x00000001028e10e0
TView::HandleMouseDown(const VPoint &, TToolboxEvent *, _CPoint) 0x00000001028e10e0
TView::HandleMouseDown(const VPoint &, TToolboxEvent *, _CPoint) 0x00000001028e10e0
TFXTrackField::IFXTrackField(TFXWindow *) 0x000000028239f64c
-[DFW_NSView mouseDown:] 0x00000001028edb0c
forwardMethod 0x00000001838ea9ec
-[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] 0x00000001838f02cc
-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] 0x000000018387af08
-[NSWindow(NSEventRouting) sendEvent:] 0x000000018387abc8
-[NSApplication(NSEvent) sendEvent:] 0x0000000183879f0c
-[DFW_NSApplication sendEvent:] 0x0000000102ae32e0
-[NSApplication _handleEvent:] 0x0000000183ac9fc4
-[NSApplication run] 0x0000000183741368
DFW_EventLoop::RunApplicationEventLoop() 0x0000000102ae6324
TApplication::Run() 0x00000001029092c0
PtApp_MidiFileImport_ParseClient::ConvertMidiFileTickToChunkTime_Tick(int) 0x00000002851ca8fc
PtApp_MidiFileImport_ParseClient::ConvertMidiFileTickToChunkTime_Tick(int) 0x00000002851d10d0
main 0x0000000100aab1c8
start 0x00000001800f7f28

Can anyone shed some light on this?

Happens both on Windows and Mac. I got the stack trace on Mac. with Pro Tools Developer build.
I was not able to get it on Windows.

Would probably be useful to get other thread callstack to know where is the actual deadlock

1 Like

A couple of threads look like they might be where the issue is:

Thread-4:
semaphore_wait_trap 0x000000018040fe90
XThreads_RawEvent::Wait(unsigned int) 0x00000001015ea84c
CWriteBehinder::DoWriteBehind() 0x00000001015e9868
CWriteBehinderThread::StartWriteBehinder() 0x00000001015e980c
CWriteBehinderThread::Exec() 0x00000001015ea358
XThreads_RawThread::TaskEntryPoint(void *) 0x00000001015ea518
_pthread_start 0x000000018044ffa8

CVDisplayLink:
__psynch_cvwait 0x0000000180413710
_pthread_cond_wait 0x00000001804505a0
CVDisplayLink::waitUntil(unsigned long long) 0x00000001881dcc64
CVDisplayLink::runIOThread() 0x00000001881dbd34
_pthread_start 0x000000018044ffa8