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

crash when member variable declared to itself #10972

Closed
Nutriz opened this issue Sep 4, 2017 · 2 comments
Closed

crash when member variable declared to itself #10972

Nutriz opened this issue Sep 4, 2017 · 2 comments

Comments

@Nutriz
Copy link
Contributor

Nutriz commented Sep 4, 2017

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Windows 10 64 bits
Godot 3.0 alpha1

Issue description:
Godot crash when I try to access auto completion on a member variable declared to itself

Steps to reproduce:
In any kind of script attached to a node, create a member variable like this : var test = test
In a function, (_ready for my test), type test. (the dot is important)
After a few second I got a message saying godot must close

@hpvb
Copy link
Member

hpvb commented Sep 4, 2017

Yeah, the editor runs out of stack:

#0  0x00007f1764270ccf in mcount () from /lib64/libc.so.6
#1  0x00000000008eebcc in Vector<wchar_t>::_unref (this=0x7fffff7ff180, p_data=0x0) at core/vector.h:189
#2  0x00000000008f5f72 in Vector<wchar_t>::_copy_from (this=this@entry=0x7fffff7ff180, p_from=...) at core/vector.h:380
#3  0x0000000000b28079 in Vector<wchar_t>::Vector (p_from=..., this=0x7fffff7ff180) at core/vector.h:413
#4  String::String (this=0x7fffff7ff180) at core/ustring.h:62
#5  GDCompletionContext::GDCompletionContext (this=0x7fffff7ff160) at modules/gdscript/gd_editor.cpp:401
#6  _guess_identifier_type (p_for_indexing=false, r_type=..., p_identifier=..., p_line=6, context=...) at modules/gdscript/gd_editor.cpp:1109
#7  _guess_expression_type (context=..., p_node=0x776d470, p_line=p_line@entry=7, r_type=..., p_for_indexing=p_for_indexing@entry=false) at modules/gdscript/gd_editor.cpp:571
#8  0x0000000000b294d1 in _guess_identifier_type (p_for_indexing=false, r_type=..., p_identifier=..., p_line=6, context=...) at modules/gdscript/gd_editor.cpp:1189
#9  _guess_expression_type (context=..., p_node=0x776d470, p_line=p_line@entry=7, r_type=..., p_for_indexing=p_for_indexing@entry=false) at modules/gdscript/gd_editor.cpp:571
#10 0x0000000000b294d1 in _guess_identifier_type (p_for_indexing=false, r_type=..., p_identifier=..., p_line=6, context=...) at modules/gdscript/gd_editor.cpp:1189

until forever

Looks like we need some loop detection here.

@reduz
Copy link
Member

reduz commented Nov 6, 2017

@bojidar-bg or someone else would like to give it a spin?
seems like a simple crash to work around in gd_editor.cpp auto completion code.

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

4 participants