age-series / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
Other
65 stars 30 forks source link

Look for potential cases where render calls made without render context #310

Closed jrddunbr closed 6 months ago

jrddunbr commented 6 months ago

Follow-on for #308, make sure any OpenGL calls are made from a valid context.

jrddunbr commented 6 months ago

If Cael doesn't want to do this reassign to me.

asiekierka commented 6 months ago

This is a very rare situation pre-1.8; unless you're spinning your own threads, the only place where this could realistically happen is network packet handlers and related events.

If you are spinning your own threads or doing more OpenGL code in a network thread, follow the pattern in #309

jrddunbr commented 6 months ago

I am thinking this will basically be a scan for all OpenGL calls in IDEA and follow the execution flows a level or two. I don't expect to find anything since it probably would have crashed us already.

If you have already looked into this I might as well close it. I greatly appreciate the help! I would probably have not caught that one line there.

asiekierka commented 6 months ago

Admittedly, I haven't.

jrddunbr commented 6 months ago

I did a glance over what calls OpenGL and there's really not a lot of places that look unusual or concerning. Probably best dealt on a reactive basis.