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

Bug: Recursive navigation example throws critical exception: #65

Closed
jaygarcia opened this issue Feb 13, 2015 · 12 comments
Closed

Bug: Recursive navigation example throws critical exception: #65

jaygarcia opened this issue Feb 13, 2015 · 12 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jaygarcia
Copy link
Contributor

Stack Trace: https://gist.github.com/moduscreate/7d8e93c8ce18635044c3
Demo: http://www.screencast.com/t/AJKD3erIOSe

@jaygarcia
Copy link
Contributor Author

Still exists.

2015-03-03 08:59:03.140 UIExplorer[59212:281803] *** Assertion failure in -[RCTNavigator reactBridgeDidFinishTransaction], /www/ios/react-native/ReactKit/Views/RCTNavigator.m:508
2015-03-03 08:59:03.141 UIExplorer[59212:281803] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'JS has only made partial progress to catch up to UIKit'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000108979f35 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000108612bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x0000000108979d9a +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x000000010822f5df -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
    4   UIExplorer                          0x000000010803c175 -[RCTNavigator reactBridgeDidFinishTransaction] + 1013
    5   UIExplorer                          0x000000010804a7d0 __51-[RCTUIManager uiBlockWithLayoutUpdateForRootView:]_block_invoke326 + 96
    6   UIExplorer                          0x0000000108046806 RCTTraverseViewNodes + 198
    7   UIExplorer                          0x0000000108046936 RCTTraverseViewNodes + 502
    8   UIExplorer                          0x0000000108046936 RCTTraverseViewNodes + 502
    9   UIExplorer                          0x000000010804993a __51-[RCTUIManager uiBlockWithLayoutUpdateForRootView:]_block_invoke + 5466
    10  UIExplorer                          0x000000010804724c __27-[RCTUIManager addUIBlock:]_block_invoke + 124
    11  UIExplorer                          0x0000000108050986 __32-[RCTUIManager batchDidComplete]_block_invoke_2 + 342
    12  libdispatch.dylib                   0x000000010bf25ba6 _dispatch_call_block_and_release + 12
    13  libdispatch.dylib                   0x000000010bf437f4 _dispatch_client_callout + 8
    14  libdispatch.dylib                   0x000000010bf2c8fb _dispatch_main_queue_callback_4CF + 949
    15  CoreFoundation                      0x00000001088e1fe9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    16  CoreFoundation                      0x00000001088a4eeb __CFRunLoopRun + 2043
    17  CoreFoundation                      0x00000001088a4486 CFRunLoopRunSpecific + 470
    18  GraphicsServices                    0x000000010d7279f0 GSEventRunModal + 161
    19  UIKit                               0x0000000109f21420 UIApplicationMain + 1282
    20  UIExplorer                          0x0000000107fde003 main + 115
    21  libdyld.dylib                       0x000000010bf78145 start + 1
    22  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

@vjeux
Copy link
Contributor

vjeux commented Mar 3, 2015

We don't have the time to investigate it right now unfortunately. Don't expect any progress in the next couple of weeks. We're 100% focused on upgrading our infra so that we can push all the components/apis that we have before open sourcing.

@Iragne
Copy link
Contributor

Iragne commented Apr 9, 2015

i add this code and it solve the issue not sure if i introduce an other bug

// We can actually recover from this situation, but it would be nice to know
// when this error happens. This simply means that JS hasn't caught up to a
// back navigation before progressing. It's likely a bug in the JS code that
// catches up/schedules navigations.
if (!(jsGettingAhead ||
jsCatchingUp ||
jsMakingNoProgressButNeedsToCatchUp ||
jsMakingNoProgressAndDoesntNeedTo)) {
RCTLogError(@"JS has only made partial progress to catch up to UIKit");

BOOL jsGettingtooSlow =
  //    --- previously not caught up --------          ------- no longer caught up ----------
  viewControllerCount < previousReactCount && currentReactCount < previousReactCount;

  BOOL reactPushOne = jsGettingAhead && currentReactCount == previousReactCount + 1;
  BOOL reactPopN = jsGettingAhead && currentReactCount < previousReactCount;


  // We can actually recover from this situation, but it would be nice to know
  // when this error happens. This simply means that JS hasn't caught up to a
  // back navigation before progressing. It's likely a bug in the JS code that
  // catches up/schedules navigations.
  if (!(jsGettingAhead ||
        jsCatchingUp ||
        jsMakingNoProgressButNeedsToCatchUp ||
        jsMakingNoProgressAndDoesntNeedTo || 
        jsGettingtooSlow)) {
    RCTLogError(@"JS has only made partial progress to catch up to UIKit");
  }

Feel free to talk about it

@siuying
Copy link

siuying commented Apr 14, 2015

@Iragne patch worked for me, but I dont sure what reactBridgeDidFinishTransaction supposed to do when its jsGettingtooSlow.

@Iragne
Copy link
Contributor

Iragne commented Apr 15, 2015

yes agree with you i would like to talk to @vjeux for that as soon he has time

@soheil-zz
Copy link

+1

@brentvatne
Copy link
Collaborator

@vjeux @tadeuzagallo - any plans to revisit this? seems to be a popular issue to report 😄

@yanxi123-com
Copy link

+1

@Iragne
Copy link
Contributor

Iragne commented May 4, 2015

hi every body
I create the PR #1131
May be it will be better for everybody

frantic pushed a commit to frantic/react-native that referenced this issue May 5, 2015
Summary:
Related to this issue
I created the PR.
Feel free to talk about it.

facebook#65 (comment)

Thanks
Closes facebook#1131
Github Author: Iragne <adelskott@gmail.com>

Test Plan: Open NavigatorIOS example in UIExplorer, push recurse navigation several times. Press back and observe that it no longer breaks.
@Duan112358
Copy link

+1

1 similar comment
@jbhatab
Copy link

jbhatab commented May 12, 2015

+1

@Iragne
Copy link
Contributor

Iragne commented May 15, 2015

You can close it the PR is validate

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

10 participants