Slider::setPopupDisplayEnabled() causes crash on iOS 12


#1

Hello,

With latest development tip, when using setPopupDisplayEnabled (true, true, this) on Slider components, my app running on iOS 12 crashes as soon as the slider is touched (when the bubble is to be displayed).

Xcode points to juce_Windowing.mm, line 422:
return UIApplicationMain (argc, const_cast<char**> (argv), nil, NSStringFromClass (delegateClass));
with the following error: JUCE Message Thread (1): EXC_BAD_ACCESS (code=1, address=0x105e94000)
At this point, the debugger points out that customDelegatePtr is NULL.

Edit: just figured out I didn’t unrolled the whole call stack. Here’s a screenshot. Unfortunately, my knowledge in JUCE code base is too thin, but something wrong with the draw code of the BubbleComponent itself which doesn’t work anymore with CoreGraphics?

Thanks in advance for your help. I have a GUI that heavily relies on this features.

Best,


#2

After searching for ERROR_CGDataProvider_BufferIsNotReadable, this helped me narrow the problem down to DropShadow.

Disabling it in BubbleComponent solves my problem (I can live without that drop shadow). But I believe this would requires a fix anyway.

Hope that helps a little.

Best,


#3

I’ve been running into the same crash on iOS ( ERROR_CGDataProvider_BufferIsNotReadable) but in my case the code that seemed to trigger it (semi randomly, and never inside the simulator) is some juce::Image manipulations, something innocuitous like that (no pointer or pixel manipulations , just drawing from an image into another image):

Graphics g(img2);
g.drawImageAt(img.getClippedImage(Rectangle<int>(img.getWidth()-w1, 0, w1, img.getHeight())).createCopy(), w0, 0);

Adding the call to ‘.createCopy’ has reduced the frequency of the crashes but they still occurs from time to time. A very strange issue


#4

Still getting down this thing (as much as I can). Definitely CoreGraphics related (so yes, deeply related to juce::Image).

I also got the error message BufferIsNotBigEnough when debugging step by step.

Still searching for more answers (https://forums.developer.apple.com/message/289053).


#5

I’m experiencing this in iOS 12 anytime I draw a copied image. No problems in iOS 11 and earlier. For example:

Image bgCopy = boxImage[imageState].createCopy();
bgCopy.multiplyAllAlphas(currentOpacity);
g.drawImageWithin (bgCopy, 0, bgOffset, getWidth(), h, RectanglePlacement::xMid | RectanglePlacement::yTop | sizability, false);

#6

Created a hopefully more precise and useful thread about this: https://forum.juce.com/t/crashes-with-juce-image-coregraphics-ios-12/29524


#7

I have a somehow similar problem, but on MacOS:

https://forum.juce.com/t/image-problem-after-xcode-update/29504

Could it be related to xCode 10 and not “only” iOS?
Best regards
John