tidev/titanium-sdk

iOS: simulator is crashing when location is set to none

m1ga opened this issue · 5 comments

m1ga commented

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

I have an app with a map and user location. After a while it was crashing with this log:

0x7ff800427368 __exceptionPreprocess + 226
0x7ff80004dbaf objc_exception_throw + 48
0x7ff8004268b0 +[__NSFastEnumerationEnumerator allocWithZone:] + 0
0x104bdb07b -[GeolocationModule fireSingleShotLocationIfNeeded:stopIfNeeded:] + 299
0x104bdbc9f -[GeolocationModule locationManager:didFailWithError:] + 223 (GeolocationModule.m:1157)

I found out that the simulator "feature - location" was set to none. Switching that to a real location made it work again.
But is that something we can prevent in the SDK?

Not exactly sure which part in the code is triggering it but perhaps someone can see it already with the crashlog above

Platform

iOS

SDK version you are using

11.1.1.GA (not tested 12.x)

I could not reproduce this on the Simulator - can you provide a sample code for this? In general, I would triage this as "low" priority, as real devices never have no location sensor (different to older Apple devices), but still we could address this.

m1ga commented

I'll make a demo case. It's a vey minor issue, just logged it since it crashed for me :)

m1ga commented

couldn't reproduce it in a own app yet. But I was testing the "string replacement" bug with a client app and I had my ipad simulator set to "location: none" from the last run and suddenly got this crash again:


0   CoreFoundation                	    0x7ff80045477b __exceptionPreprocess + 226
1   libobjc.A.dylib               	    0x7ff80004db73 objc_exception_throw + 48
2   CoreFoundation                	    0x7ff800453cc3 +[__NSFastEnumerationEnumerator allocWithZone:] + 0
3   ONE                           	       0x100b45dfb -[GeolocationModule fireSingleShotLocationIfNeeded:stopIfNeeded:] + 299
4   ONE                           	       0x100b46a0f -[GeolocationModule locationManager:didFailWithError:] + 223 (GeolocationModule.m:1153)

(12.2.0)

Have to check what they are doing 😄

@m1ga Any update here? Maybe it was a side effect of the string-format bug?

m1ga commented

I'll go ahead an close it. Not seen that again as I have a location set now and just switching it off didn't show the error again.