mixed-reality-extension-sdk icon indicating copy to clipboard operation
mixed-reality-extension-sdk copied to clipboard

Deleted animations cause exceptions when MRE is unloaded

Open willneedit opened this issue 4 years ago • 0 comments

Sample code snippet:

        const rotAnim = await rotAnimData.bind({ ring: this.gateRing });
        rotAnim.play();
        await rotAnim.finished();
        rotAnim.delete();

(Create an animation on the fly, play, then delete it)

For every deleted animation, there'll be an exception thrown when the app is about to shut down (e.g. because the last user left).

Stacktrace as follows:

2020-10-04T18:22:54.287571+00:00 app[web.1]: uncaughtException TypeError: Cannot read property 'creatorMessageId' of undefined
2020-10-04T18:22:54.287572+00:00 app[web.1]: at Session.cacheAnimationUnload (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/adapters/multipeer/session.js:403:55)
2020-10-04T18:22:54.287572+00:00 app[web.1]: at beforeReceiveFromApp (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/adapters/multipeer/rules.js:320:25)
2020-10-04T18:22:54.287572+00:00 app[web.1]: at Session.preprocessFromApp (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/adapters/multipeer/session.js:206:16)
2020-10-04T18:22:54.287573+00:00 app[web.1]: at Session.recvFromApp (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/adapters/multipeer/session.js:54:28)
2020-10-04T18:22:54.287573+00:00 app[web.1]: at SessionExecution.<anonymous> (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/adapters/multipeer/session.js:97:50)
2020-10-04T18:22:54.287574+00:00 app[web.1]: at SessionExecution.emit (events.js:314:20)
2020-10-04T18:22:54.287574+00:00 app[web.1]: at SessionExecution.beforeRecv (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/adapters/multipeer/protocols/sessionExecution.js:20:18)
2020-10-04T18:22:54.287574+00:00 app[web.1]: at SessionExecution.recvMessage (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/protocols/protocol.js:117:38)
2020-10-04T18:22:54.287575+00:00 app[web.1]: at SessionExecution.Protocol.onReceive (/app/node_modules/@microsoft/mixed-reality-extension-sdk/built/internal/protocols/protocol.js:20:18)
2020-10-04T18:22:54.287575+00:00 app[web.1]: at EventedConnection.emit (events.js:314:20)

Looks like deleting an animation doesn't clean up all references to it.

willneedit avatar Oct 04 '20 18:10 willneedit