Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NULL error #73

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix NULL error #73

wants to merge 1 commit into from

Conversation

Astralcircle
Copy link

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

@Vurv78
Copy link
Owner

Vurv78 commented Nov 8, 2024

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.

#42 (comment)
#60

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

@Astralcircle
Copy link
Author

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

@Vurv78
Copy link
Owner

Vurv78 commented Nov 9, 2024

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants