Closed stubbsy345 closed 5 years ago
Just as a note this happens both in the export and from the editor (at random, never always the same interaction or the same time). It seems to happen when I press SPACE BAR and after a little time of playing the game. When player is in an area 2d pressing SPACE, which is linked to the action "ui_interact", will open some screen. This screen is added to a GUI node in the main scene which is of the canvas layer class. I have a print("interact") statement under is_action_pressed("ui_interact")
and when this crash occurs this does not print out so it doesn't appear to be a crash in my code as I imagine this would be printed and would then highlight the area of code in which this occured?
Seems to only occur after I have interacted with a node that calls to my HTTP Client script which is an autoloaded script. I can play the game with no error otherwise. But after I have sent a POST request to the server. At some point the game crashes when I try to interact with something else. I don't understand how this would impact this but for some reason it is interfering.
hmm, I seem to recall some http request issue, you might want to search issues for it. Are you doing it in a thread?
I took it out of using a thread and this didn't seem to help I still get the same peculiar crash after I use HTTP Client, or though strangely, not immediately. Only when I interact with something else. I wonder if changing to use the HTTP request node might yield an improvement.
can you guys make an example project of what crashes? i cant seem to crash it on OSX
Many crashes have been fixed on all platforms since November, so assuming this was fixed. If you can still reproduce the exact same issue, please comment and provide an example project and steps to reproduce.
I am getting this crash. same exact issue but I am using an HTTPRequest node Godot version 3.0.2
it happened w/ my ludum dare 41 submission. but my game uses the twitter API (so posting the project code would expose my api key). Ill try to create an example project with as little moving parts as possible
Ok so I think it boils down to this:
A LineEdit Node is connected to a parent Node which has been deallocated already. When we enter a new scene, and LineEdit Node's partent node was deallocated, but inputting via keyboard causes the node to try and send a signal to the deallocated Node.
I can't confirm that having the LineEdit node be hidden after switching scenes will make it happen. and I can't confirm that HTTP even has anything to do with it.
Something I found interesting was if I add disconnect
to the _exit_tree()
method of the LineEdit node, the issue disappears.
set_visible(false)
)based on the logs it looks like the LineEdit object hasn't been deallocated yet, but the scene which it's connected to has been deallocated. IMO this explains why it is so inconsistent, because it's a race condition basically, and I would assume if you had a higher intensive program, the issue would appear more often.
Current path: /Users/ehernandez/Documents/Code/Godot/godot_issue_12664_example
Remote Debugger: Connection failed with status: '2', retrying in 1 msec.
OpenGL ES 3.0 Renderer: Intel HD Graphics 4000 OpenGL Engine
http request completed
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] 1 libsystem_platform.dylib 0x00007fffc9212b3a _sigtramp + 26
[2] 2 ??? 0x0000000000000000 0x0 + 0
[3] Vector<wchar_t>::_copy_from(Vector<wchar_t> const&) (in godot.osx.tools.64) (vector.h:382)
[4] Vector<wchar_t>::operator=(Vector<wchar_t> const&) (in godot.osx.tools.64) (vector.h:396)
[5] String::operator=(String const&) (in godot.osx.tools.64) (ustring.h:63)
[6] LineEdit::_ime_text_callback(void*, String, Vector2) (in godot.osx.tools.64) (line_edit.cpp:1352)
[7] -[GodotContentView unmarkText] (in godot.osx.tools.64) (os_osx.mm:427)
[8] -[GodotContentView cancelComposition] (in godot.osx.tools.64) (os_osx.mm:453)
[9] -[GodotContentView insertText:replacementRange:] (in godot.osx.tools.64) (os_osx.mm:498)
[10] 10 AppKit 0x00007fffb10c2c0b -[NSTextInputContext(NSInputContext_WithCompletion) insertText:replacementRange:completionHandler:] + 79
[11] 11 AppKit 0x00007fffb18fbdf3 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2.379 + 108
[12] 12 AppKit 0x00007fffb10c2bb4 -[NSTextInputContext do_HandleTSMEvent_insertFixLenTextLoop:whileCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 111
[13] 13 AppKit 0x00007fffb18f9c98 -[NSTextInputContext tryHandleTSMEvent_insertFixLenText_withContext:dispatchCondition:setupForDispatch:nestedWorkaroundCondition:nestedWorkaroundDispatchWork:loopCondition:dispatchWorkEach:afterEachInsertText:continuation:] + 387
[14] 14 AppKit 0x00007fffb18fb9c7 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke.314 + 4105
[15] 15 AppKit 0x00007fffb10c2835 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2 + 80
[16] 16 AppKit 0x00007fffb10c27b4 -[NSTextInputContext tryHandleTSMEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] + 93
[17] 17 AppKit 0x00007fffb10c219f -[NSTextInputContext handleTSMEvent:completionHandler:] + 2221
[18] 18 AppKit 0x00007fffb10c1883 _NSTSMEventHandler + 321
[19] DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)
[20] SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)
[21] 21 HIToolbox 0x00007fffb296be3f SendEventToEventTargetWithOptions + 43
[22] 22 HIToolbox 0x00007fffb29c36d6 SendTSMEvent_WithCompletionHandler + 408
[23] 23 HIToolbox 0x00007fffb29c3bb1 __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke + 400
[24] 24 HIToolbox 0x00007fffb29c3a12 __SendFilterTextEvent_WithCompletionHandler_block_invoke + 215
[25] 25 HIToolbox 0x00007fffb29c3727 SendTSMEvent_WithCompletionHandler + 489
[26] 26 HIToolbox 0x00007fffb29c3511 SendFilterTextEvent_WithCompletionHandler + 236
[27] 27 HIToolbox 0x00007fffb29c31d6 SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler + 284
[28] 28 HIToolbox 0x00007fffb29c2f8c __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2 + 296
[29] 29 HIToolbox 0x00007fffb29c2e32 __utDeliverTSMEvent_WithCompletionHandler_block_invoke + 439
[30] 30 HIToolbox 0x00007fffb29c2bf9 TSMKeyEvent_WithCompletionHandler + 632
[31] 31 HIToolbox 0x00007fffb29c2948 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 + 251
[32] 32 HIToolbox 0x00007fffb29c2775 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 + 281
[33] 33 HIToolbox 0x00007fffb29c248b __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 + 308
[34] 34 HIToolbox 0x00007fffb29c21c2 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke + 300
[35] 35 HIToolbox 0x00007fffb29c173a TSMProcessRawKeyEventWithOptionsAndCompletionHandler + 3604
[36] 36 AppKit 0x00007fffb19023d1 __84-[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:]_block_invoke.1077 + 116
[37] 37 AppKit 0x00007fffb1901689 __204-[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:]_block_invoke.1003 + 121
[38] 38 AppKit 0x00007fffb19014f3 -[NSTextInputContext tryTSMProcessRawKeyEvent_orSubstitution:dispatchCondition:setupForDispatch:furtherCondition:doubleSpaceSubstitutionCondition:doubleSpaceSubstitutionWork:dispatchTSMWork:continuation:] + 285
[39] 39 AppKit 0x00007fffb1901e1b -[NSTextInputContext _handleEvent:options:allowingSyntheticEvent:completionHandler:] + 1515
[40] 40 AppKit 0x00007fffb1901362 -[NSTextInputContext _handleEvent:allowingSyntheticEvent:] + 114
[41] 41 AppKit 0x00007fffb10c028b -[NSView interpretKeyEvents:] + 232
[42] -[GodotContentView keyDown:] (in godot.osx.tools.64) (os_osx.mm:961)
[43] 43 AppKit 0x00007fffb18222cc -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 4086
[44] 44 AppKit 0x00007fffb1820f0a -[NSWindow(NSEventRouting) sendEvent:] + 541
[45] 45 AppKit 0x00007fffb16a64a8 -[NSApplication(NSEvent) sendEvent:] + 4768
[46] -[GodotApplication sendEvent:] (in godot.osx.tools.64) (os_osx.mm:148)
[47] OS_OSX::process_events() (in godot.osx.tools.64) (os_osx.mm:2256)
[48] OS_OSX::run() (in godot.osx.tools.64) (os_osx.mm:2345)
[49] main (in godot.osx.tools.64) (godot_main_osx.mm:100)
[50] 50 libdyld.dylib 0x00007fffc9003235 start + 1
[51] 51 ??? 0x0000000000000009 0x0 + 9
-- END OF BACKTRACE --
I've attatched a .zip with a working example. The issue appears in both 3.0.2 stable, and in my build that was made from 6faa96fb89ab33fe3a6b37eecca1c7cf2934ff75 godot_issue_12664_example.zip
void LineEdit::_ime_text_callback(void *p_self, String p_text, Point2 p_selection) {
LineEdit *self = (LineEdit *)p_self;
self->ime_text = p_text;
self->ime_selection = p_selection;
self->update();
}
maybe p_text is null when the crash happens. godot_issue_12664_example.zip
I have tried disconnecting the node in several places the crash still happens on my personal project
Is this still reproducible in the current master branch?
CC @bruvzg, the last comment refers to IME callbacks.
CC @bruvzg, the last comment refers to IME callbacks.
IME callbacks already removed and replaced with NOTIFICATION_OS_IME_UPDATE
notification in #23923.
Assuming fixed then.
Please comment if you can still reproduce this crash.
Operating system or device, Godot version, GPU Model and driver (if graphics related): OSX, Godot 3.0 alpha 2
Issue description: The game will crash sometimes when I free a node or get a node to enter the screen. This didn't appear to happen in earlier versions of godot 3.0. There is nothing present in the debugger to indicate why this is happening but I will include the crash report that I get when this occurs. Perhaps this is an issue with my code but considering this didn't seem to happen in earlier versions I don't believe it is, but I will continue look through it. At the end I have included the report I get when the programme crashes, I don't know if this is any use.
EDIT: Edited above error with error received from terminal on export as it is more readable.