4ian / GDevelop

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

GDevelop freezes during drag and drop #2141

Closed PascalLadalle closed 2 years ago

PascalLadalle commented 3 years ago

About a month ago, GDevelop kept freezing, sometimes five minutes apart, I saved my project every two minutes to avoid losses, but it still took a while to reopen everything. Then I finished most of the work on my extension, and proceeded to work on the scenes, and the crashes stopped. And now that I have to work on the extension again, the freezes are back, so I don't think it's a coincidence. It's always triggered by a mouse drag of actions (probably conditions too, though I can't remember that specifically) in the behavior editor. I click on a line and as soon as I move it a pixel, I see it's stuck, and I know I have to start over. Nothing from the main window responds, but the top menu still opens. Nothing works though, except I think for the Web links in Help. The GDevelop process uses around 20% CPU and never resumes. I'm using beta 101 on Windows 10 64-bit, my monitor is 1920*1080. I remember some bug fixes relating to overlapping fields specifically in that part of GDevelop, could it be related? Is there anything I can do the next time it happens, to investigate?

4ian commented 3 years ago

Would you be able to try on an example to check if it's happening too? To understand if it's related to your game being a large project or not. I think it's a bug in the condition/actions drag'n'drop, but then it should also happen in the scene and everywhere, not specifically in the extensions.

PascalLadalle commented 3 years ago

Yet as far as I remember, it happens exclusively in the extension editor. I have tried fiddling a bit, but I can't find reproducing steps. 😕

cronosauria commented 3 years ago

It's not a game-related bug, it's a bug in the editor itself. I also went through a lot when dragging condition-actions. I don't think I have experienced it anywhere else.

PascalLadalle commented 3 years ago

So, GDevelop froze again, while dragging an action in the extension editor, and using a process explorer (ProcMon.exe), I was able to find something related to GDevelop and drag and drop. Not sure if you'll find anything of interest, but here's the "stack".

DnDstack.txt

tristanbob commented 3 years ago

FYI - This exact bug happens to me several times a day when developing extensions. It always happens when dragging an action in the extension editor. After the crash, I can perform the exact same drag and but it doesn't trigger reliably.

4ian commented 3 years ago

This is a painful bug :( Maybe it could be reproduced more quickly by dragging an action a lot. I'll give it a few tries.

PascalLadalle commented 3 years ago

For the first time, this freeze happened to me in the main sheet editor (the extension editor was opened, though). Maybe worth noting also that it happened on a second instance of GDevelop (where preferences aren't loaded), and a hint was being shown, and I was trying to duplicate the event, so Ctrl key was pressed.

tristanbob commented 3 years ago

Here is a screenshot of when this happened this morning. No new entries show up in the console when Gdevelop freezes.

My CPU fan kicks on because the process seems to be in a loop.

I am not certain, but I think it only happens when a preview is open (I'll update this if I find out otherwise).

Screenshot 2021-01-31 132837

4ian commented 3 years ago

Alright, next time it happens, do open the console like you did, then go to the "Sources" tab on top and click the first pause button:

image

Send then a screenshot of the whole app, in particular the Call Stack panel: image

(do multiple screenshots if you need to scroll down)

Hopefully this will help to find a reason why that an infinite loop would trigger - because it looks like the app is stuck in an infinite loop which might be because of some memory corruption, notoriously hard to debug.

PascalLadalle commented 3 years ago

It just happened to me, but ctrl-shift-i was not responding, unfortunately. It was in the normal events sheet, dragging an action with ctrl key to duplicate it.

stale[bot] commented 2 years ago

This issue seems to be stale: it needs additional information but it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.