Backendless Support
 
Solved

iOS SDK 4.0.21 Query causes uncaught exception

Starting in the iOS 4.0.21 SDK, the following code with my example query ...

  1. let whereClause = "Featured = true and ((Business is not null and Business.Active = true and Geo is not null) or (Location is not null and (Location.objectId in (Business[Active = true].Locations.objectId))) or (Geo is not null)) and ((Visible = true) and Time_End after \'2018-03-23T23:25:39-06:00\')"
  2. let q = DataQueryBuilder().setWhereClause(whereClause)
  3. Backendless.sharedInstance().data.of(Event.self).find(q, response: { (resp) in
  4. //use resp
  5. }) { (fault) in
  6. //error
  7. }

(I modified the example query to hard code a date value)

That causes the following uncaught exception with 4.0.21 (but works fine with 4.0.20):

  1. 2018-03-23 23:34:08.088165-0600 [48279:4268030] -[StringType getCacheKey]: unrecognized selector sent to instance 0x6080002054b0
  2. 2018-03-23 23:34:08.090580-0600 [48279:4268030] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[StringType getCacheKey]: unrecognized selector sent to instance 0x6080002054b0'
  3. *** First throw call stack:
  4. (
  5. 0 CoreFoundation 0x000000010a7471e6 __exceptionPreprocess + 294
  6. 1 libobjc.A.dylib 0x000000010988f031 objc_exception_throw + 48
  7. 2 CoreFoundation 0x000000010a7c8784 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
  8. 3 CoreFoundation 0x000000010a6c9898 ___forwarding___ + 1432
  9. 4 CoreFoundation 0x000000010a6c9278 _CF_forwarding_prep_0 + 120
  10. 5 0x0000000104c959b1 -[AnonymousObject setFieldsDirect:cache:] + 1282
  11. 6 0x0000000104c96c5d -[AnonymousObject adapt:cache:] + 1290
  12. 7 0x0000000104c95db0 -[AnonymousObject setFieldsDirect:cache:] + 2305
  13. 8 0x0000000104c96c5d -[AnonymousObject adapt:cache:] + 1290
  14. 9 0x0000000104c88730 -[ArrayType defaultAdapt:] + 625
  15. 10 0x0000000104c88b1d -[BodyHolderFactory createObject:] + 114
  16. 11 0x0000000104c95bed -[AnonymousObject setFieldsDirect:cache:] + 1854
  17. 12 0x0000000104c96c5d -[AnonymousObject adapt:cache:] + 1290
  18. 13 0x0000000104c96d5c -[DefaultAdapter adapt:] + 37
  19. 14 0x0000000104ca3a94 -[AdaptResponder responseHandler:] + 40
  20. 15 0x0000000104c77599 -[HttpEngine processAsyncAMFResponse:] + 453
  21. 16 libdispatch.dylib 0x000000010e5d6807 _dispatch_call_block_and_release + 12
  22. 17 libdispatch.dylib 0x000000010e5d7848 _dispatch_client_callout + 8
  23. 18 libdispatch.dylib 0x000000010e5e292b _dispatch_main_queue_callback_4CF + 628
  24. 19 CoreFoundation 0x000000010a709c99 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
  25. 20 CoreFoundation 0x000000010a6cdea6 __CFRunLoopRun + 2342
  26. 21 CoreFoundation 0x000000010a6cd30b CFRunLoopRunSpecific + 635
  27. 22 GraphicsServices 0x00000001102fea73 GSEventRunModal + 62
  28. 23 UIKit 0x0000000106cfd097 UIApplicationMain + 159
  29. 24 0x0000000104adc637 main + 55
  30. 25 libdyld.dylib 0x000000010e654955 start + 1
  31. 26 ??? 0x0000000000000001 0x0 + 1
  32. )

App ID is A324EB2B-1BF5-EB0A-FF36-62F47D198E00

Leave a Comment

Comments (3)

photo
1

Hello Renato,

I've checked this issue and I can't reproduce it - it works fine both for v.4.0.21 and 4.0.24 (I receive the array of the Event items).

Please update to the latest version of iOS and provide more info if the error occurs.

Regards, Olga

photo
1

Hi Olga, Just curious - what version of Xcode are you using? Let me see if I can do some more digging and see if it could be related to that?

photo
1

Hi again Olga,

I noticed a stack trace in slack that almost looked like my issue, and just updated to the latest pod (4.0.27), and the issue seems to be gone. Thank you, I think it's good to close this! :)

Renato

photo