Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detox test crash w/ Signal 6 in release mode #704

Closed
doronpr opened this issue May 1, 2018 · 7 comments
Closed

detox test crash w/ Signal 6 in release mode #704

doronpr opened this issue May 1, 2018 · 7 comments

Comments

@doronpr
Copy link
Contributor

doronpr commented May 1, 2018

Description

Detox crashes after running in release mode.

Steps to Reproduce

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 7.3.4
  • React Native: 0.51.600
  • Node: 8.9.1
  • Device: iPhone8 Plus Simulator
  • Xcode: 9
  • macOS: 10.13.3

Device and verbose Detox logs

detox ERR! Signal 6 was raised
detox ERR! (
detox ERR!     0   Detox                               0x000000010ce2550f _ZL16__DTXHandleCrashP11NSExceptionP8NSNumberP8NSString + 469
detox ERR!     1   Detox                               0x000000010ce252bb _ZL17__DTXHandleSignali + 54
detox ERR!     2   libsystem_platform.dylib            0x00000001145ebf5a _sigtramp + 26
detox ERR!     3   ???                                 0x000000000000ffff 0x0 + 65535
detox ERR!     4   libsystem_c.dylib                   0x00000001142810eb abort + 127
detox ERR!     5   libsystem_malloc.dylib              0x00000001143bbf42 malloc_zone_malloc + 0
detox ERR!     6   Foundation                          0x000000010cfaecbc -[NSConcreteMapTable grow] + 938
detox ERR!     7   Foundation                          0x000000010cfad258 -[NSConcreteMapTable setObject:forKey:] + 164
detox ERR!     8   Detox                               0x000000010ce1c655 -[GREYAppStateTracker(PrettyPrint) _pp__trackState:forObject:] + 144
detox ERR!     9   EarlGrey                            0x00000001254903cd -[__NSCFLocalDataTask_GREYAdditions grey_track] + 157
detox ERR!     10  EarlGrey                            0x0000000125490752 -[__NSCFLocalDataTask_GREYAdditions greyswizzled_resume] + 210
detox ERR!     11  Inbox                               0x000000010ca5092b -[RCTHTTPRequestHandler sendRequest:withDelegate:] + 670
detox ERR!     12  Inbox                               0x000000010ca48fb3 -[RCTNetworkTask start] + 149
detox ERR!     13  Inbox                               0x000000010ca4eb2d -[RCTNetworking sendRequest:responseType:incrementalUpdates:responseSender:] + 1254
detox ERR!     14  Inbox                               0x000000010ca4ff08 __44-[RCTNetworking sendRequest:responseSender:]_block_invoke + 212
detox ERR!     15  EarlGrey                            0x00000001254595c4 __60-[GREYDispatchQueueTracker grey_dispatchAsyncCallWithBlock:]_block_invoke + 36
detox ERR!     16  libdispatch.dylib                   0x0000000114139177 _dispatch_call_block_and_release + 12
detox ERR!     17  libdispatch.dylib                   0x000000011413a1ba _dispatch_client_callout + 8
detox ERR!     18  libdispatch.dylib                   0x0000000114141d3d _dispatch_queue_serial_drain + 654
detox ERR!     19  libdispatch.dylib                   0x00000001141425a0 _dispatch_queue_invoke + 329
detox ERR!     20  libdispatch.dylib                   0x000000011413ec97 _dispatch_queue_override_invoke + 477
detox ERR!     21  libdispatch.dylib                   0x0000000114144980 _dispatch_root_queue_drain + 568
detox ERR!     22  libdispatch.dylib                   0x00000001141446ea _dispatch_worker_thread3 + 119
detox ERR!     23  libsystem_pthread.dylib             0x00000001145fd1ca _pthread_wqthread + 1387
detox ERR!     24  libsystem_pthread.dylib             0x00000001145fcc4d start_wqthread + 13
detox ERR! )```
@LeoNatan
Copy link
Contributor

LeoNatan commented May 1, 2018

Thanks
This appears iOS related, it's crashing in the NSMapTable internals. Not sure yet why.

@LeoNatan
Copy link
Contributor

LeoNatan commented May 1, 2018

Could be related to thread safety. NSMapTable is not thread safe, so that could be the cause.

@doronpr
Copy link
Contributor Author

doronpr commented May 1, 2018

That would make a lot of sense since it only happens in Release mode when the app responds significantly faster and perhaps triggering a race condition. What can we do about it?

@LeoNatan
Copy link
Contributor

LeoNatan commented May 1, 2018

I will push a proposed fix soon, and @rotemmiz will release a new version. Let's see if my solution helps.

LeoNatan added a commit that referenced this issue May 1, 2018
@LeoNatan
Copy link
Contributor

LeoNatan commented May 1, 2018

@rotemmiz Please release a new patch version. Thanks

@LeoNatan
Copy link
Contributor

LeoNatan commented May 1, 2018

@doronpr Please update on the status when you can. If my solution didn't work, I will reopen the issue.

@LeoNatan LeoNatan closed this as completed May 1, 2018
@doronpr
Copy link
Contributor Author

doronpr commented May 2, 2018

Solved. Thanks @LeoNatan !

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants