rive-wasm icon indicating copy to clipboard operation
rive-wasm copied to clipboard

TypeError: Cannot read properties of null (reading 'deleteTexture') after updating Rive

Open ansf opened this issue 3 months ago • 0 comments

We are using @rive-app/webgl2. After upgrading from 2.31.2 to 2.31.3, we see a new error in our tracking:

TypeError: Cannot read properties of null (reading 'deleteTexture')

Stacktrace

TypeError: Cannot read properties of null (reading 'deleteTexture')
    at Zd.glDeleteTextures (@rive-app/webgl2/rive.js:3260:13)

    // many lines like:
    at ? (rive.wasm:wasm-function[13413]:0x13cbd5)

    at unref (@rive-app/webgl2/rive.js:1653:11)
    at FileFinalizer.prototype.unref (@rive-app/webgl2/rive.js:4065:24)
    at finalizationRegistry (@rive-app/webgl2/rive.js:4295:48)

The last frame is:

var finalizationRegistry = new MyFinalizationRegistry(function (ob) {
    ob === null || ob === void 0 ? void 0 : ob.unref();
});

The first frame is:

glDeleteTextures:function(a, b) {
  for (var c = 0; c < a; c++) {
    var d = I[b + 4 * c >> 2], e = zd[d];
    e && (Z.deleteTexture(e), e.name = 0, zd[d] = null);
  }
}

So I think it should be caused by this commit https://github.com/rive-app/rive-wasm/commit/122604ed6738e395ecae2faeb4ec10735be1c848

We are seeing this on current Chrome Mobile WebView ~141 and current Mobile Safari (we are mainly targeting mobile). We rolled back to 2.31.2 for now.

Unfortunately, I do not have a reproducer yet. Do you have any ideas, how we can proceed from here?

ansf avatar Oct 21 '25 07:10 ansf