Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

NullReferenceException in HtmlViewControl.Dispose() #69

Closed
o2genum opened this issue Feb 3, 2018 · 8 comments
Closed

NullReferenceException in HtmlViewControl.Dispose() #69

o2genum opened this issue Feb 3, 2018 · 8 comments

Comments

@o2genum
Copy link

o2genum commented Feb 3, 2018

Occurs when closing the window of Example.ChromiumFX.Vue.UI example.

capture

@o2genum
Copy link
Author

o2genum commented Feb 3, 2018

I guess I may just not call HtmlView.Dispose() when the app is closing anyway?

@David-Desmaisons
Copy link
Member

@o2genum This is very linked to the example where changed on VM are happening during binding due high rate of changes.There are couple way to fix it. I will figure out the best one.

@David-Desmaisons
Copy link
Member

@o2genum, if you are experiencing thsi on your application, you can avoid to call dispose on the component when closing the application as a bypass. As I mentioned, this should be linked to some edges cases scenario. I am proving a fix that will be available in next version.

@o2genum
Copy link
Author

o2genum commented Feb 5, 2018

Happens rarely on application exit. I guess it is the same bug. Posting the stacktrace here:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Neutronium.Core.Binding.BidirectionalMapper.OnExit(IJsCsGlue exiting)
   at MoreCollection.Extensions.EnumerableExtensions.ForEach[T](IEnumerable`1 enumerable, Action`1 action)
   at Neutronium.Core.Binding.BidirectionalMapper.UnlistenToCSharpChanges()
   at Neutronium.Core.Binding.BidirectionalMapper.Dispose()
   at Neutronium.Core.HtmlBinding.Dispose()
   at Neutronium.Core.Navigation.DoubleBrowserNavigator.set_Binding(IHtmlBinding value)
   at Neutronium.Core.Navigation.DoubleBrowserNavigator.Reload(Boolean forceClean)
   at Neutronium.Core.Navigation.DoubleBrowserNavigator.Crashed(Object sender, BrowserCrashedArgs e)
   at Neutronium.WebBrowserEngine.ChromiumFx.EngineBinding.ChromiumFxControlWebBrowserWindow.<>c__DisplayClass21_0.<RequestHandler_OnRenderProcessTerminated>b__0()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at Miner.Program.Main()

@David-Desmaisons
Copy link
Member

Thanks, I have already a fix (same stack) I will push it by Today.

@jmecosta
Copy link

jmecosta commented Mar 1, 2018

@David-Desmaisons do we have a release for this?

@David-Desmaisons
Copy link
Member

Noy yet. I am working it, I am working to fix issue #74 and then release a new version.

@David-Desmaisons
Copy link
Member

Corrected in Neutronium.Chromiumfx.Vue version 1.3.1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants