Delubear / GlucoseTray

Tray Icon for displaying current BG information in taskbar.
MIT License
35 stars 21 forks source link

GlucoseTray v. 14.0.2 app crash #65

Closed RobXL closed 1 year ago

RobXL commented 1 year ago

Describe the bug Unable to change settings, because of app crash.

To Reproduce Steps to reproduce the behavior:

  1. Run the app.
  2. Right click on glucosetray app in tray icon and select "change settings"

Expected behavior Window with settings does not open.

Desktop (please complete the following information):

GlucoseTray version 13.4.0 is OK, only 14.0.2 has this issue.

Delubear commented 1 year ago

Confirmed.

Application: GlucoseTray.exe CoreCLR Version: 7.0.222.60605 .NET Version: 7.0.2 Description: The process was terminated due to an unhandled exception. Exception Info: System.NotSupportedException: Serialization and deserialization of 'System.Reflection.MethodBase' instances are not supported. Path: $.Exception.TargetSite. ---> System.NotSupportedException: Serialization and deserialization of 'System.Reflection.MethodBase' instances are not supported. at System.Text.Json.Serialization.Converters.UnsupportedTypeConverter1.Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.JsonConverter1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.Serialization.JsonConverter1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ThrowNotSupportedException(WriteStack& state, NotSupportedException ex) at System.Text.Json.Serialization.JsonConverter1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state) at System.Text.Json.JsonSerializer.WriteCore[TValue](Utf8JsonWriter writer, TValue& value, JsonTypeInfo1 jsonTypeInfo) at System.Text.Json.JsonSerializer.WriteString[TValue](TValue& value, JsonTypeInfo1 jsonTypeInfo) at GlucoseTray.Program.ApplicationThreadException(Object sender, ThreadExceptionEventArgs e) at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) at Interop.User32.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.Interop.Mso.IMsoComponentManager.FPushMessageLoop(UIntPtr dwComponentID, msoloop uReason, Void* pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(msoloop reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(msoloop reason, ApplicationContext context) at GlucoseTray.Program.Main(String[] args)

Delubear commented 1 year ago

Issue appears to be related to font initialization and has an open bug here: https://github.com/dotnet/wpf/issues/7282

Will need to remove the ReadyToRun flag for the time being to resolve.

Delubear commented 1 year ago

Fixed in 14.0.3.

https://github.com/Delubear/GlucoseTray/releases/tag/14.0.3