Scandit / datacapture-spm

5 stars 2 forks source link

Scandit causes crash in Vision framework / DataScannerViewController in iOS 18 #6

Open JoshHrach opened 1 week ago

JoshHrach commented 1 week ago

The very presence of the Scandit framework in an iOS app running on iOS 18 automatically causes a crash in the Vision framework. Specifically, when presenting a DataScannerViewController, the app crashes due to an internal error. My guess is Scandit is swizzling something that Apple is using internally, or is causing some other internal API conflict, that's causing this issue.

Console will output something like the following:

DataScannerViewControllerCrash(1188,0x16f363000) malloc: error for object 0x30386c3c0: pointer being freed was not allocated DataScannerViewControllerCrash(1188,0x16f363000) malloc: set a breakpoint in malloc_error_break to debug

This was tested using SDK versions 6.27.1 and 6.28.0-beta.1 with both Xcode 15.4 and Xcode 16 building to a device running the iOS 18 RC build. A sample project is attached.

DataScannerViewControllerCrash.zip

image image
JoshHrach commented 1 week ago

Culprit seems to be the ScanditTXT library.

ScanditSupport commented 3 days ago

Hi @JoshHrach,

My apologies for the issues you are experiencing, our engineering team is currently investigating the issue. If you want us to inform you about the progress, please get in contact with us directly via: Submit a request – Frequently Asked Questions (FAQ)