react-native-loading-spinner-overlay: Some times cause app crash.

Some times when try to change visibility to false, app crashes with follow error:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not locate shadow view with tag #98' *** First throw call stack: ( 0 CoreFoundation 0x000000010a74d34b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010965d21e objc_exception_throw + 48 2 CoreFoundation 0x000000010a751442 +[NSException raise:format:arguments:] + 98 3 Foundation 0x0000000109229e09 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166 4 MinhaMuamba 0x0000000108de9d52 __33-[RCTUIManager setFrame:forView:]_block_invoke + 386 5 libdispatch.dylib 0x000000010e628980 _dispatch_call_block_and_release + 12 6 libdispatch.dylib 0x000000010e6520cd _dispatch_client_callout + 8 7 libdispatch.dylib 0x000000010e62fe6b _dispatch_queue_serial_drain + 236 8 libdispatch.dylib 0x000000010e630b9f _dispatch_queue_invoke + 1073 9 libdispatch.dylib 0x000000010e6333b7 _dispatch_root_queue_drain + 720 10 libdispatch.dylib 0x000000010e63308b _dispatch_worker_thread3 + 123 11 libsystem_pthread.dylib 0x000000010ea01746 _pthread_wqthread + 1299 12 libsystem_pthread.dylib 0x000000010ea01221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 14
  • Comments: 29 (2 by maintainers)

Most upvoted comments

Same for me. App crash after sometimes showing spinner when calling fetch() and hiding spinner when fetch() done.

*** Assertion failure in __33-[RCTUIManager setFrame:forView:]_block_invoke(), /node_modules/react-native/React/Modules/RCTUIManager.m:440 *** Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘Could not locate shadow view with tag #1092’ *** First throw call stack: (0x181d59900 0x1813c7f80 0x181d597d0 0x1826cca08 0x1001638e4 0x100b5dbf0 0x100b5dbb0 0x100b6a6c8 0x100b618a0 0x100b6c7e0 0x100b6c4d8 0x1819c1470 0x1819c1020) libc++abi.dylib: terminating with uncaught exception of type NSException

Is there any fix for this bug? Thanks

Nope, it doesn’t on 0.41 sorry


From: WillSmith notifications@github.com Sent: Friday, February 10, 2017 2:51:16 PM To: niftylettuce/react-native-loading-spinner-overlay Cc: Luke Rhodes; Comment Subject: Re: [niftylettuce/react-native-loading-spinner-overlay] Some times cause app crash. (#28)

@KelvinEChttps://github.com/KelvinEC upgrade react-native to 0.41.0 , it works fine !

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/niftylettuce/react-native-loading-spinner-overlay/issues/28#issuecomment-278850962, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAJ8rWNu3evPLkcIo6MSQfDP6i2nS0nxks5ra960gaJpZM4KBABz.

I’m seeing this too - it looks to be a timing thing, I would guess some kind of race condition with the state somewhere.

I find that using a timeout as shown below helped to prevent this error and also prevented occurrences when the spinner overlay doesn’t get removed.

setTimeout(() => {
  this.setState({ visible: false })
}, 300)