Start a new topic

[iOS] EXC_BAD_ACCESS (code=1, address=0x20a800000000)

Hello! Inquiring about a crash that happens on iOS.

We are currently on the latest version of the SDK (8.7), Cordova 8.0.0, and Ionic 4.12
   

  WikitudeSDK`wikitude::sdk_core::impl::LocationService::newLocationEventAvailable:
      0x103fb1774 <+0>:  stp    x22, x21, [sp, #-0x30]!
      0x103fb1778 <+4>:  stp    x20, x19, [sp, #0x10]
      0x103fb177c <+8>:  stp    x29, x30, [sp, #0x20]
      0x103fb1780 <+12>: add    x29, sp, #0x20            ; =0x20 
      0x103fb1784 <+16>: ldp    x20, x21, [x0, #0xd8]
      0x103fb1788 <+20>: cmp    x20, x21
      0x103fb178c <+24>: b.eq   0x103fb17b0               ; <+60>
      0x103fb1790 <+28>: mov    x19, x1
->  0x103fb1794 <+32>: ldr    x0, [x20], #0x8      Thread 1: EXC_BAD_ACCESS (code=1, address=0x20a800000000)
      0x103fb1798 <+36>: ldr    x8, [x0]
      0x103fb179c <+40>: ldr    x8, [x8, #0x20]
      0x103fb17a0 <+44>: mov    x1, x19
      0x103fb17a4 <+48>: blr    x8
      0x103fb17a8 <+52>: cmp    x21, x20
      0x103fb17ac <+56>: b.ne   0x103fb1794               ; <+32>
      0x103fb17b0 <+60>: ldp    x29, x30, [sp, #0x20]
      0x103fb17b4 <+64>: ldp    x20, x19, [sp, #0x10]
      0x103fb17b8 <+68>: ldp    x22, x21, [sp], #0x30
      0x103fb17bc <+72>: ret     

     
Quick context, the application uses the AR.platform.sendJSONObject() function to request data from the ionic/cordova webview. That data is fetched via http request and then sent back to the wikitude webview using the WikitudePlugin.callJavascript() function. 

This was working perfectly in version 7 of the SDK, but after upgrading we've found that the second or third time this specific call for external data occurs the app crashes. However, we never get a crash on the first request.

I'm not sure if that is related at all, as the crash log above mentions the LocationService and NewLocationEventAvailable.


Here are some additional logs that will hopefully be helpful. 

UIKitCore`UIApplicationMain:
    0x1efc59b64 <+0>:   stp    x24, x23, [sp, #-0x40]!
    0x1efc59b68 <+4>:   stp    x22, x21, [sp, #0x10]
    0x1efc59b6c <+8>:   stp    x20, x19, [sp, #0x20]
    0x1efc59b70 <+12>:  stp    x29, x30, [sp, #0x30]
    0x1efc59b74 <+16>:  add    x29, sp, #0x30            ; =0x30 
    0x1efc59b78 <+20>:  mov    x20, x3
    0x1efc59b7c <+24>:  mov    x21, x1
    0x1efc59b80 <+28>:  mov    x22, x0
    0x1efc59b84 <+32>:  mov    x0, x2
    0x1efc59b88 <+36>:  bl     0x1f0181e08               ; symbol stub for: -[_UICloudSharingActivity _activitySupportsPromiseURLs]
    0x1efc59b8c <+40>:  mov    x19, x0
    0x1efc59b90 <+44>:  mov    x0, x20
    0x1efc59b94 <+48>:  bl     0x1f0181e08               ; symbol stub for: -[_UICloudSharingActivity _activitySupportsPromiseURLs]
    0x1efc59b98 <+52>:  mov    x20, x0
    0x1efc59b9c <+56>:  mov    w0, #0x168
    0x1efc59ba0 <+60>:  movk   w0, #0x2b87, lsl #16
    0x1efc59ba4 <+64>:  mov    w1, #0x32
    0x1efc59ba8 <+68>:  mov    x2, #0x0
    0x1efc59bac <+72>:  mov    x3, #0x0
    0x1efc59bb0 <+76>:  mov    x4, #0x0
    0x1efc59bb4 <+80>:  bl     0x1f0181a3c               ; symbol stub for: __66-[UICloudSharingController _deleteShareAfterDismissalWithoutSave:]_block_invoke_2
    0x1efc59bb8 <+84>:  orr    w0, wzr, #0x3
    0x1efc59bbc <+88>:  orr    w1, wzr, #0x3
    0x1efc59bc0 <+92>:  mov    x2, #-0x1
    0x1efc59bc4 <+96>:  orr    x4, xzr, #0x8000000000000000
    0x1efc59bc8 <+100>: mov    w3, #0x0
    0x1efc59bcc <+104>: bl     0x1f0181868               ; symbol stub for: -[UIWebView webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:]
    0x1efc59bd0 <+108>: adrp   x23, 55431
    0x1efc59bd4 <+112>: ldr    w8, [x23, #0x364]
    0x1efc59bd8 <+116>: cbz    w8, 0x1efc59c60           ; <+252>
    0x1efc59bdc <+120>: lsr    w8, w8, #8
    0x1efc59be0 <+124>: cmp    w8, #0x201                ; =0x201 
    0x1efc59be4 <+128>: b.lo   0x1efc59c10               ; <+172>
    0x1efc59be8 <+132>: bl     0x1f0181ce8               ; symbol stub for: -[_UIShareParticipantDetails detailText]
    0x1efc59bec <+136>: mov    x23, x0
    0x1efc59bf0 <+140>: mov    x0, x22
    0x1efc59bf4 <+144>: mov    x1, x21
    0x1efc59bf8 <+148>: mov    x2, x19
    0x1efc59bfc <+152>: mov    x3, x20
    0x1efc59c00 <+156>: bl     0x1efc59c90               ; _UIApplicationMainPreparations
    0x1efc59c04 <+160>: mov    x0, x23
    0x1efc59c08 <+164>: bl     0x1f0181cdc               ; symbol stub for: -[_UIShareParticipantDetails setParticipantID:]
    0x1efc59c0c <+168>: b      0x1efc59c24               ; <+192>
    0x1efc59c10 <+172>: mov    x0, x22
    0x1efc59c14 <+176>: mov    x1, x21
    0x1efc59c18 <+180>: mov    x2, x19
    0x1efc59c1c <+184>: mov    x3, x20
    0x1efc59c20 <+188>: bl     0x1efc59c90               ; _UIApplicationMainPreparations
    0x1efc59c24 <+192>: adrp   x8, 55431
    0x1efc59c28 <+196>: ldr    x0, [x8, #0x328]
    0x1efc59c2c <+200>: adrp   x8, 1577
    0x1efc59c30 <+204>: add    x1, x8, #0xdcb            ; =0xdcb 
    0x1efc59c34 <+208>: bl     0x1f0181dcc               ; symbol stub for: CloudDocsLibrary
->  0x1efc59c38 <+212>: mov    x0, x20              Thread 1: EXC_BAD_ACCESS (code=1, address=0x20a800000000)
    0x1efc59c3c <+216>: bl     0x1f0181dfc               ; symbol stub for: -[_UICloudSharingActivity _documentSharingControllerDidDismiss:]
    0x1efc59c40 <+220>: mov    x0, x19
    0x1efc59c44 <+224>: bl     0x1f0181dfc               ; symbol stub for: -[_UICloudSharingActivity _documentSharingControllerDidDismiss:]
    0x1efc59c48 <+228>: mov    w0, #0x0
    0x1efc59c4c <+232>: ldp    x29, x30, [sp, #0x30]
    0x1efc59c50 <+236>: ldp    x20, x19, [sp, #0x20]
    0x1efc59c54 <+240>: ldp    x22, x21, [sp, #0x10]
    0x1efc59c58 <+244>: ldp    x24, x23, [sp], #0x40
    0x1efc59c5c <+248>: ret    
    0x1efc59c60 <+252>: adrp   x8, 55429
    0x1efc59c64 <+256>: ldr    x8, [x8, #0xf40]
    0x1efc59c68 <+260>: cmn    x8, #0x1                  ; =0x1 
    0x1efc59c6c <+264>: b.ne   0x1efc59c78               ; <+276>
    0x1efc59c70 <+268>: ldr    w8, [x23, #0x364]
    0x1efc59c74 <+272>: b      0x1efc59bdc               ; <+120>
    0x1efc59c78 <+276>: adrp   x0, 55429
    0x1efc59c7c <+280>: add    x0, x0, #0xf40            ; =0xf40 
    0x1efc59c80 <+284>: adrp   x1, 43769
    0x1efc59c84 <+288>: add    x1, x1, #0x390            ; =0x390 
    0x1efc59c88 <+292>: bl     0x1f0181730               ; symbol stub for: -[UIWebView _webView:commitPreview:]
    0x1efc59c8c <+296>: b      0x1efc59c70               ; <+268> 

 

libdyld.dylib`start:
       0x1c2c1e8dc <+0>: nop     
->  0x1c2c1e8e0 <+4>: bl     0x1c2cc4eac               ; exit Thread 1: EXC_BAD_ACCESS (code=1, address=0x20a800000000)
       0x1c2c1e8e4 <+8>: brk    #0x3 


Thanks for the help.


Hi,


Could you please provide us with further details to these questions:


  • What device does this happen with (model details and OS version)?
  • Is this happening with the sample app or in your own app? If it happens with your own app, Does the sample app work on your device?


As we're not officially supporting Ionic, does the same issue also occur with the standard Cordova plugin if you work without Ionic? As this might be also related to incopatibilies with Ionic (you mentioned that with a previous SDK it was working without any issues).


Thx and greetings

Nicola

We've been able to reproduce this crash on all of our iOS testing devices.

- iPhone 7+ |  iOS 12.4 (Also reproduced on 12.2)
- iPhone X   |  iOS 12.4

- iPhone 8   |  iOS 12.4

- iPhone 6+ |  iOS 12.3.1
- iPhone 6+ |  iOS 12.+ (cannot verify iOS version at the moment)

This is our own app, not the sample application. The sample application works on all devices. 

Unfortunately, it's not exactly simple to just run our application without Ionic as the hooks are too deep at this point. 

I hope that helps, I'm happy to answer any other questions.

Hi Jacob,


Thx for your feedback. As the SDK sample app works as expected, I can check internally if the error messages alone is enough to check the issue. Again, unfortunately we don't have the setup and knowlege about Ionic to investigate this very deeply.


Thx and greetings

Nicola

Login or Signup to post a comment