-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
com.squareup.SocketRocket.NetworkThread(18): EXC_BAD_ACCESS #6117
Comments
@hasen6 Did you fix your issues? I get a similar error. |
Well I think it was to do with the memory leak problem that they still haven't fixed. I haven't had that error again, I mainly get malloc errors which I assume are also to do with the memory leak problem. |
I think this is fixed now. I'm going to close this issue but feel free to reopen it if this is still occurring. |
This is happening to me after upgrading to RN v0.54.2. Only occurs on iOS builds and happens under the same conditions - after a few minutes of non-usage it freezes and Xcode pinpoints the error here:
|
When i leave the iPhone for few seconds in Debug-remotely mode this error is occurs and all making freeze com.squareup.SocketRocket.NetworkThread (10): signal SIGABRT. Anyone resolve it ? |
I have same problem. Any idea ? @friendly-robot |
Same problem when I open WebView and wait ~10 min.
|
Leave debugging for short while also have EXC_BAD_ACCESS for com.squareup.SocketRocket.NetworkThread - (void)main; (line 1592) . react-native: 0.54.4 |
@lacker I can verify that this issue is still happening. Following is my env details:
Could you please reopen this issue? |
I am also experiencing this issue Environment: Error:
|
Happening to me as well on RN v0.54.2 |
Happening to me as well on RN v0.55.3 |
@lacker |
Same here iOS 11.3 (iPhone X, iPhone 6s) |
Same issue Environment: |
The same issue is happening to me as well. Error message: However, I have a suspicion that this might be due to my other error in the same file of RCTSRWebSocket.m: Environment: Packages: (wanted => installed) |
I got this too Environment: Packages: (wanted => installed) |
Happening here as well. com.squareup.SocketRocket.NetworkThread (15): signal SIGABRT Environment: Packages |
Happening on my app as well. Same env as above ☝️ |
I keep getting the same issue, and I must say it is getting really annoying. Can someone please take a look at those errors and fix them? |
Looks like it only took 2 years to fix this... #19489 |
@tapz thanks, I checked and made changes on my end, but still the error occurs. Also looking at the link, it seems that not all tests are ok. |
I can't work like this, constantly getting that **** error: Assertion failed: (_workQueue != NULL), function -[RCTSRWebSocket stream:handleEvent:], file ../node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m, line 1343. I know more people getting this error and it is really frustrating. |
@andidev @nicholasrq , Sorry for not working, I try my best to resolve these crash, now I refactor some code sync from SRWebSocket, please see 19498, much appreciated if you guys can try it and give me some feedback. 😂
|
@zhongwuzw does it affect debugging in any way? if i understand this part of the code correctly this code allows us to use webworkers for remote debugging. correct me if i’m wrong |
@nicholasrq , It's the native code of |
@zhongwuzw
|
Now i'm getting this error instead of queue thing (after fixing it using @zhongwuzw approach) It's in react-native/Libraries/WebSocket/RCTSRWebSocket.m at line 1599 Same as before, after 10-20 minutes of idle app crashed |
Hi guys, this issue is bothering me. I try the solution of @zhongwuzw, my application last longer but then it continue to crash again. My Env: If someone have solution please let me know. Thank you in advance! |
@truongluong1314520 , you try the PR? Can you post the crash backtrace? |
I faced same issue as @nicholasrq at the first place. However, I used that PR by @zhongwuzw , it works for more than 20 minutes now. I will keep the app running for hours and post the issue here if any. |
Hi @zhongwuzw , I use your code: `// Don't use code below please if (workQueue == NULL) { dispatch_async(workQueue, ^{ I will run it again and report it to you later |
@truongluong1314520 , Emm, you should use this, I will remove the comments to prevent misleading. |
Sr @zhongwuzw , after reading the ticket, I do not know what to do in my RCTSRWebSocket.m to fix the issue. Can you please give me more details? |
I kept the app running for more than 18 hours, it works properly. I suppose the PR really solve this issue since 2016. |
Hi @zhongwuzw , thank you for your solution and quick reply. From what Kroderia said, I am sure your code can work like a charm |
The same crash on 0.55.4 |
Hi @zhongwuzw Copy pasting the content of RCTSRWebSocket.m from your pull request #19489 My setup: iPad3 iOs 9.3.5, xCode 9.4.1 "dependencies": {
"appcenter": "^1.4.0",
"appcenter-analytics": "^1.4.0",
"appcenter-crashes": "^1.4.0",
"axios": "^0.18.0",
"eslint-config-rallycoding": "^3.2.0",
"lz-string": "^1.4.4",
"moment": "^2.22.1",
"react": "16.3.2",
"react-native": "0.55.3",
"react-native-device-info": "^0.21.5",
"react-native-fcm": "^14.1.3",
"react-native-fs": "^2.9.12",
"react-native-mail": "^3.0.6",
"react-native-vector-icons": "^4.6.0",
"react-navigation": "1.5.11",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-thunk": "^2.2.0"
} |
@Kroderia @erwan-lcs , Thanks for tests. |
@erwan-lcs I copy-pasted the code you linked and so far, everything is working again as expected. Will report back if any errors occur. |
I have been using the following (dirty) script to apply the PR during my post-install: echo "Patching RCTSRWebSocket.m from https://github.com/facebook/react-native/pull/19489"
# The patch iself outputs a failure when the file is already patched therefor the output is silenced and the exit code is ignored
# Important: Note that due to the above the patch might silently fail to apply in a future version of react-native!
curl -sS https://patch-diff.githubusercontent.com/raw/facebook/react-native/pull/19489.patch | patch -p1 -N -d node_modules/react-native &> /dev/null || true I can say that I haven't seen any |
Summary: Fixes #21086. Fixes #6117. This PR fixes a crash caused by a race condition when `webSocket` deallocated and `NSStream` delegate callback, because `NSStream`'s delegate callback be called on `RCTSR_networkRunLoop`. This PR mainly changes: * Remove unnecessary `nil` operation in `dealloc` method. * Add a new method `_scheduleCleanUp` to schedule `webSocket` cleanup also on `RCTSR_networkRunLoop`. * In `stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode` delegate method, add a `wself` to make safe further. Pull Request resolved: #22439 Differential Revision: D13564247 Pulled By: cpojer fbshipit-source-id: 675c1b2805aa45c54d7708d796f5843ef7ea34e2
Summary: Fixes facebook#21086. Fixes facebook#6117. This PR fixes a crash caused by a race condition when `webSocket` deallocated and `NSStream` delegate callback, because `NSStream`'s delegate callback be called on `RCTSR_networkRunLoop`. This PR mainly changes: * Remove unnecessary `nil` operation in `dealloc` method. * Add a new method `_scheduleCleanUp` to schedule `webSocket` cleanup also on `RCTSR_networkRunLoop`. * In `stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode` delegate method, add a `wself` to make safe further. Pull Request resolved: facebook#22439 Differential Revision: D13564247 Pulled By: cpojer fbshipit-source-id: 675c1b2805aa45c54d7708d796f5843ef7ea34e2
Summary: Fixes facebook#21086. Fixes facebook#6117. This PR fixes a crash caused by a race condition when `webSocket` deallocated and `NSStream` delegate callback, because `NSStream`'s delegate callback be called on `RCTSR_networkRunLoop`. This PR mainly changes: * Remove unnecessary `nil` operation in `dealloc` method. * Add a new method `_scheduleCleanUp` to schedule `webSocket` cleanup also on `RCTSR_networkRunLoop`. * In `stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode` delegate method, add a `wself` to make safe further. Pull Request resolved: facebook#22439 Differential Revision: D13564247 Pulled By: cpojer fbshipit-source-id: 675c1b2805aa45c54d7708d796f5843ef7ea34e2
Summary: Fixes #21086. Fixes #6117. This PR fixes a crash caused by a race condition when `webSocket` deallocated and `NSStream` delegate callback, because `NSStream`'s delegate callback be called on `RCTSR_networkRunLoop`. This PR mainly changes: * Remove unnecessary `nil` operation in `dealloc` method. * Add a new method `_scheduleCleanUp` to schedule `webSocket` cleanup also on `RCTSR_networkRunLoop`. * In `stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode` delegate method, add a `wself` to make safe further. Pull Request resolved: #22439 Differential Revision: D13564247 Pulled By: cpojer fbshipit-source-id: 675c1b2805aa45c54d7708d796f5843ef7ea34e2
Summary: Fixes facebook#21086. Fixes facebook#6117. This PR fixes a crash caused by a race condition when `webSocket` deallocated and `NSStream` delegate callback, because `NSStream`'s delegate callback be called on `RCTSR_networkRunLoop`. This PR mainly changes: * Remove unnecessary `nil` operation in `dealloc` method. * Add a new method `_scheduleCleanUp` to schedule `webSocket` cleanup also on `RCTSR_networkRunLoop`. * In `stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode` delegate method, add a `wself` to make safe further. Pull Request resolved: facebook#22439 Differential Revision: D13564247 Pulled By: cpojer fbshipit-source-id: 675c1b2805aa45c54d7708d796f5843ef7ea34e2
After leaving the program running for a few minutes it freezes and I get this error. Running version 0.19.
The text was updated successfully, but these errors were encountered: