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

Crash: Attempt to invoke direct method 'void android.view.SurfaceControl.checkNotReleased()' #381

Closed
kylecesmat opened this issue Aug 12, 2022 · 22 comments · Fixed by ice-blockchain/mobile-app#206
Assignees
Labels
bug Something isn't working

Comments

@kylecesmat
Copy link

kylecesmat commented Aug 12, 2022

Bug summary

This crash occurs when a Pixel user backgrounds the application before the splashscreen finishes & the hide method can be invoked.

Initially I filed a crash report w/ Google but their response suggests this can be avoided on v12 by perhaps trying to unregister setOnExitAnimationListener, as well as stop any other Splash screen animation/logic - possibly when the activity onPause is invoked?

Crash report: https://issuetracker.google.com/issues/242118185?pli=1

This is likely occurring near this line https://github.com/zoontek/react-native-bootsplash/blob/master/android/src/main/java/com/zoontek/rnbootsplash/RNBootSplashModule.java#L124

Library version

4.3.1

Environment info

SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 28, 29, 30, 31, 32
      Build Tools: 29.0.2, 29.0.3, 30.0.2, 30.0.3, 31.0.0, 33.0.0
      System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /usr/bin/javac

Steps to reproduce

  1. Open an app with react-native-bootscreen
  2. Before the bootscreen completes, background the app
  3. Open the app back up and notice a crash

Reproducible sample code

Should be reproducible in sample app on a Google Pixel device.
@kylecesmat kylecesmat added the bug Something isn't working label Aug 12, 2022
@walterholohan
Copy link

Also experiencing the same issue, we've had 31 crashes across 3 users

@tr3v3r
Copy link

tr3v3r commented Oct 6, 2022

Hi. The same here.
https://issuetracker.google.com/issues/242118185

image

@mym0404
Copy link

mym0404 commented Oct 17, 2022

Same
image

I just removed this

setOnExitAnimationListener call entirely because I don't need fade out animation.
Then, it seems to be fixed now.

@wakie92
Copy link

wakie92 commented Feb 7, 2023

I've experienced same issue. Is there any update the issue?

@claudiozam
Copy link

Same issue. Android 12 on Samsung SM-X800 device.

@saadi-ninjasCode
Copy link

Android 13 users facing this issue.

Screenshot 2023-04-28 at 12 42 02 PM

@iferden
Copy link

iferden commented May 3, 2023

We're facing the same issue on Android 13.

@techgerm
Copy link

techgerm commented Jun 1, 2023

We started seeing this crash as well after migrating from react-native-splash-screen to react-native-bootsplash:

Screenshot 2023-06-01 at 1 40 29 PM

@roneyyb
Copy link

roneyyb commented Jun 2, 2023

We are also seeing this crash. What is the fix for this?

@devoren
Copy link

devoren commented Jun 4, 2023

+1, same issue, i think issue is caused by android splash screen api: crash

@faisalamin9696
Copy link

Same issue with 4.7.1

@KolissnikBogdan
Copy link

same +1

1 similar comment
@Roamer77
Copy link

same +1

@Soap-141

This comment was marked as spam.

1 similar comment
@a-petrenko-muse

This comment was marked as spam.

@zoontek
Copy link
Owner

zoontek commented Jul 28, 2023

Could you please just upvote with emojis on the initial message instead of spamming?

No need to trigger notifications for everyone watching this thread just to say "Same".

@zoontek
Copy link
Owner

zoontek commented Jul 28, 2023

I investigated a bit, and can reproduce it.

The issue is kinda hard to solve since even if I implement a LifecycleEventListener, call activity.getSplashScreen().clearOnExitAnimationListener() on activity pause, it's already too late:

checkNotReleased.mp4

The effect is what appears to be a restart of the UI, but it has no impact on the app itself.

@LonelyCpp
Copy link

@zoontek since a complete fix might take you or the community longer to implement, can you recommend a workaround?

would you recommend this comment? even if it means that some feature will stop working, it might be better than an outright crash.

thanks!

@zoontek
Copy link
Owner

zoontek commented Aug 8, 2023

@LonelyCpp I would not recommend it, for a pretty good reason. The fix is here: #475 😄

with.react-native-bootsplash.v5.mp4

@zoontek
Copy link
Owner

zoontek commented Aug 21, 2023

Version 5.0.0 is available: https://github.com/zoontek/react-native-bootsplash/releases/tag/5.0.0

@Abhishek25031991
Copy link

Facing the same issue in the 5.0 version also

@gkueny
Copy link

gkueny commented Mar 11, 2024

Fix is OK for us in after upgraded to 5.4.0 from 4.X.X

Thanks @zoontek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.