WebAudio icon indicating copy to clipboard operation
WebAudio copied to clipboard

Fix NULL error

Open Astralcircle opened this issue 1 year ago • 4 comments

Fixes:

lua/webaudio/receiver.lua:335: Tried to use a NULL entity!
    1. WorldToLocal - [C]:-1
        2. updateObject - lua/webaudio/receiver.lua:335
            3. func - lua/webaudio/receiver.lua:385
                4. unknown - lua/includes/extensions/net.lua:38

Astralcircle avatar Nov 08 '24 15:11 Astralcircle

I never did this because it was never reproducable and couldn't think of why it'd happen. Adding an IsValid there just feels like a hack.

https://github.com/Vurv78/WebAudio/issues/42#issue-983384217 https://github.com/Vurv78/WebAudio/issues/60

But ig I'll merge later on if you don't have anything to reproduce the issue.

vurvdev avatar Nov 08 '24 18:11 vurvdev

An entity may become invalid while it is being transmitted to the network.

Astralcircle avatar Nov 09 '24 03:11 Astralcircle

Yes, that's what you'd think. I don't remember fully since it's been so long but I'm pretty sure I'd have tested the case for that and still not have been able to reproduce it.

Something like this:

@inputs P:entity # ensure wired
const Wa = webAudio(...)
Wa:setParent(P)
Wa:transmit()
P:propDelete()

vurvdev avatar Nov 09 '24 05:11 vurvdev

Any progress of this?

Astralcircle avatar Apr 28 '25 13:04 Astralcircle

I don't think it will ever be merged.

Astralcircle avatar May 26 '25 22:05 Astralcircle