Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

standalone application crashes with Invalid pixel data argument for gl.texImage2d() #66

Open
benlucchesi opened this issue Mar 12, 2019 · 1 comment · May be fixed by #228
Open

standalone application crashes with Invalid pixel data argument for gl.texImage2d() #66

benlucchesi opened this issue Mar 12, 2019 · 1 comment · May be fixed by #228

Comments

@benlucchesi
Copy link

Platform: Android
Expo version: 32.0.0
Expo cli version: 2.11.8
app run in expo client and stand alone

I've created a stand-alone app for Android that loads a series of png files into sprites. The application always works using the Expo client, and initially works when deployed as a stand-alone app, but after a day or so, the standalone app starts failing with "Invalid pixel data argument for gl.texImage2d()"

The code used to load the image:

let ballSprite = await PIXI.Sprite.fromExpoAsync( require("../assets/images/b3.png") )

I've tried to preload the assets in the App.js with:

Asset.loadAsync([
....
require('./assets/images/b1.png'),
....
]),

I've defined the asset bundle pattern in the app.js
{
expo: {
...
"updates": {
"enabled": true,
"checkAutomatically": "ON_LOAD",
"fallbackToCacheTimeout": 300000
},
"assetBundlePatterns": [
"**/",
"./assets/images/
.png"
],
...
}
}

What's concerning is that the app just started failing after having been released for a couple of days. I've tried using some of the old patterns for downloading the assets and manually creating the HTMLImageElement to generate the Sprite, and although the techniques still work with the app when loaded in the Expo client, the stand-along app crashes.

I then changed the images completely and everything worked again. Then after about 15 hours the app started failing again with the same error. Could this be some side effect of accessing the CDN a stand-alone app? Nothing locally is being updated and yet the behavior of the app is changing.

Thank you for putting together such a fantastic integration with Pixi.

@danmaas
Copy link

danmaas commented Aug 21, 2019

I'm experiencing the same issue with an expo-three based app. It seems like some kind of problem with the asset or TextureLoader system.

@Bartozzz Bartozzz linked a pull request May 29, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants