You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(lldb) po _invocation
<NSInvocation: 0x165c68b0>
return value: {v} void
target: {@} 0x1653fc90
selector: {:} getFoobars:callback:
argument 2: {@} 0x178bcd90
argument 3: {@?} 0x165f6ca0 (block)
(lldb) po index
3
So it's trying to release the callback argument, but failing -- likely because it's already been released.
Making the module's queue not a concurrent queue, but a serial one (DISPATCH_QUEUE_SERIAL or simply nil) seems to make the problem go away.
It seems reasonable to me if React required native modules to only use serial queues, though perhaps that should be documented then. Or perhaps the release mechanism introduced in 71da291 needs some tweaking so it can work with concurrent queues? cc @tadeuzagallo
The text was updated successfully, but these errors were encountered:
ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.
Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.
Consider an iOS native module definition:
and an accompanying Swift implementation:
This setup worked fine in React Native 0.15. But since the upgrade to React Native 0.17 (I leap-frogged 0.16), it crashes randomly in
[RCTModuleMethod invokeWithBridge:module:arguments:]
withEXC_BAD_ACCESS
at https://github.com/facebook/react-native/blob/v0.17.0/React/Base/RCTModuleMethod.m#L470 in Thread 18 (com.foobar.foobar).So it's trying to release the callback argument, but failing -- likely because it's already been released.
Making the module's queue not a concurrent queue, but a serial one (
DISPATCH_QUEUE_SERIAL
or simplynil
) seems to make the problem go away.It seems reasonable to me if React required native modules to only use serial queues, though perhaps that should be documented then. Or perhaps the release mechanism introduced in 71da291 needs some tweaking so it can work with concurrent queues? cc @tadeuzagallo
The text was updated successfully, but these errors were encountered: