diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 06b71f05c00..be3ce4f44be 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1757,7 +1757,9 @@ _Mutex::~_Mutex(){ void _Thread::_start_func(void *ud) { - _Thread *t=(_Thread*)ud; + Ref<_Thread>* tud=(Ref<_Thread>*)ud; + Ref<_Thread> t=*tud; + memdelete(tud); Variant::CallError ce; const Variant* arg[1]={&t->userdata}; t->ret=t->target_instance->call(t->target_method,arg,1,ce); @@ -1804,9 +1806,11 @@ Error _Thread::start(Object *p_instance,const StringName& p_method,const Variant userdata=p_userdata; active=true; + Ref<_Thread> *ud = memnew( Ref<_Thread>(this) ); + Thread::Settings s; s.priority=(Thread::Priority)p_priority; - thread = Thread::create(_start_func,this,s); + thread = Thread::create(_start_func,ud,s); if (!thread) { active=false; target_method=StringName(); @@ -1867,5 +1871,8 @@ _Thread::_Thread() { _Thread::~_Thread() { + if (active) { + ERR_EXPLAIN("Reference to a Thread object object was lost while the thread is still running..") + } ERR_FAIL_COND(active==true); } diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp index 6ce62bfae28..31582547811 100644 --- a/platform/android/java_glue.cpp +++ b/platform/android/java_glue.cpp @@ -437,6 +437,7 @@ public: } + int ac = E->get().argtypes.size(); if (acget_type(),E->get().argtypes[i])) { @@ -476,6 +476,10 @@ public: JNIEnv *env = ThreadAndroid::get_env(); + int res = env->PushLocalFrame(16); + + ERR_FAIL_COND_V(res!=0,Variant()); + //print_line("argcount "+String::num(p_argcount)); List to_erase; for(int i=0;iPopLocalFrame(NULL); ERR_FAIL_V(Variant()); } break; } @@ -576,6 +581,8 @@ public: env->DeleteLocalRef(to_erase.front()->get()); to_erase.pop_front(); } + + env->PopLocalFrame(NULL); //print_line("success"); return ret; @@ -1613,11 +1620,15 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_method(JNIEnv * env, jobj JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_callobject(JNIEnv * env, jobject p_obj, jint ID, jstring method, jobjectArray params) { - String str_method = env->GetStringUTFChars( method, NULL ); - Object* obj = ObjectDB::get_instance(ID); ERR_FAIL_COND(!obj); + int res = env->PushLocalFrame(16); + ERR_FAIL_COND(res!=0); + + String str_method = env->GetStringUTFChars( method, NULL ); + + int count = env->GetArrayLength(params); Variant* vlist = (Variant*)alloca(sizeof(Variant) * count); Variant** vptr = (Variant**)alloca(sizeof(Variant*) * count); @@ -1637,15 +1648,22 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_callobject(JNIEnv * env, Variant::CallError err; obj->call(str_method, (const Variant**)vptr, count, err); // something + + env->PopLocalFrame(NULL); + }; JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_calldeferred(JNIEnv * env, jobject p_obj, jint ID, jstring method, jobjectArray params) { - String str_method = env->GetStringUTFChars( method, NULL ); Object* obj = ObjectDB::get_instance(ID); ERR_FAIL_COND(!obj); + int res = env->PushLocalFrame(16); + ERR_FAIL_COND(res!=0); + + String str_method = env->GetStringUTFChars( method, NULL ); + int count = env->GetArrayLength(params); Variant args[VARIANT_ARG_MAX]; @@ -1666,6 +1684,8 @@ JNIEXPORT void JNICALL Java_com_android_godot_GodotLib_calldeferred(JNIEnv * env obj->call_deferred(str_method, args[0],args[1],args[2],args[3],args[4]); // something + env->PopLocalFrame(NULL); + }; //Main::cleanup(); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 6b2e5aea787..987a2ed800c 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1673,6 +1673,8 @@ void RichTextLabel::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_scroll_follow","follow"),&RichTextLabel::set_scroll_follow); ObjectTypeDB::bind_method(_MD("is_scroll_following"),&RichTextLabel::is_scroll_following); + ObjectTypeDB::bind_method(_MD("get_v_scroll"),&RichTextLabel::get_v_scroll); + ObjectTypeDB::bind_method(_MD("set_tab_size","spaces"),&RichTextLabel::set_tab_size); ObjectTypeDB::bind_method(_MD("get_tab_size"),&RichTextLabel::get_tab_size); diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp index 3fb4b06f3c7..2ce5f3a5a76 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp @@ -2638,8 +2638,11 @@ void EditorSceneImportPlugin::_filter_tracks(Node *scene, const String& p_text) for(Set::Element *F=keep_local.front();F;F=F->next()) { keep.insert(F->get()); } - + print_line("FILTERING ANIM: "+String(E->get())); _filter_anim_tracks(anim->get_animation(name),keep); + } else { + print_line("NOT FILTERING ANIM: "+String(E->get())); + } }