storesafe/cordova-sqlite-storage

Crash on IOS8 [in combination with Pusher plugin]

Moussawi7 opened this issue · 5 comments

Hi,
The plugin work excellent on Android devices, and IOS7-, but it crash randomly on IOS8.
After debugging, i found the following exception on Xcode:

libobjc.A.dylib`objc_msgSend:
0x11021e000:  testq  %rdi, %rdi
0x11021e003:  jle    0x11021e068               ; objc_msgSend + 104  
0x11021e005:  movq   (%rdi), %r11
0x11021e008:  movq   %rsi, %r10   Thread 6:EXC_BAD_ACCESS( code =EXC_I386_GPFLT)
0x11021e00b:  andl   0x18(%r11), %r10d
0x11021e00f:  shlq   $0x4, %r10
0x11021e013:  addq   0x10(%r11), %r10

Thank you.

Unfortunately this is not enough information. A stack trace to show how objc_msgSend was called would help find the cause. A small test program to demonstrate the issue would be especially helpful.

Hi @brodybits ,
In fact, It's too complicated to create a small program, specially that the application call server many times during initialization.
but i discovered that if i prevent pusher from running, the issue disappears. so I think that there are something cause conflicts between pusher and your plugin!!.
Thanks.

Hi @brodybits ,
when i reported the issue to you, I also reported the issue to pusher, and this was the response:
" _try calling SQLite and Pusher functions in separate ticks (using setTimeout with 0 timeout)_ ".
and this trick work for me.
pusher/pusher-js#103 (comment)
Thank you

Thanks @Moussawi7. This "trick" will be documented (when I get a chance).

Documented as a known issue in README.md