4ian / GDevelop

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

Crash while using an editor #4237

Open Ej1423 opened 2 years ago

Ej1423 commented 2 years ago

=> Please write here a short description of when the error occured and how to reproduce it. You also may have to create an account on GitHub before posting. all i did was try to add a block and it sent me to an error screen

When you're ready, click on "Submit new issue". Don't change the rest of the message. Thanks!

Error stack (don't write anything here)

TypeError: t.find is not a function
    at t.a (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/1.1a92dbe2.chunk.js:1:405856)
    at t.a (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/1.1a92dbe2.chunk.js:1:122868)
    at Qe (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/1.1a92dbe2.chunk.js:1:1390232)
    at Yo (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:397550)
    at ks (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:443656)
    at mu (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:436416)
    at vu (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:436341)
    at su (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:433350)
    at file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:384828
    at t.unstable_runWithPriority (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:460055)
    at $i (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:384537)
    at Qi (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:384773)
    at Ji (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:384708)
    at M (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:453820)
    at Qt (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:361991)
    at HTMLDocument.i (file:///Users/JamisEM/Desktop/games/GDevelop%205.app/Contents/Resources/app.asar/www/static/js/64.6dcd5ad3.chunk.js:2:572367)

Component stack (don't write anything here)


    in Qe
    in div
    in ForwardRef
    in ForwardRef
    in Unknown
    in n
    in t
    in div
    in div
    in t
    in DragSource(t)
    in DropTarget(DragSource(t))
    in r
    in x
    in t
    in div
    in div
    in t
    in div
    in t
    in Unknown
    in n
    in c
    in div
    in n
    in n
    in t
    in Unknown
    in Unknown
    in div
    in n
    in Unknown
    in div
    in Unknown
    in Unknown
    in d
    in j
    in f
    in j
    in j
    in g
    in c
    in Be
    in n
    in t
    in he
    in n
    in Unknown
    in g
    in t
    in l
    in o
    in n
    in n
    in DragDropContext(n)
    in n
    in c

Other details

ClementPasteau commented 2 years ago

Hi @Ej1423 ! Thanks for reporting this problem. Can you explain a bit more what you mean by "adding a block"? A few detailed steps of what you were doing would help greatly find where this problem comes from 👍


Quick analysis from the component stack. It looks like this is coming from the component ItemRow used in SortableVirtualizedItemList A hypothesis is that the problem comes from the ObjectsList or the ObjectsGroupList. I found that a .find() method is used in both:

https://github.com/4ian/GDevelop/blob/aed4b76a3f87f8b090792b14ce87b7a2b693fbe3/newIDE/app/src/ObjectsList/index.js#L639-L641

https://github.com/4ian/GDevelop/blob/aed4b76a3f87f8b090792b14ce87b7a2b693fbe3/newIDE/app/src/ObjectGroupsList/index.js#L392-L396

But not sure if this could be coming from here, as I don't see how those elements could be undefined.