Log in or register to post comments

Image -> Pixels EXC_BAD_ACCESS on iOS

October 26, 2021 - 6:25am #1

Vuforia SDK Version: 10.2 -

Description with steps to reproduce: While getting an image object from CameraDevice crash is observed.
Reproducible ALWAYS if execute on Background Thread:

Thread t = new Thread(Crash);
t.Start();

void Crash() {
Image image = VuforiaBehaviour.Instance.CameraDevice.GetCameraImage(mPixelFormat);
image.Pixels; // EXC_BAD_ACCESS Crash !!!
}

Stacktrace Head:
#1 0x0000000107315790 in Image_get_Pixels_m02748C3854970964E2E6B93A442AE28FD82A0531 ()

Workarounds applied with no luck:
1. Skip up to 64 first frames;
2. Put some delay before accessing camera Image while format registration takes place.

A working workaround on 50%:
1. Invoke GetCameraImage on Main UI Thread while looping inside Background Thread.
Then the issue is not easily reproducible but soon will crash from the same place.

Not reproducible on Android (Any) or Editor Player.
Before an update to 10.2 was working perfectly on the 9.8 version.
-

Development OS (Mac OS X, Windows, Linux): Mac OS X -

Mobile OS and Version: iOS, 15.0.2 -

Mobile Device Manufacturer and Model name: Apple, iPhone 8 Plus -

Do the Vuforia Sample Applications show the same behavior?: Sample doesn't have such implementation. Seems like all is on UI thread but you can't perform any compuation here.

Log in or register to post comments