expo / expo-pixi

Tools for using pixi.js in Expo
MIT License
304 stars 119 forks source link

Sketch example crashes on Android (undefined is not an object (evaluating '_this.lastPoint.x')) #194

Open gperler opened 2 years ago

gperler commented 2 years ago

I'm trying run the Sketch example (Expo.Sketch /examples/sketch/App.js) from this repository. It works fine on iOS but it crashes on Android:

TypeError: undefined is not an object (evaluating '_this.lastPoint.x')
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:104:6 in reportException
at node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:19 in handleException
at  #node_modules/react-native/Libraries/Core/setUpErrorHandling.js:24:6 in handleError
at node_modules/expo-error-recovery/build/ErrorRecovery.fx.js:12:21 in ErrorUtils.setGlobalHandler$argument_0
at [native code]:null in flushedQueue
at [native code]:null in invokeCallbackAndReturnFlushedQueue

Installed versions:

expo command line 4.9.1

expo: 42.0.3
expo-pixi 1.2.0
expo-gl 10.4.2
@pixi/core 6.0.4
pixi 0.3.1
@pixi/filter-alpha 6.0.4
@pixi/filter-blur 6.0.4

Prior to the Type Error I get a warning:

[Unhandled promise rejection: TypeError: this.nativeVaoExtension.bindVertexArrayOES is not a function. (In 'this.nativeVaoExtension.bindVertexArrayOES(null)', 'this.nativeVaoExtension.bindVertexArrayOES' is undefined)]
at node_modules/pixi.js/lib/core/renderers/webgl/WebGLState.js:259:12 in resetToDefault
at node_modules/pixi.js/lib/core/renderers/webgl/WebGLRenderer.js:310:8 in _initContext
at node_modules/pixi.js/lib/core/renderers/webgl/WebGLRenderer.js:245:8 in WebGLRenderer
at node_modules/pixi.js/lib/core/autoDetectRenderer.js:63:15 in autoDetectRenderer
at node_modules/expo-pixi/lib/components/Sketch.js:195:20 in onContextCreate
at node_modules/expo-pixi/lib/components/Sketch.js:182:20 in onContextCreate
at node_modules/expo-gl/build/GLView.js:25:16 in _onSurfaceCreate
at [native code]:null in callFunctionReturnFlushedQueue

Example repository https://github.com/gperler/pixi-test

paul-leymet commented 2 years ago

Same issue here. I'm interested in any solution !

gperler commented 2 years ago

It seems that expo-pixi conflicts with current expo-gl version. Sketch can't create a renderer on Android.

ChrisCromb commented 2 years ago

I'm also dealing with the same issue with the same installed versions and eager for a solution. Is there an older version that this might work on which is stable?

Joshandrews43 commented 2 years ago

+1, been dealing with this for almost a year

jdpagley commented 2 years ago

I'm dealing with this as well! Really in need of a solution!

ttapia commented 2 years ago

In case someone still has this issue, I was able to solve the crash on android by using the solution from here (apparently it's the same issue but in the Signature class). Simply changing from Signature to Sketch worked for me.