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

Crash when "Choose UWP app..." button is clicked #11

Closed
JediRhymeTrix opened this issue Mar 13, 2021 · 15 comments
Closed

Crash when "Choose UWP app..." button is clicked #11

JediRhymeTrix opened this issue Mar 13, 2021 · 15 comments

Comments

@JediRhymeTrix
Copy link

App version: 1.5.9

Trace:

Application: HDRProfile.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderAppxManifest.Read14_Package()

Exception Info: System.InvalidOperationException
   at HDRProfile.UWP.UWPApp.ReadAppxManifest()
   at HDRProfile.UWP.UWPAppsManager.GetUWPApps()
   at HDRProfile.UWP.UWPApplicationDialog..ctor()
   at HDRProfile.ApplicationAdder.GetUWPAplication()
   at CodectoryCore.UI.Wpf.RelayCommand+<>c__DisplayClass3_0.<.ctor>b__0(System.Object)
   at CodectoryCore.UI.Wpf.RelayCommand.Execute(System.Object)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Window.ShowHelper(System.Object)
   at System.Windows.Window.Show()
   at System.Windows.Window.ShowDialog()
   at CodectoryCore.UI.Wpf.DialogService.ShowDialogModal(CodectoryCore.UI.Wpf.DialogViewModelBase)
   at HDRProfile.HDRProfileHandler.AddAplication()
   at CodectoryCore.UI.Wpf.RelayCommand+<>c__DisplayClass3_0.<.ctor>b__0(System.Object)
   at CodectoryCore.UI.Wpf.RelayCommand.Execute(System.Object)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at HDRProfile.App.Main()
@Codectory
Copy link
Owner

Please try it again with 1.5.10 and post send me the logs.

@JediRhymeTrix
Copy link
Author

Do you need the application logs or the event viewer logs?

@JediRhymeTrix
Copy link
Author

There weren't any logs in event viewer since the application didn't throw an exception and worked as expected, so here's the application log file:

HDRProfile.log

@JediRhymeTrix
Copy link
Author

JediRhymeTrix commented Mar 13, 2021

Also, it's crashing when any added UWP application is launched. I've tried running as admin.

VEGAS	HDRPProfile 1.5.10.0

#######################
13-03-2021 09:50:30 PM:Initializing...
13-03-2021 09:50:30 PM:Loading settings...
13-03-2021 09:50:30 PM:Settings loaded
13-03-2021 09:50:30 PM:Checking for new version...
13-03-2021 09:50:30 PM:Saving settings..
13-03-2021 09:50:30 PM:Settings saved
13-03-2021 09:50:30 PM:Connecting to GitHub...
13-03-2021 09:50:30 PM:Requesting releases...
13-03-2021 09:50:30 PM:Initialized
13-03-2021 09:50:30 PM:Starting HDR Monitoring...
13-03-2021 09:50:30 PM:HDR Monitoring started
13-03-2021 09:50:30 PM:Deactivating HDR...
13-03-2021 09:50:31 PM:Updating application states...
13-03-2021 09:50:31 PM:HDR is active
13-03-2021 09:50:31 PM:Starting process watcher...
13-03-2021 09:50:31 PM:Process watcher started
13-03-2021 09:50:31 PM:Releases found: 21 Latest version: 1.5.10
13-03-2021 09:50:31 PM:Building changelog...
13-03-2021 09:50:31 PM:Creating GitHubData...
13-03-2021 09:50:31 PM:Local version is up to date.
13-03-2021 09:50:43 PM:Start application FlightSimulator
### Exception
13-03-2021 09:50:48 PM
	Access is denied

   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at HDRProfile.HDRProfileHandler.StartApplication(ApplicationItem application)
### 

Another thing I've noticed is that it tries to restart the game even if compatibility mode is unchecked. This only happens if it was initially checked and then unchecked later.

Edit: My bad, I think it actually tries to restart the game regardless. Even when compatibility mode was never enabled and even if the game isn't actually launched from HDRProfile, the log still shows "Starting application XYZ", so I guess it's closing the original process and trying to start it again, which is when the above exception is encountered.

@Codectory
Copy link
Owner

Codectory commented Mar 13, 2021 via email

@JediRhymeTrix
Copy link
Author

Maybe I was not clear earlier. Sorry. I have tried it both ways.

Noticed another evidence of this. Some steam games don't work right when launched directly via the exe instead of through steam. This has been happening for me with Sea of Thieves, where the game crashes when run from the exe directly and the same thing is happening if I launch it through steam, while it is added in HDRProfile. HDRProfile is grabbing the process, killing it and then restarting it via the exe even though Compatibility Mode is turned off.

@Codectory
Copy link
Owner

Codectory commented Mar 13, 2021 via email

@JediRhymeTrix
Copy link
Author

Sure thing. Do let me know if you need anything.

@Codectory
Copy link
Owner

OK, what was some cleanup bug. Every app have been restarted. The compatible mode setting has been ingored. Just don't have enough time these days for testing ^^ It looks like UWP apps are a bit more tricky. I have to figure out how to handle them. Some apps are just hosted web apps, so they don't have executables and it looks like I cannot restart them without administrative rights.

@JediRhymeTrix
Copy link
Author

Hey, testing is what the community is here for. So don't worry about that.

BTW, GloSC can launch UWP games. Maybe you can check out their implementation when you get time and it could help? Sorry, I'm a web dev and really clueless about native windows stuff.

@rb2k5
Copy link

rb2k5 commented Mar 14, 2021

Just as wee addition. I use Playnite to launch games.
https://github.com/JosefNemec/Playnite
It added support for launching UWP apps recently. No idea what method they use , though.
Playnite and HDR profile together are a dream team.
UWP is a pain, though, eh?

@Codectory
Copy link
Owner

Codectory commented Mar 26, 2021

Fixed in 1.6.1

@Codectory
Copy link
Owner

Does this work for you now?

@rb2k5
Copy link

rb2k5 commented Mar 27, 2021

Yes. Working perfectly now.
Thanks.

@Codectory
Copy link
Owner

Alright, then I will close this one.

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

3 participants