[React Native] EngineView occasionally not rendering on load

Dependencies:

  • Babylon: 5.13.2
  • ReactNative: react-native-iosandroid-0-65
  • iOS: Reproduced on iOS 15 and 16.

Repro steps:

  1. Clone this sample code: GitHub - BabylonJS/BabylonReactNativeSample
  2. Run it on an iOS simulator or real iOS device.
  3. Using metro, press R in the terminal (or shake the device > reload) to reload several times in a row until the EngineView shows up completely white (see attached video below).

Note: It took me several tries to reproduce, however, when using it at scale (many users), it does reproduce enough times to be a problem
Running a GPU frame capture shows that the rendering is allegedly fine (Xcode will show the proper render pass running, however the EngineView will still be white).

RPReplay_Final1663131332.mov.zip (2.9 MB)

pinging @srzerbetto

@Cedric wondering if it could be related to the latest life cycle changes ???

@clem , can you share the version of react-native-iosandroid-0-65 you are using? Is it the default that cames with BabylonJS/BabylonReactNativeSample?

1 Like

This issue should be fixed with Fix fast refresh for PG by CedricGuillemet · Pull Request #454 · BabylonJS/BabylonReactNative · GitHub
Can you try to repro with this branch?

1 Like

@srzerbetto that’s right, it’s the one coming with the sample code (unchanged).