DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
26.94k stars 1.45k forks source link

Application crash after opening Text Base64 with Dark theme #687

Closed kauolz closed 2 years ago

kauolz commented 2 years ago

Description

I'm using desktop application on Windows 10 with Dark theme. I wanted to encode the text, so I opened Text Base64 and application crashed (app window is closed - no alert, modal etc is shown). I checked that when I'm using Light theme this feature works fine.

Steps To Reproduce

  1. Open application
  2. Open Settings page
  3. Set 'App theme' to 'Dark'
  4. Open Encode / Decode and press 'Text Base64'

Expected behavior

Stable work of the application - no crashes

DevToys Version

Wersja 1.0.10.0 | X64 | RELEASE | b949a18 | b949a18

Relevant Assets/Logs

- [10/10/2022 15:56:25]

Feature name: Unhandled problem Custom message: Exception message: Access is denied. (Exception from HRESULT: 0x80070005) Exception stack trace: at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at Interop.ComCallHelpers.Call(ComObject, RuntimeTypeHandle, Int32, Color) + 0xbd at Interop.ForwardComStubs.Stub_66[TThis](ComObject, Color, Int32) + 0x2d at Windows.UI.Text.ITextCharacterFormatImpl.Dispatcher.global::Windows.UI.Text.ITextCharacterFormat.put_BackgroundColor(Color) + 0x1e at DevToys.UI.Controls.CustomTextBox.SetHighlights(IEnumerable1) + 0x473 at DevToys.UI.Controls.CustomTextBox.OnActualThemeChanged(FrameworkElement, Object) + 0xc at Windows.Foundation.TypedEventHandler2.Invoke(TSender, TResult) + 0x2e at Interop.Intrinsics.HasThisCall__33[TArg0](Object, IntPtr, Object, TArg0) + 0x36 at DevToys!+0x12c2c5e

kauolz commented 2 years ago

Duplicated with https://github.com/veler/DevToys/issues/675