tinyBrightness icon indicating copy to clipboard operation
tinyBrightness copied to clipboard

App crashing at launch

Open molotovah opened this issue 5 years ago • 8 comments

Describe the bug App crashing at launch. After relaunching a few times, I managed to set screen brightness. I need to press "Update Monitors" everytime if I want to be able to set brightness. Otherwise slider is set at 0% and greyed out.

To Reproduce Launching app

Expected behavior The app crashes instantly after launching it

Error Log (autofilled)

Open stack trace
   à tinyBrightness.DisplayConfiguration.GetMonitorExtremums(PHYSICAL_MONITOR physicalMonitor)
   à tinyBrightness.MainWindow.Window_Loaded(Object sender, RoutedEventArgs e)
   à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   à System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   à System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   à System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   à MS.Internal.LoadedOrUnloadedOperation.DoWork()
   à System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   à System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   à System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   à System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   à System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
   à System.Windows.Interop.HwndTarget.OnResize()
   à System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   à System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Software info

  • Windows 10 Version 2004 (19041.329)
  • PC
  • Monitor MSI OPTIX G27C2
  • Windows scaling [100 %]
  • Version [1.131.7465.32727]

molotovah avatar Jun 13 '20 00:06 molotovah

Please try this version and check if the hotkeys change brightness. tinyBrightness.zip

nik9play avatar Jun 13 '20 10:06 nik9play

I tried the version you've linked but everytime I click on the icon, the brightness is set to 0% and I can't use slider anymore.

Hotkeys are working on both versions.

My computer has a Windows fresh install. I was running Windows 10 1909 before and the problem was the same.

ClickMonitorDDC 7.0 is working fine with the monitor.

molotovah avatar Jun 13 '20 20:06 molotovah

Please also try this version https://github.com/nik9play/tinyBrightness/releases/tag/1.120

nik9play avatar Jun 13 '20 20:06 nik9play

Hotkeys working on this version but slider is still messy

molotovah avatar Jun 13 '20 23:06 molotovah

Do you use DisplayPort, HDMI or DVI?

nik9play avatar Jun 14 '20 11:06 nik9play

I'm using Display Port. I've also checked with another cable

molotovah avatar Jun 14 '20 12:06 molotovah

It's really strange. tinyBrightness uses SetMonitorBrightness and GetMonitorBrightness functions from Winapi. So I wrote a small app to test it: ddcTest.zip. Please download it and send the results here. I'm sorry for taking up your time but I don't have many monitors for testing.

nik9play avatar Jun 14 '20 12:06 nik9play

Hello, this is not a big deal and I'm glad if I can help I tried this on both monitors :

MSI Optix G27C2 (DP to DP) --> Works randomly image

Samsung SyncMaster (DVI to HDMI) --> Works everytime image

Also tried to launch with a verbose flag but there is no output

molotovah avatar Jun 16 '20 10:06 molotovah