AccessViolationException silently crashing on startup

Hey,

This occurred once yesterday on a project we’re working on. When starting the patch, vvvv (7.0-0361) would show the splash screen and at some point silently crash. Starting the project again works. Found the following in Windows’ Event Log:

Error
Application: vvvv.exe
CoreCLR Version: 8.0.1525.16413
.NET Version: 8.0.15
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
   at ImGuiNET.ImGuiNative.igNewFrame()
   at ImGuiNET.ImGuiNative.igNewFrame()
   at ImGuiNET.ImGui.NewFrame()
   at VL.ImGui.Context.NewFrame()
   at VL.ImGui.ToSkiaLayer.Update(VL.ImGui.Widget, Boolean, VL.Lib.Collections.Spread`1<VL.ImGui.FontConfig>, Boolean, VL.ImGui.IStyle)
   at _VL_ImGui_Skia_.Graphics.Skia.Layer.ImGuiCore_P.Update(VL.ImGui.Widget, Boolean, VL.Lib.Collections.Spread`1<VL.ImGui.FontConfig>, Boolean, VL.ImGui.IStyle, VL.Skia.ILayer ByRef)
   at _VL_ImGui_Skia_.Graphics.Skia.Layer.ImGui_P.Update(VL.Core.PublicAPI.ICustomRegion, Boolean, VL.Lib.Collections.Spread`1<VL.ImGui.FontConfig>, Boolean, VL.ImGui.IStyle, Boolean, VL.Skia.ILayer ByRef)
   at _Inspector_HDE_.Inspector.Inspector_P.Update(System.Object, VL.Skia.ILayer ByRef, System.String ByRef, VL.Lib.Collections.Spread`1<System.Object> ByRef, Boolean ByRef, Stride.Core.Mathematics.Color4 ByRef)
   at _Inspector_HDE_.Inspector.InspectorInHDE_P.Update(VL.HDE.SkiaWindow ByRef, VL.Lib.Collections.Spread`1<System.Object> ByRef, Boolean ByRef)
   at _Inspector_HDE_.Inspector.InspectorCommand_C+<>c__DisplayClass3_0.<Update>b__0(System.Object, System.Object ByRef, VL.HDE.IWindow ByRef)
   at VL.HDE.WindowFactory+WindowHandler.Update()
   at VL.HDE.WindowFactory.Update(System.String, VL.HDE.CreateHandler, VL.HDE.UpdateHandler, Int32 ByRef)
   at _Inspector_HDE_.Inspector.InspectorCommand_C.Update()
   at _VL_HDE_.HDE.VL_HDEApplication_P.Update()
   at DynamicClass.InvokeStub_VL_HDEApplication_P.Update(System.Object, System.Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(System.Object, System.Reflection.BindingFlags)
   at System.Reflection.MethodBase.Invoke(System.Object, System.Object[])
   at VL.Lang.Platforms.RuntimeInstance.Step(VL.Lang.Symbols.ITargetCompilation, System.TimeSpan)
   at VL.Lang.Platforms.RuntimeHost.StepInstances(VL.Lang.Symbols.ITargetCompilation, System.TimeSpan, Boolean ByRef)
   at VL.Lang.Platforms.RuntimeHost.SharedStep(System.TimeSpan)
   at VL.Lang.Platforms.RuntimeHost.Step(System.TimeSpan)
   at VL.Lang.Platforms.RuntimeHost.FTimer_Tick(System.Object, System.TimeSpan)
   at VL.UI.Forms.WindowsFormsMainLoopTimer.StepOnMainThread()
   at VL.UI.Forms.WindowsFormsMainLoopTimer.<Start>b__18_0(System.Object, System.EventArgs)
   at System.Windows.Forms.NativeWindow.Callback(Windows.Win32.Foundation.HWND, Windows.Win32.MessageId, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
   at Windows.Win32.PInvoke.DispatchMessage(Windows.Win32.UI.WindowsAndMessaging.MSG*)
   at System.Windows.Forms.Application+ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr, Microsoft.Office.msoloop, Void*)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
   at VL.UI.Forms.SessionManager.Run(System.String[])
   at VL.Applications.Program.Main(System.String[])

Can share the project privately if that helps debugging!

Thanks!

Hey,

Just saw almost the same exception crashing another patch on startup using 7.0-0369.

Error
Application: vvvv.exe
CoreCLR Version: 8.0.1525.16413
.NET Version: 8.0.15
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
   at ImGuiNET.ImGuiNative.igNewFrame()
   at ImGuiNET.ImGuiNative.igNewFrame()
   at ImGuiNET.ImGui.NewFrame()
   at VL.ImGui.Context.NewFrame()
   at VL.ImGui.ToSkiaLayer.Update(VL.ImGui.Widget, Boolean, VL.Lib.Collections.Spread`1<VL.ImGui.FontConfig>, Boolean, VL.ImGui.IStyle)
   at _VL_ImGui_Skia_.Graphics.Skia.Layer.ImGuiCore_P.Update(VL.ImGui.Widget, Boolean, VL.Lib.Collections.Spread`1<VL.ImGui.FontConfig>, Boolean, VL.ImGui.IStyle, VL.Skia.ILayer ByRef)
   at _VL_ImGui_Skia_.Graphics.Skia.Layer.ImGui_P.Update(VL.Core.PublicAPI.ICustomRegion, Boolean, VL.Lib.Collections.Spread`1<VL.ImGui.FontConfig>, Boolean, VL.ImGui.IStyle, Boolean, VL.Skia.ILayer ByRef)
   at _VL_ErrorView_.ErrorView.ErrorView_P+<>c__DisplayClass3_0.<Update>b__2(System.Object, System.Object ByRef, VL.HDE.IWindow ByRef)
   at VL.HDE.WindowFactory+WindowHandler.Update()
   at VL.HDE.WindowFactory.Update(System.String, VL.HDE.CreateHandler, VL.HDE.UpdateHandler, Int32 ByRef)
   at _VL_ErrorView_.ErrorView.ErrorView_P.Update(VL.Lib.Reactive.IChannel`1<System.String>, VL.HDE.WindowFactory ByRef)
   at _VL_ErrorView_.ErrorView.ErrorViewCommand_C.Update()
   at _VL_HDE_.HDE.VL_HDEApplication_P.Update()
   at DynamicClass.InvokeStub_VL_HDEApplication_P.Update(System.Object, System.Object, IntPtr*)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(System.Object, System.Reflection.BindingFlags)
   at System.Reflection.MethodBase.Invoke(System.Object, System.Object[])
   at VL.Lang.Platforms.RuntimeInstance.Step(VL.Lang.Symbols.ITargetCompilation, System.TimeSpan)
   at VL.Lang.Platforms.RuntimeHost.StepInstances(VL.Lang.Symbols.ITargetCompilation, System.TimeSpan, Boolean ByRef)
   at VL.Lang.Platforms.RuntimeHost.SharedStep(System.TimeSpan)
   at VL.Lang.Platforms.RuntimeHost.Step(System.TimeSpan)
   at VL.Lang.Platforms.RuntimeHost.FTimer_Tick(System.Object, System.TimeSpan)
   at VL.UI.Forms.WindowsFormsMainLoopTimer.StepOnMainThread()
   at VL.UI.Forms.WindowsFormsMainLoopTimer.<Start>b__18_0(System.Object, System.EventArgs)
   at System.Windows.Forms.NativeWindow.Callback(Windows.Win32.Foundation.HWND, Windows.Win32.MessageId, Windows.Win32.Foundation.WPARAM, Windows.Win32.Foundation.LPARAM)
   at Windows.Win32.PInvoke.DispatchMessage(Windows.Win32.UI.WindowsAndMessaging.MSG*)
   at System.Windows.Forms.Application+ComponentManager.Microsoft.Office.IMsoComponentManager.FPushMessageLoop(UIntPtr, Microsoft.Office.msoloop, Void*)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Microsoft.Office.msoloop, System.Windows.Forms.ApplicationContext)
   at VL.UI.Forms.SessionManager.Run(System.String[])
   at VL.Applications.Program.Main(System.String[])

Thanks in advance!

seb

Did these crashes happen on the same machine?
Let’s first check if the correct cimgui.dll is loaded. Download and run Process Explorer (procexp64.exe), then start your project. In the process explorer search for cimgui.dll via Find -> Find Handle or DLL. The expected path would be path\to\vvvv\packs\VL.ImGui\runtimes\win-x64\native\cimgui.dll

Yezzir, looks like it’s loaded from where it should :-) (here in procmon)