Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The debugger crashes randomly during debugging. #90799

Open
Lingondary opened this issue Apr 17, 2024 · 11 comments
Open

The debugger crashes randomly during debugging. #90799

Lingondary opened this issue Apr 17, 2024 · 11 comments

Comments

@Lingondary
Copy link

Lingondary commented Apr 17, 2024

Tested versions

4.2.1stable.mono - 4.2.2stable.mono

System information

Windows 10, Ryzen5 3500, GTX 1080Ti

Issue description

During debugging, at a random stage of debugging, the game closes without any errors, and the debugging process stops. There are no errors following this. Without debugging, the game runs normally and does not close during operation.
Within the limits of my knowledge and skills, I looked through all the code where the error started to appear and also tried to detect it with the help of logging. But since the error occurs at a random moment of working with the inventory, I could not trace it.
Video: https://www.youtube.com/watch?v=9m1fz-Kz0w4&ab_channel=Lingondary

Steps to reproduce

Run a debug inside Godot with GD Script

Minimal reproduction project (MRP)

Any

@AThousandShips
Copy link
Member

The link to your repo is broken, also this doesn't look like a minimal project just from the title, so it'd be better if you provide a minimal project for testing

@Lingondary
Copy link
Author

The link to your repo is broken, also this doesn't look like a minimal project just from the title, so it'd be better if you provide a minimal project for testing

I apologize, I made the repository public.
Unfortunately, I can't make the minimal reproduction project really minimal, as I don't understand the nature of the error occurrence. 😢

@AThousandShips
Copy link
Member

That means you should get and replicate it and create a minimal project by testing things, if it's hard for you to replicate it like that it'll be harder for everyone else

@Lingondary
Copy link
Author

Lingondary commented Apr 22, 2024

That means you should get and replicate it and create a minimal project by testing things, if it's hard for you to replicate it like that it'll be harder for everyone else

Sorry, I'll leave it for information, the problem is reproduced only on my PC in any project using debug in GDScirpt.
I have checked the work of my project on 2 other PCs with Win 10.

Configurations:
3080 is running on both of them
Processors:
Ryzen 7 7800x3d
Ryzen 7 5800X
No problems on both systems.

On mine, I have a GTX 1080Ti and Ryzen5 3500 installed.
In addition to testing on my working Win 10, I also tried running the project on a clean virtual Win10 and on Ubutnu 22.04, the problem also occurred in both cases.

@LowFire
Copy link

LowFire commented Jul 5, 2024

I have this exact issue on my main game project. Sometimes when I hit a break point or there is an error in the code, the game closes immediately and the debugging process stops. I have no idea why it happens and haven't been able to pinpoint why. Usually when the debugger starts crashing randomly, a computer restart seems to fix it. I don't have this problem on any of my other projects, just the main game project I'm working on, so it might be project specific.

@LowFire
Copy link

LowFire commented Aug 7, 2024

I decided to run my game project in a dev build of the engine and got a crash dump of when the debugger crashes. I have no idea if this is helpful or not, but hopefully it provides some insight? I have no idea what any of it means.

DebuggerCrash

@Calinou
Copy link
Member

Calinou commented Aug 8, 2024

According to the backtrace you posted, the crash occurs somewhere around here:

const Variant &var = gl_array[E.value];
bool freed = false;
const Object *obj = var.get_validated_object_with_check(freed);
if (obj && !freed) {
if (Object::cast_to<GDScriptNativeClass>(obj)) {
continue;
}
}

@LowFire
Copy link

LowFire commented Aug 8, 2024

According to the backtrace you posted, the crash occurs somewhere around here:

const Variant &var = gl_array[E.value];
bool freed = false;
const Object *obj = var.get_validated_object_with_check(freed);
if (obj && !freed) {
if (Object::cast_to<GDScriptNativeClass>(obj)) {
continue;
}
}

Ok interesting. So it's probably related to this issue then #92607 (comment). The OP determined that this exact code is what was causing the debugger to crash.

Does this mean that this bug is already fixed in the upcoming version of godot? The issue had been closed not too long ago.

@akien-mga
Copy link
Member

Does this mean that this bug is already fixed in the upcoming version of godot? The issue had been closed not too long ago.

It might well be fixed already, yes. If you can test the just released 4.3.rc3, you might be able to confirm that: https://godotengine.org/article/release-candidate-godot-4-3-rc-3/

@LowFire
Copy link

LowFire commented Aug 8, 2024

It might well be fixed already, yes. If you can test the just released 4.3.rc3, you might be able to confirm that: https://godotengine.org/article/release-candidate-godot-4-3-rc-3/

Yeah, it seems to have been fixed. The debugger is not crashing when I'm using the release candidate version. Thank goodness.

@Calinou
Copy link
Member

Calinou commented Aug 8, 2024

@Lingondary Can you test 4.3.rc3 on your project (after making a backup) and see if the issue is resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants