godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.01k stars 21.09k forks source link

Unable to load GDExtension in Web export due to LinkError #97426

Open 949886 opened 2 weeks ago

949886 commented 2 weeks ago

Tested versions

4.3.stable.official.77dcf97d8

System information

Windows 11 - Vulkan (Forward+)

Issue description

Uncaught (in promise) LinkError: WebAssembly.instantiate(): 
Import #69 "env" "memory": mismatch in shared state of memory, declared = 1, imported = 0

Steps to reproduce

  1. Open MPR
  2. Click Remote Debug > Run in Browser in the top-right corner.
  3. Open the browser console, and you will see the error.

The exported project also has the same error.

Minimal reproduction project (MRP)

MPR.zip

bobby-the-epic commented 1 week ago

Same problem as #94537. Can be fixed by turning on thread support in your web export preset (Project -> Export... -> Web -> Variant -> Thread Support) or build the library without thread support and modify your .gdextension.