iOS app crashes 1 out of 100 times with EXC_BAD_ACCESS KERN_INVALID_ADDRESS, using the same Native method
My bound native iOS library method crashes 1 out of 100 times, when the native library is doing a memmove on a ‘short[] data’.
Its from a Xamarin.Ios project that has a bound method for a native iOS library that is using a ‘short[] data’ as input.
Can it be that the ‘short[] data’ is corrupted, cleaned or whiped by .Net runtime in any way?
(when running the native method nothing is done in .Net code with the ‘short[] data’)
Can I make the ‘short[] data’ more save, that the Native code just has a copy of the .Net version?
The bound method looks like this:
[DllImport("__Internal")]
public static extern unsafe int ps_process_raw(ps_decoder_t* ps, short[] data, nuint n_samples, int no_search, int full_utt);
Firebase Crashlytics shows a crash in its log, but the App won’t really crash but just does not return the Method…so the app wont crash and the Native library is still usable after the crash that’s not really a crash.
Crashlytics show this:
“EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000010df00000”.
Stacktrace:
Crashed: Thread Pool Worker
0 libsystem_platform.dylib 0x1e5a946b0 _platform_memmove + 176
1 MyApp.Ios 0x1024ab694 fe_shift_frame + 52844
Any help or suggestions would be very much appreciated.