Are you using the wxWidgets CVS version of wxAUI? This bug was fixed in a slightly different way. If you are using wxAUI 0.9.x, one way to fix the problem is jason's patch, but ultimately, that's not what was causing the race condition (at least for me).

If you are still having problems, I'll apply the patch as it is listed here.

I've just compiled from a 2006-09-30 CVS snapshot, and the problem is still there. I can repeatedly produce the problem by creating an app with a single window and docking it back and forth between two opposing sides of the application's main window.

I do not think the fix I gave is correct since with it floating panes sometimes stop reponding to mouse drags.