/// Resets the handle.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <remark>
+ /// This will be deprecated, please use Dispose() instead.
+ /// </remark>
public void Reset()
{
- Interop.BaseHandle.Reset(swigCPtrCopy);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ this.Dispose();
+ NUILog.Error("[ERROR] This(BaseHandle.Reset) will be deprecated, please use Dispose() instead!");
}
/// <summary>
/// <since_tizen> 3 </since_tizen>
public bool IsEqual(BaseHandle rhs)
{
- if (disposed == true)
+ if (disposed == true || rhs == null || !rhs.HasBody())
{
return false;
}
$"OR the native dali object handle of NUI becomes null! \n" +
$" process:{process} thread:{thread}, isDisposed:{this.disposed}, isDisposeQueued:{this.isDisposeQueued}, me:{me}\n");
+ Tizen.Log.Fatal("NUI", $"[ERROR] back trace!");
+ global::System.Diagnostics.StackTrace st = new global::System.Diagnostics.StackTrace(true);
+ for (int i = 0; i < st.FrameCount; i++)
+ {
+ global::System.Diagnostics.StackFrame sf = st.GetFrame(i);
+ Tizen.Log.Fatal("NUI", " Method " + sf.GetMethod());
+ }
+ Tizen.Log.Fatal("NUI", "Error! just return here with null swigCPtr! this can cause unknown error or crash in next step");
+
//to fix ArtApp black screen issue. this will be enabled after talking with ArtApp team and fixing it.
// throw new ObjectDisposedException(nameof(SwigCPtr), $"Error! NUI's native dali object is already disposed. " +
// $"OR the native dali object handle of NUI becomes null! \n" +
[EditorBrowsable(EditorBrowsableState.Never)]
protected internal bool IsDisposeQueued => isDisposeQueued;
- [Conditional("NUI_DEBUG_ON")]
+ [Conditional("NUI_DISPOSE_DEBUG_ON")]
private void disposeDebuggingCtor()
{
DebugFileLogging.Instance.WriteLog($"type:{GetType()} copyNativeHandle:{swigCPtrCopy.Handle.ToString("X8")}");
}
}
- [Conditional("NUI_DEBUG_ON")]
+ [Conditional("NUI_DISPOSE_DEBUG_ON")]
private void disposeDebuggingDispose(DisposeTypes type)
{
DebugFileLogging.Instance.WriteLog($"swigCMemOwn:{swigCMemOwn} type:{GetType()} copyNativeHandle:{swigCPtrCopy.Handle.ToString("X8")} HasBody:{HasBody()}");