rnc-archive / react-native-webgl

DEPRECATED: use expo-gl – Implements WebGL for react-native
295 stars 73 forks source link

[Android] Project crashs on RN 0.58 #87

Closed ducNgbk closed 4 years ago

ducNgbk commented 5 years ago

Everything works fine if I use RN 0.57.X. I want to run use this lib with RN 0.58.X or above. However, my app crash every time I run it.

I am looking for your help Thanks in advance

  onContextCreate = gl => {
    const rngl = gl.getExtension("RN");

    const init = () => {
    };

    const animate = () => {
      gl.flush();
      rngl.endFrame();
    };

    init();
    animate();
  };
  render() {
    return (
      <View
        style={{ flex: 1 }}
        {...this._panResponder.panHandlers} // Handle camera
      >
        <WebGLView
          style={StyleSheet.absoluteFillObject}
          onContextCreate={this.onContextCreate}
        />
      </View>
    );
  }
Other dependencies:
    "react": "16.6.3",
    "react-native": "0.58.0",
    "react-native-webgl": "0.8.0",
    "three": "^0.104.0"

Log on Android studio

D: init exiting
I: Loading com.google.android.webview version 74.0.3729.157 (code 372915750)
I: Time to load native libraries: 2 ms (timestamps 775-777)
I: [INFO:library_loader_hooks.cc(50)] Chromium logging enabled: level = 0, default verbosity = 0
I: Expected native library version number "74.0.3729.157", actual native library version number "74.0.3729.157"
I: Running application "TestThree" with appParams: {"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
W: Accessing hidden field Landroid/view/View;->mAccessibilityDelegate:Landroid/view/View$AccessibilityDelegate; (light greylist, reflection)
D: onWindowVisibilityChanged(0) true fr.greweb.rnwebgl.RNWebGLView{87d1b61 V.E...... ......I. 0,0-0,0 #3} of ViewRootImpl@c5176ea[MainActivity]
D: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x1 surface={valid=true 3828072448} changed=false
D: hide() Surface(name=SurfaceView - com.testthree/com.testthree.MainActivity@87d1b61@0[16138])/@0x9a26686 false true fr.greweb.rnwebgl.RNWebGLView{87d1b61 V.E...... ......ID 0,0-1080,2157 #3}
D: surfaceCreated 1 #8 fr.greweb.rnwebgl.RNWebGLView{87d1b61 V.E...... ......ID 0,0-1080,2157 #3}
D: surfaceChanged (1080,2157) 1 #8 fr.greweb.rnwebgl.RNWebGLView{87d1b61 V.E...... ......ID 0,0-1080,2157 #3}
D: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D: About to load: librnwebgl.so
    librnwebgl.so not found on /data/data/com.testthree/lib-main
D: librnwebgl.so found on /data/app/com.testthree-oXpfilkNL3_9chyjYS3FMQ==/lib/arm
    Not resolving dependencies for librnwebgl.so
D: Loaded: librnwebgl.so
W: 0xebadde09 skipped times: 0
A: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xee0f0434 in tid 16493 (mqt_js), pid 16138 (com.testthree)
meishier commented 5 years ago

expo-gl supported 0.58 already https://github.com/expo/expo/tree/master/packages/expo-gl

ducNgbk commented 5 years ago

expo-gl supported 0.58 already https://github.com/expo/expo/tree/master/packages/expo-gl

@meishier you recommend I should use expo-gl instead of react-native-webgl

b3nab commented 5 years ago

@meishier it's not a solution for this issue, sadly 😿