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

Segfault on quit in project manager (memdelete<GDNativeSingletonDiscover>) #10992

Closed
akien-mga opened this issue Sep 5, 2017 · 1 comment · Fixed by #11058
Closed

Segfault on quit in project manager (memdelete<GDNativeSingletonDiscover>) #10992

akien-mga opened this issue Sep 5, 2017 · 1 comment · Fixed by #11058
Assignees
Milestone

Comments

@akien-mga
Copy link
Member

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Mageia 6 x86_64, Godot master 9b9344c

Issue description:
When closing the project manager, Godot segfaults:

Thread 1 "godot-git" received signal SIGSEGV, Segmentation fault.
0x00000000021f982a in Object::_predelete (this=0x0) at core/object.cpp:384
384             _predelete_ok = 1;

(gdb) bt
#0  0x00000000021f982a in Object::_predelete (this=0x0) at core/object.cpp:384
#1  0x0000000002204048 in predelete_handler (p_object=0x0) at core/object.cpp:1774
#2  0x0000000000d935b8 in memdelete<GDNativeSingletonDiscover> (p_class=0x0) at core/os/memory.h:107
#3  0x0000000000d922b9 in unregister_gdnative_types () at modules/gdnative/register_types.cpp:252
#4  0x0000000000d839a2 in unregister_module_types () at modules/register_module_types.gen.cpp:129
#5  0x0000000000d46193 in Main::cleanup () at main/main.cpp:1714
#6  0x0000000000d1a5f0 in main (argc=1, argv=0x7fffffffda88) at platform/x11/godot_x11.cpp:55

Seems related to GDNative, cc @karroffel.

Steps to reproduce:

  • Start Godot
  • Close it
@akien-mga akien-mga added this to the 3.0 milestone Sep 5, 2017
@karroffel
Copy link
Contributor

Will take a look

@karroffel karroffel self-assigned this Sep 5, 2017
hpvb added a commit to hpvb/godot that referenced this issue Sep 10, 2017
Due to this setting several callbacks get initialized but never used.
For instance void discoverer_callback(). This callback only initializes
the GDNativeSingletonDiscover *discoverer when called. This doesn't
happen in project manager and this in turn causes a call to
memdelete(NULL) which is invalid. This also seems to speed up startup a
little.

This fixes godotengine#11043 and fixes godotengine#10992
jamesmintram added a commit to jamesmintram/godot that referenced this issue Jan 22, 2025
jamesmintram added a commit to jamesmintram/godot that referenced this issue Jan 23, 2025
jamesmintram added a commit to jamesmintram/godot that referenced this issue Jan 23, 2025
jamesmintram added a commit to jamesmintram/godot that referenced this issue Jan 23, 2025
jamesmintram added a commit to jamesmintram/godot that referenced this issue Jan 23, 2025
jamesmintram added a commit to jamesmintram/godot that referenced this issue Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants