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

Fix a crash when an early dialog tries to appear #10786

Merged
merged 1 commit into from
Aug 30, 2017

Conversation

hpvb
Copy link
Member

@hpvb hpvb commented Aug 30, 2017

This changes the order of creating some of the dialogs that may appear
during project import/startup. It is possible for the 'accept' dialog to
be required before it is initialized.

This moves all of these dialogs to earlier in the constructor so this
can't happen.

Backtrace of the crash:

Thread 1 "godot.x11.tools" received signal SIGSEGV, Segmentation fault.
0x0000000000e9ae6e in AcceptDialog::get_ok (this=0x0)
    at ./scene/gui/dialogs.h:137
137		Button *get_ok() { return ok; }
(gdb) bt
#0  0x0000000000e9ae6e in AcceptDialog::get_ok (this=0x0)
    at ./scene/gui/dialogs.h:137
#1  0x00000000011cc777 in EditorNode::_menu_option_confirm (this=0x4d2b760, 
    p_option=52, p_confirmed=false) at editor/editor_node.cpp:2234
#2  0x00000000011bde6f in EditorNode::_menu_option (this=0x4d2b760, 
    p_option=52) at editor/editor_node.cpp:554
#3  0x00000000011e989e in EditorNode::EditorNode (this=0x4d2b760)
    at editor/editor_node.cpp:5002
#4  0x0000000000d3d3db in Main::start () at main/main.cpp:1249
#5  0x0000000000d138a6 in main (argc=2, argv=0x7fffffffdfd8)
    at platform/x11/godot_x11.cpp:53
(gdb) 

reported on IRC

This changes the order of creating some of the dialogs that may appear
during project import/startup. It is possible for the 'accept' dialog to
be required before it is initialized.

This moves all of these dialogs to earlier in the constructor so this
can't happen.
@akien-mga akien-mga added this to the 3.0 milestone Aug 30, 2017
@akien-mga akien-mga merged commit a469bb0 into godotengine:master Aug 30, 2017
@hpvb hpvb deleted the fix-crash-on-early-dialog branch February 27, 2018 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants