4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.81k stars 848 forks source link

Editor crash - Wasm error #5898

Open JakeTheAnimation opened 11 months ago

JakeTheAnimation commented 11 months ago

Describe what you were doing when the crash happened

  1. Went to add a behavior
  2. got an error what do i do? 2023-11-12 (7)

GDevelop version

5.3.180-4f98ffa9ab98b751f6526f4d8ac28cef0c16ed1e

Platform info

System Version: Unknown system version (web-app), Arch: Unknown architecture (web-app), User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0, Platform: Win32

Additional error context

RuntimeError: memory access out of bounds at https://editor.gdevelop.io/libGD.wasm?cache-buster=5.3.180-4f98ffa9ab98b751f6526f4d8ac28cef0c16ed1e:wasm-function[3963]:0xce16f at https://editor.gdevelop.io/libGD.wasm?cache-buster=5.3.180-4f98ffa9ab98b751f6526f4d8ac28cef0c16ed1e:wasm-function[3556]:0xaf81a at https://editor.gdevelop.io/libGD.wasm?cache-buster=5.3.180-4f98ffa9ab98b751f6526f4d8ac28cef0c16ed1e:wasm-function[3416]:0xa72e5 at https://editor.gdevelop.io/libGD.wasm?cache-buster=5.3.180-4f98ffa9ab98b751f6526f4d8ac28cef0c16ed1e:wasm-function[3139]:0x91933 at https://edi...

Additional component context

in Og
in div
in s
in ey
in div
in ForwardRef
in ForwardRef
in div
in div
in ForwardRef
in ForwardRef
in div
in t
in ForwardRef
in k
in div
in ForwardRef
in ForwardRef
in ForwardRef
in ForwardRef
in Unknown
in py
in n
in t
in Unknown
in hy
in t
in div
in l
in n
in n
in t
in Unknown
in PI
in div
in n
in Ga
in div
in _L
in Unknown
in mt
in f
in u
in v
in m
in j
in h
in h
in Z
in d
in X
in n

...

AlexandreSi commented 11 months ago

Hi @JakeTheAnimation, Does this error happen consistently?

ClementPasteau commented 11 months ago

Crash seems to be coming from this line: https://github.com/4ian/GDevelop/blob/master/newIDE/app/src/BehaviorsEditor/NewBehaviorDialog.js#L70

calling getRequiredBehaviorTypes() here:

https://github.com/4ian/GDevelop/blob/master/Core/GDCore/Extensions/Metadata/BehaviorMetadata.cpp#L412-L422

Unsure which line exactly caused the memory access out of bounds though, and how we ended up in such a state.