From 7f19406317a043a50920f272aa905d07b842785f Mon Sep 17 00:00:00 2001 From: "xb.teng" Date: Thu, 30 Mar 2017 14:50:59 +0800 Subject: [PATCH] Fixed CustomAlgorithmInterface crash issue in dotnet core Change-Id: Ifcaad4419297fe6b62b790384e4120ec56af9bab Signed-off-by: xb.teng --- .../src/internal/CustomAlgorithmInterface.cs | 4 ++-- src/Tizen.NUI/src/internal/ItemFactory.cs | 4 ++-- src/Tizen.NUI/src/internal/NDalicPINVOKE.cs | 22 +++++++++++----------- src/Tizen.NUI/src/internal/ViewImpl.cs | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs index defb96b..fd51ec5 100755 --- a/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs +++ b/src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs @@ -65,8 +65,8 @@ internal class CustomAlgorithmInterface : global::System.IDisposable { #if (DOT_NET_CORE) private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes); - bool hasDerivedMethod = methodInfo.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface)); - return hasDerivedMethod; + bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface)); + return hasDerivedMethod && (methodInfo != null); } #else private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { diff --git a/src/Tizen.NUI/src/internal/ItemFactory.cs b/src/Tizen.NUI/src/internal/ItemFactory.cs index eac55d0..dfe6436 100755 --- a/src/Tizen.NUI/src/internal/ItemFactory.cs +++ b/src/Tizen.NUI/src/internal/ItemFactory.cs @@ -102,9 +102,9 @@ namespace Tizen.NUI private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes); - bool hasDerivedMethod = methodInfo.GetType().GetTypeInfo().IsSubclassOf(typeof(ItemFactory)); + bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(ItemFactory)); Tizen.Log.Debug("NUI-APP", "hasDerivedMethod=" + hasDerivedMethod); - return hasDerivedMethod; + return hasDerivedMethod && (methodInfo != null); } #else private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) diff --git a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs index ba9dc18..93df46c 100755 --- a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -6158,22 +6158,22 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Window_IndicatorVisibilityChangedSignal")] public static extern global::System.IntPtr Window_IndicatorVisibilityChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_FocusChangedSignal")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_FocusChangedSignal")] public static extern global::System.IntPtr FocusChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_SetAcceptFocus")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetAcceptFocus")] public static extern void SetAcceptFocus(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_IsFocusAcceptable")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IsFocusAcceptable")] public static extern bool IsFocusAcceptable(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_Show")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Show")] public static extern void Show(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_Hide")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Hide")] public static extern void Hide(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_IsVisible")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IsVisible")] public static extern bool IsVisible(global::System.Runtime.InteropServices.HandleRef jarg1); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Application_New__SWIG_0")] @@ -10004,19 +10004,19 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_LoadImageSynchronously__SWIG_2")] public static extern global::System.IntPtr LoadImageSynchronously__SWIG_2(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4, bool jarg5); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_delete_CustomAlgorithmInterface")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_CustomAlgorithmInterface")] public static extern void delete_CustomAlgorithmInterface(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_CustomAlgorithmInterface_GetNextFocusableActor")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_CustomAlgorithmInterface_GetNextFocusableActor")] public static extern global::System.IntPtr CustomAlgorithmInterface_GetNextFocusableActor(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_new_CustomAlgorithmInterface")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_CustomAlgorithmInterface")] public static extern global::System.IntPtr new_CustomAlgorithmInterface(); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_CustomAlgorithmInterface_director_connect")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_CustomAlgorithmInterface_director_connect")] public static extern void CustomAlgorithmInterface_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, CustomAlgorithmInterface.SwigDelegateCustomAlgorithmInterface_0 delegate0); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_SetCustomAlgorithm")] + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetCustomAlgorithm")] public static extern void SetCustomAlgorithm(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ItemIdContainer_Clear")] diff --git a/src/Tizen.NUI/src/internal/ViewImpl.cs b/src/Tizen.NUI/src/internal/ViewImpl.cs index 09d13e1..9aebd40 100755 --- a/src/Tizen.NUI/src/internal/ViewImpl.cs +++ b/src/Tizen.NUI/src/internal/ViewImpl.cs @@ -579,10 +579,10 @@ namespace Tizen.NUI private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) { global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes); - bool hasDerivedMethod = methodInfo.GetType().GetTypeInfo().IsSubclassOf(typeof(ViewImpl)); + bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(ViewImpl)); Tizen.Log.Debug("NUI-APP", "hasDerivedMethod=" + hasDerivedMethod); - return hasDerivedMethod; + return hasDerivedMethod && (methodInfo != null); } #else private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) -- 2.7.4