malloc_consolidate(): invalid chunk size / corrupted size vs. prev_size in fastbins

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By aidave

Sometimes, when switching scenes, Godot just quits, with one of these errors:

malloc_consolidate(): invalid chunk size


corrupted size vs. prev_size in fastbins

This didn’t happen with the same project in Godot 3. Weirdest thing is, the scene works, but if it’s the second time the scene appears, that it crashes (sometimes). I’m not sure how to figure this out. Running with --verbose or from debug build doesn’t give any additional info

Are you running the 4.0 release version of Godot (as opposed to some earlier RC or beta version)? I ask as there’s a similar issue on Github that’s reported to have been fixed (maybe you’re already aware). In case not, here are the references:

jgodfrey | 2023-03-07 03:35

Thanks for checking it out and replying! This happens in 4.0-stable as well as daily builds from master. I’ve been keeping tabs on commits and haven’t seen anything that looks like it would solve it.

I’m not sure if I can put together a MRP project or not. I’m wondering if there is a way to pinpoint the issue before having to attempt an MRP

aidave | 2023-03-07 14:06

Also I’ve combed through the .tscn files for issues. There are no TileMaps in the scenes. There are mostly menus, with some shaders, particle effects, and control/sprite menus. It seems like two simple menus are the culprit as when I delete them the crash doesn’t happen. But the menus are simple, so it doesn’t make any sense.

aidave | 2023-03-07 14:10

:bust_in_silhouette: Reply From: aidave

Turns out it was a bug in GLES3 textures.

More info: GLES3 Texture - malloc_consolidate(): invalid chunk size / corrupted size vs. prev_size in fastbins · Issue #74562 · godotengine/godot · GitHub

Oh, nice - another one squashed. Thanks for the updating the post.

jgodfrey | 2023-03-07 20:58