Fixed CustomAlgorithmInterface crash issue in dotnet core
authorxb.teng <xb.teng@samsung.com>
Thu, 30 Mar 2017 06:50:59 +0000 (14:50 +0800)
committerxb.teng <xb.teng@samsung.com>
Thu, 30 Mar 2017 08:53:08 +0000 (16:53 +0800)
Change-Id: Ifcaad4419297fe6b62b790384e4120ec56af9bab
Signed-off-by: xb.teng <xb.teng@samsung.com>
src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs
src/Tizen.NUI/src/internal/ItemFactory.cs
src/Tizen.NUI/src/internal/NDalicPINVOKE.cs
src/Tizen.NUI/src/internal/ViewImpl.cs

index defb96b..fd51ec5 100755 (executable)
@@ -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) {
index eac55d0..dfe6436 100755 (executable)
@@ -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)
index ba9dc18..93df46c 100755 (executable)
@@ -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")]
index 09d13e1..9aebd40 100755 (executable)
@@ -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)