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

App is crashing in ipad after closing and opening again in Dev Mode #339

Open
Dineshchitta opened this issue Dec 14, 2018 · 6 comments
Open

Comments

@Dineshchitta
Copy link

App is working fine when we run it from xcode for the first time. After that if we close it in iPad and open it again it is crashed [In Dev Mode]

In the crash log it is showing [RNSplashScreen show] is the line which causing the crashing

Crash log :

Incident Identifier: C7534F327-57EC-4A24-9382-D234560E4E02
CrashReporter Key:   a3b86f9d0801af9fc281978cc401c57f6d27b514
Hardware Model:      iPad7,5
Process:             MyAppName [1546]
Path:                /private/var/containers/Bundle/Application/7ECDC3C8-7061-45D0-858F-527FBDB78949/MyApp.app/MyApp
Identifier:          my.bundle.identifier
Version:             1 (1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           my.bundle.identifier [1622]


Date/Time:           2018-12-14 20:12:43.4401 +0530
Launch Time:         2018-12-14 20:12:23.2173 +0530
OS Version:          iPhone OS 11.4 (15F79)
Baseband Version:    n/a
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace SPRINGBOARD, Code 0x8badf00d
Termination Description: SPRINGBOARD, scene-create watchdog transgression: my.bundle.identifier exhausted real (wall clock) time allowance of 19.88 seconds |  | ProcessVisibility: Foreground | ProcessState: Running | WatchdogEvent: scene-create | WatchdogVisibility: Foreground | WatchdogCPUStatistics: ( | "Elapsed total CPU time (seconds): 5.710 (user 5.710, system 0.000), 14% CPU", | "Elapsed application CPU time (seconds): 1.827, 5% CPU" | )
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x0000000183257e08 mach_msg_trap + 8
1   libsystem_kernel.dylib        	0x0000000183257c80 mach_msg + 72
2   CoreFoundation                	0x000000018379ae40 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                	0x0000000183798908 __CFRunLoopRun + 1568
4   CoreFoundation                	0x00000001836b8da8 CFRunLoopRunSpecific + 552
5   Foundation                    	0x000000018412d674 **-[NSRunLoop+ 34420 (NSRunLoop) runMode:beforeDate:]** + 304
6   Foundation                    	0x000000018412d4dc -**[NSRunLoop+ 34012 (NSRunLoop) runUntilDate:]** + 84
7   MyApp                    	0x000000010352f508 +**[RNSplashScreen show]** + 9057544 **(RNSplashScreen.m:30)**
8   MyApp                    	0x0000000102c91528 -[AppDelegate application:didFinishLaunchingWithOptions:] + 21800 (AppDelegate.m:69)
9   MyApp                      	0x00000001051abf24 0x10516c000 + 261924
10  UIKit                         	0x000000018d3fedbc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 408
11  UIKit                         	0x000000018d3fe1c4 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3484
12  UIKit                         	0x000000018d3cb5e0 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1680
13  UIKit                         	0x000000018d9fbb1c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 784
14  UIKit                         	0x000000018d3cadd0 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 160
15  UIKit                         	0x000000018d3cac6c -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 240
16  UIKit                         	0x000000018d3c9afc -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 724
17  UIKit                         	0x000000018e05f84c __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 296
18  UIKit                         	0x000000018d3c91ec -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 432
19  UIKit                         	0x000000018de44ac8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 220
20  UIKit                         	0x000000018df92bf8 _performActionsWithDelayForTransitionContext + 112
21  UIKit                         	0x000000018d3c8c0c -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 248
22  UIKit                         	0x000000018d3c85a8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 368
23  UIKit                         	0x000000018d3c55e0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 540
24  UIKit                         	0x000000018d3c5330 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 364
25  FrontBoardServices            	0x0000000185ff3470 -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 364
26  FrontBoardServices            	0x0000000185ffbd6c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 224
27  libdispatch.dylib             	0x00000001830e4a60 _dispatch_client_callout + 16
28  libdispatch.dylib             	0x00000001830ec170 _dispatch_block_invoke_direct$VARIANT$mp + 224
29  FrontBoardServices            	0x0000000186027878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
30  FrontBoardServices            	0x000000018602751c -[FBSSerialQueue _performNext] + 404
31  FrontBoardServices            	0x0000000186027ab8 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
32  CoreFoundation                	0x000000018379b404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
33  CoreFoundation                	0x000000018379ac2c __CFRunLoopDoSources0 + 276
34  CoreFoundation                	0x000000018379879c __CFRunLoopRun + 1204
35  CoreFoundation                	0x00000001836b8da8 CFRunLoopRunSpecific + 552
36  GraphicsServices              	0x000000018569d020 GSEventRunModal + 100
37  UIKit                         	0x000000018d6d5758 UIApplicationMain + 236
38  MyApp                    	0x0000000102c9431c main + 33564 (main.m:18)
39  libdyld.dylib                 	0x0000000183149fc0 start + 4
@Dineshchitta
Copy link
Author

Env Info

react-native-splash-screen: 3.1.1 react-native: 48.4

@lihp2014
Copy link

Same issue here.
But there is no such problem in release mode.

@yashafromrussia
Copy link

yashafromrussia commented Jan 2, 2019

This happens to me in release mode as well as in debug. The reason it might not be happening to you in release mode is that various optimizations are turned on, thus it should take less time to launch the app.

When we launch the splash screen, we make various network requests. And we hide the splash screen when those requests have been resolved. If that takes too long, the app crashes. I've been able to reproduce this by setting a 30 seconds timeout on the server.

According to Apple - https://developer.apple.com/library/archive/technotes/tn2151/_index.html:

The exception code 0x8badf00d indicates that an application has been terminated by iOS because a watchdog timeout occurred. The application took too long to launch, terminate, or respond to system events. One common cause of this is doing synchronous networking on the main thread. Whatever operation is on Thread 0 needs to be moved to a background thread, or processed differently, so that it does not block the main thread.

So this makes me think that all of our javascript code that's executing the network requests is doing so on the main thread synchronously... Or the splash screen is blocking the main thread

@EmpireJones
Copy link

I think this is the same issue as #397

The fix there resolved this issue for me -- replacing:
[RNSplashScreen show]
with
[RNSplashScreen showSplash:@"LaunchScreen" inRootView:rootView];

The readme seems to mention those two options, but doesn't explain them.

@AndreyPatseiko
Copy link

Thank @gorjuspixels !! Your solution work. I lost much time for finding problem with my app and finally resolved.

@mMarcos208
Copy link

@EmpireJones this file doesn't exist more in version 0.68.2. The new file is AppDelegate.mm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants