.NET application is crashing on some machines and giving "uxtheme.dll" & "NInput.dll" Application error and .NET runtime error

0

My C# application is crashing when I am clicking on the Open dialog button and giving "uxtheme.dll" & "NInput.dll" Application error and .NET runtime error.

I have made changes in registry to increase window handle at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows for “GDIProcessHandleQuota” and “USERProcessHandleQuota” to 30000.

After these changes I am able to select file from using Open File Dialog once. But second time when I do the same activity my application crashes giving below error.

Event 1000, Application error:

  • Faulting module name: uxtheme.dll, version: 10.0.17763.1075, time stamp: 0xf4ffc6f9
  • Exception code: 0xc0000005
  • Fault offset: 0x00029e80
  • Faulting process ID: 0x2eec
  • Faulting module path: C:\Windows\system32\uxtheme.dll
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 71B09E80
Stack:
   at System.Windows.Forms.FileDialogNative+IFileDialog.Show(IntPtr)
   at System.Windows.Forms.FileDialog.RunDialogVista(IntPtr)
   at System.Windows.Forms.FileDialog.RunDialog(IntPtr)
   at System.Windows.Forms.CommonDialog.ShowDialog(System.Windows.Forms.IWin32Window)
   at System.Windows.Forms.CommonDialog.ShowDialog()
   at GBSmartMeters.Forms.AddMeterForm.btnSelectVarFile_Click(System.Object, System.EventArgs)
   at System.Windows.Forms.Control.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnClick(System.EventArgs)
   at System.Windows.Forms.Button.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ButtonBase.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Button.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form)
   at System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)
   at System.Windows.Forms.Form.ShowDialog()
   at GBSmartMeters.MainFrame.addMeter_Click(System.Object, System.EventArgs)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(System.Object, System.EventArgs)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(System.EventArgs)
   at System.Windows.Forms.ToolStripItem.HandleClick(System.EventArgs)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
   at System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs, System.Windows.Forms.ToolStripItemEventType)
   at System.Windows.Forms.ToolStrip.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ToolStrip.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.ToolStripDropDown.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
   at CeweMC.BaseForm.Main(System.String[])

Event 1000, Application error:

  • Faulting module name: NInput.dll, version: 10.0.17763.1075, time stamp: 0x3ae411a4
  • Exception code: 0xc0000005
  • Fault offset: 0x0000a05d
  • Faulting process ID: 0x2eec
  • Faulting module path: C:\Windows\SYSTEM32\NInput.dll
c#
.net
windows
uxtheme
asked on Stack Overflow Apr 5, 2021 by mehta ankit

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0