Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Frequent random crashes #178

Open
nathanpovo opened this issue May 29, 2020 · 4 comments
Open

Frequent random crashes #178

nathanpovo opened this issue May 29, 2020 · 4 comments

Comments

@nathanpovo
Copy link

The UCR application keeps crashing randomly while in use.

From the log file I can see that the crash seems to always occur due to the same error:

2020-05-28 22:33:32.1267 FATAL Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object.
   at DS4Windows.DS4Device.performDs4Input()
   at System.Threading.ThreadHelper.ThreadStart_Context(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 System.Threading.ThreadHelper.ThreadStart()

I've uploaded a log file that includes a few crashes of the application.

I am on Windows 10, using UCR (version 0.9.0) with Interception (version 1.0.1) and ViGEm (version 1.16.116).

@StrawberryCough
Copy link

StrawberryCough commented Jul 3, 2020

Getting the same exception from the downloaded 0.9.0 release EXE binary, as well as any builds I've done locally (both Master & Develop branches).

On a 4k Monitor, I've noticed this happens any time I rapidly scroll (or maximize/expand) a very long list of mappings in the edit profile mappings window. If a long list of mappings is scrolled slowly the app will continue running normally, however if you click the scrollbar far from its current location, or rapidly drag the scrollbar around, the app will crash 100% of the time.

In my noobish dark-mode fork, I've attempted to modify several XAML views to dramatically reduce row heights & font sizes in order to allow far more mappings to be visible without having to scroll. It appears I have it working, but these changes appear to exacerbate the issue, causing the same exception immediately as the window is opened instead of after scrolling. I presume this is because by reducing the mapping card row heights, the list window is asked to instantly display more mapping cards simultaneously, which is effectively similar to scrolling the list up or down rapidly.

FYI I'm just a sim-pit nerd with zero prior app development experience, so please forgive me if I'm going about modifying this app all wrong. Figured I'd at least attempt using my limited front-end & GPC2 scripting experience to fix UCR's absurdly oversized material UI.

On a 4k display I can maybe only fit a handful of mappings at best, which is extremely cumbersome to work with. With 32+ mappings just from a single joystick it really becomes a major headache -- especially when you can't scroll around the list quickly without crashing the app!!!

My specs:
Minutes-old clean Windows 10 install.
Core i7 8700K
Nvidia Geforce GTX1080
32gb DDR4 3200
Nothing else installed apart from Visual Studio & UCR's various build dependencies.

Copy/Paste from the exception:


System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=UCR
  StackTrace:
   at HidWizards.UCR.Views.Controls.DeviceBindingControl.GetSelectedDeviceConfiguration() in C:\Users\admir\Source\Repos\UCR-DARK\UCR\Views\Controls\DeviceBindingControl.xaml.cs:line 127
   at HidWizards.UCR.Views.Controls.DeviceBindingControl.GetSelectedDeviceConfiguration() in C:\Users\admir\Source\Repos\UCR\UCR\Views\Controls\DeviceBindingControl.xaml.cs:line 127
   at HidWizards.UCR.Views.Controls.DeviceBindingControl.BuildContextMenu() in C:\Users\admir\Source\Repos\UCR\UCR\Views\Controls\DeviceBindingControl.xaml.cs:line 58
   at HidWizards.UCR.Views.Controls.DeviceBindingControl.LoadContextMenu() in C:\Users\admir\Source\Repos\UCR\UCR\Views\Controls\DeviceBindingControl.xaml.cs:line 51
   at HidWizards.UCR.Views.Controls.DeviceBindingControl.ReloadGui() in C:\Users\admir\Source\Repos\UCR\UCR\Views\Controls\DeviceBindingControl.xaml.cs:line 45
   at HidWizards.UCR.Views.Controls.DeviceBindingControl.UserControl_Loaded(Object sender, RoutedEventArgs e) in C:\Users\admir\Source\Repos\UCR\UCR\Views\Controls\DeviceBindingControl.xaml.cs:line 39
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   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 HidWizards.UCR.App.Main()

Any help would be greatly appreciated. I depend on this app and love everything about it apart from that oversized material UI which wastes an insane amount of screen space.

I'd seriously cry tears of joy if I could do 3 simple things with the UI:

  • Dark Theme (My eyes!!!)
  • Hotkeys to globally scale the UI
  • Collapsible Mappings List in Edit Profile

@evilC
Copy link
Collaborator

evilC commented Jul 4, 2020

Unless you specifically need the DS4Windows provider for reading all the buttons on a DS4 controller, then you can just delete the DS4Windows folder in the Providers folder
It has previously been established that even if it is not in use, it can cause crashes

@Kuiriel
Copy link

Kuiriel commented Aug 4, 2022

I'm having a crashing issue as well it seems. UCR is randomly closing itself in the background while playing No Man's Sky. It works great until it vanishes entirely. It looks like it crashes each time I unplug the separate PS4 controller (which is seen as xbox controller on Steam).

@FireCulex
Copy link

This is my problem exactly, especially when scrolling.

PS C:\Users\firec> taskkill /im ucr.exe /f
ERROR: The process "UCR.exe" with PID 8448 could not be terminated.
Reason: Access is denied.
PS C:\Users\firec>
PS C:\Users\firec> WMIC
wmic:root\cli>process where name="ucr.exe" delete
Delete '\\CULEXLAPTOP\ROOT\CIMV2:Win32_Process.Handle="8448"' (Y/N/?)? y
Deleting instance \\CULEXLAPTOP\ROOT\CIMV2:Win32_Process.Handle="8448"
ERROR:
Description = Access denied

When UCR.exe crashes it creates a 2nd PID using 20k memory, this is the process that's stuck.
I have no choice but to reboot, logging out doesn't work.

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

No branches or pull requests

5 participants