weBIGeo / webigeo

Rendering system for weBIGeo.
GNU General Public License v3.0
4 stars 0 forks source link

Memory out of bounds when scrolling #30

Closed GeraldKimmersdorfer closed 2 months ago

GeraldKimmersdorfer commented 4 months ago

WASM freezes with RuntimeError: memory access out of bounds error when using the mouse scroll very heavily.

How to reproduce (on Chrome 127.0.6533.73):

It likely correlates to consecutive texture readbacks.

GeraldKimmersdorfer commented 2 months ago

The JavaScript loop was calling C++ callbacks during sleep. By ensuring that these events are not propagated while sleeping, we should be able to address the issue.

We just need to be aware that input events might be dropped. If this causes problems later, we may need to queue the events and process them in the correct order after sleep is finished. For now, we’ll stick with a warning unless queuing becomes necessary.

Commit 69d1f540d0ec522ac9b3603394efb442acb83e67 implements this.