From fab66af7e99eb71ea6a2df30bea46835f749896a Mon Sep 17 00:00:00 2001 From: Geequlim Date: Thu, 16 Nov 2017 17:18:36 +0800 Subject: Move the remote scene tree to the scene tree dock. Ignore all script constants in the global section of the breakpoint stack. Check property size before send to avoid too large of data be sent. Fix crash while clear the remote objects from the debugger. --- core/script_debugger_remote.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'core/script_debugger_remote.cpp') diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index 14f0cddb9..56056268f 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -609,13 +609,24 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) { Array prop; prop.push_back(pi.name); prop.push_back(pi.type); - prop.push_back(pi.hint); - if (res.is_null()) - prop.push_back(pi.hint_string); - else - prop.push_back(String("RES:") + res->get_path()); - prop.push_back(pi.usage); - prop.push_back(var); + + //only send information that can be sent.. + int len = 0; //test how big is this to encode + encode_variant(var, NULL, len); + if (len > packet_peer_stream->get_output_buffer_max_size()) { //limit to max size + prop.push_back(PROPERTY_HINT_OBJECT_TOO_BIG); + prop.push_back(""); + prop.push_back(pi.usage); + prop.push_back(Variant()); + } else { + prop.push_back(pi.hint); + if (res.is_null()) + prop.push_back(pi.hint_string); + else + prop.push_back(String("RES:") + res->get_path()); + prop.push_back(pi.usage); + prop.push_back(var); + } send_props.push_back(prop); } -- cgit v1.2.3-70-g09d2