PDA

View Full Version : IPlug crashes AU Lab Generic View


Tale
11-14-2010, 11:50 PM
My ComboV project crashes AU Lab 2.1 when switching to Generic View. I have also tested Schwa's Olga in AU Lab, and that also crashes.

The cause is that mouseMoved, mouseDown etc. in IGraphicsCocoa.mm are being called while mGraphics is NULL. A solution is to check mGraphics in mouseMoved etc.:

- (void) mouseMoved: (NSEvent*) pEvent
{
if (mGraphics)
{
int x, y;
[self getMouseXY:pEvent x:&x y:&y];
mGraphics->OnMouseOver(x, y, &GetMouseMod(pEvent));
}
}

Now it doesn't crash AU Lab Generic Mode anymore, but the GUI is displayed behind the Generic View. This can be fixed by checking mGraphics in isOpaque:

- (BOOL) isOpaque
{
return mGraphics ? YES : NO;
}

olilarkin
11-15-2010, 03:52 AM
Thanks, I noticed this problem too. Nice how you can switch views in au lab.

olilarkin
11-15-2010, 05:11 AM
still seems to be a problem if you move a control after switching from cocoa to carbon and back to cocoa

Tale
11-15-2010, 10:29 AM
It does seem to work at my end. You do need to patch not just mouseMoved, but also mouseDown, mouseUp, mouseDragged, scrollWheel (and for right mouse button support rightMouseDown, rightMouseUp, and rightMouseDragged). For the complete patch see commit 6d75034 of my Git repository (http://www.taletn.com/WDL.git).

If you first want to try whether it works at your end or not, you could download the AU edition of the latest beta (v1.0.5 beta2 (http://www.martinic.com/combov/downloads/)) of my ComboV project.

olilarkin
11-15-2010, 11:01 AM
whoops i missed the "etc."

mouseMoved etc.

sorry

Tale
11-15-2010, 11:31 AM
:D :p

cc_
11-16-2010, 08:31 AM
I have nothing technical to add, but I'm very glad your fixing this stuff, and if you're ever in Lisbon, I'll buy you a beer!