question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Freeze & Crash when remote debug enabled RN@0.42.0-rc.1

See original GitHub issue

Description

I tried to update an existing project to RN@0.42.0-rc.1 and noticed that the app freezes and crashes when I try to dispatch a redux action open a modal. I then went and tried to isolate the issue and found out it crashes only when remote debug is enabled, which makes me think it might not be related to redux. This is the last error in console:

Error: Attempted to remove more RCTKeyboardObserver listeners than added

Reproduction

  1. clone and install patrikholcak/react-native-remote-bug
  2. Run iOS simulator, toggle remote debug on
  3. Click Toggle modal — first click will freeze the app and the second one will crash it

Solution

No idea.

Additional Information

  • React Native version: 0.42.0-rc.1
  • Platform: iOS
  • Operating System: MacOS

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:18
  • Comments:39 (12 by maintainers)

github_iconTop GitHub Comments

17reactions
cailenmusselmancommented, Mar 4, 2017

Oooookay guys, so I have it figured out… sort of.

The elevation changes I introduced to YellowBox cause iOS apps to hang when remote debugging is enabled and a warning is logged.

So my changes do not effect the Modal component directly, it’s just that Modal is logging the warning "Calling of '[-RCTUIManager setFrame:forView]' which is deprecated" which in turn brings out the bug introduced by my YellowBox changes in iOS.

So the actual bug we’re observing is what @alphasp posted.

In summary: Android + no remote debugging = OK Android + remote debugging = OK iOS + no remote debugging = OK iOS + remote debugging = HANGS

Interestingly, if I change elevation: Number.MAX_VALUE to Number.MAX_SAFE_INTEGER the bug dissappears. So maybe there’s some sort of overflow occurring on iOS, I’m not sure.

I don’t really have the time to get to the actual root of the issue, so I just propose any of these changes:

elevation: Platform.OS === 'android' ? Number.MAX_SAFE_INTEGER : undefined // since elevation IS only an android property

or 2)

elevation: Number.MAX_SAFE_INTEGER

or 3)

elevation: 1000 // pick a value, any value

Preferences? Or does someone want to get to the ACTUAL root of the issue?

7reactions
reyesrcommented, Feb 20, 2017

I think this issue is also related to #12368 and appears when using Modal on IOS, in a specific context, in debug mode.

I do not use redux, my app actually uses NavigationExperimental (the root component of the display is a NavigationCardStack) and when I display a Modal on IOS in Debug Mode, the render() function freezes and the modal is never displayed. On Android, the very same code works fine in both Normal and Debug Mode.

This freeze happens in 0.42.0-rc3, but NOT in 0.41.2.

I couldn’t create a minimal app that reproduces the bug, as just adding a modal to the default app created after an init’ does not trigger the issue. There is something more, but not sure what makes the issue appear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Remote Debugger Freezes and Crashes ...
We are seeing an issue when using the remote debugger attached to service host. Whenever debugging asynchronous code, using step into or step...
Read more >
React Native Android crashes on enabling debug mode
The same react native codebase, turning on dubug mode on ios is working fine, but on Android it always crash when debug mode...
Read more >
Remote debugger freezes application : IDEA-204154 - YouTrack
Have java application running outside of IntelliJ (localhost is fine) · Connect to that JVM with a remote debugger. · Place a breakpoint...
Read more >
Cloud Applications Studio (Pilot) freezes while Debugging
While debugging in the SAP Cloud Applications Studio (Pilot), you notice that the program freezes. After some time the program is force quit....
Read more >
Chapter 10. Kernel Debugging | FreeBSD Documentation Portal
FreeBSD Kernel Debugging. ... On FreeBSD 9.0-RELEASE and later versions, bsdinstall will ask whether crash dumps should be enabled on the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found