TL;DR
I am getting an error only on IOS physical device when tapping certain buttons that excecute a certain line of code. I need to interpret the error and find the cause (why only on physical device?)
I am getting this error:
-[NSNull integerValue]: unrecognized selector sent to instance 0x2069e0558 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull integerValue]: unrecognized selector sent to instance 0x2069e0558' *** First throw call stack: (0x1ac9d1288 0x1c5701744 0x1acaaefc0 0x1ac965e98 0x1ac964f70 0x102e9aff0 0x106b80b14 0x10666ba8c 0x1ac636e6c 0x1ac638a30 0x1ac646f48 0x1ac646b98 0x1ac989800 0x1ac943704 0x1ac956bc8 0x1c8ac2374 0x1af2cab58 0x1af04c090 0x10265d384 0x102cb1da4) libc++abi: terminating with uncaught exception of type NSException
- thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT frame #0: 0x00000001e4474b38 libsystem_kernel.dylib
__pthread_kill + 8 libsystem_kernel.dylib
__pthread_kill: -> 0x1e4474b38 <+8>: b.lo 0x1e4474b58 ; <+40> 0x1e4474b3c <+12>: pacibsp 0x1e4474b40 <+16>: stp x29, x30, [sp, #-0x10]! 0x1e4474b44 <+20>: mov x29, sp Target 0: (Runner) stopped.
Whenever I excecute the following Provider code on the tap of a button:
List<FrediUser>? allFrediUsers = Provider.of<List<FrediUser>>(context);
The actual code seems to have nothing to do with the error, it just triggers it.
Important Notes
- This behaviour ONLY HAPPENS ON iPhone PHYSICAL DEVICE.
- Works in iPad PHYSICAL DEVICE.
- IOS SIMULATOR works as expected
- Works perfectly on android --> This means that there is no error with the provider package nor the code that is looking for that list.
I just need to interpret the error to know what it is exactly! All help wanted!