Uncaught RuntimeError: memory access out of bounds
See original GitHub issueI’m aware of https://github.com/dermotduffy/frigate-hass-card/issues/257 and https://github.com/dermotduffy/frigate-hass-card/issues/189#issuecomment-969864638, but I’m opening this issue because I started to get this very frequently after upgrading to v3.0.0-rc.1, so I wonder if something has changed or anything like that.
Here is the stack trace:
Uncaught RuntimeError: memory access out of bounds
at wasm://wasm/00025b02
at wasm://wasm/00025b02
at wasm://wasm/00025b02
at MPEG1WASM.initializeWasmDecoder (frigate-hass-card.js?hacstag=3940825523001:10893:35)
at MPEG1WASM.bufferWrite (frigate-hass-card.js?hacstag=3940825523001:10923:12)
at MPEG1WASM.write (frigate-hass-card.js?hacstag=3940825523001:9225:31)
at MPEG1WASM.write (frigate-hass-card.js?hacstag=3940825523001:10945:33)
at TS.packetComplete (frigate-hass-card.js?hacstag=3940825523001:9155:20)
at TS.parsePacket (frigate-hass-card.js?hacstag=3940825523001:9095:18)
at TS.write (frigate-hass-card.js?hacstag=3940825523001:8987:44)
And the spinner just keeps spinning:
If I reload the browser a couple of times, the issue is gone.
Also, I guess it’s important to mention that such problem never happens with a single camera. If I have more than one camera in the dashboard displaying at the same time, either all of them load correctly, or they all don’t.
If nothing has changed and I’m just unlucky, I believe it would be nice if the card could catch the issue from JSMPEG, and display a more helpful message like the JSMPEG has reported an error instead of just keep spinning forever, which gives the impression that it’s still loading.
EDIT: I just realized that it’s not feasible to catch and treat the error, by reading through the second mentioned issue.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (14 by maintainers)
Again, suggests an issue with the internals of the player. If it was the websocket proxy, or the options, I wouldn’t expect that to be the case – but I cannot explain why it happens more in Lovelace vs Frigate UI.
I’d guess because the player is running out of memory, then re-trying an operation, which causes another reconnection (?). But I think we’d need to dig into the player code to fully understand why it’s opening so many connections in the error case.
Lovelace dashboards are a patchwork of different components written by different people – a single card refreshing the whole document (i.e. blowing up all components) is probably not going to fly. If we could catch this error ‘card-side’ and just reset the player, that’d be much better (e.g. does calling
FrigateCardLiveJSMPEG._refreshPlayer()
work?)