Skip to content

Commit eee81b2

Browse files
committed
fix(Core): aptabase event serialization error on startup
Previously, it failed silently when attempting to send the `app_started` event due to unsupported object types in the payload (e.g. enums or complex types).
1 parent dacce3f commit eee81b2

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

SnapX.Core/SnapX.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,14 @@ private static void Run()
429429
{
430430
{ "CPU", SnapXResources.CPU },
431431
{ "CPUCount", SnapXResources.CPUCount},
432-
{ "Build", nameof(Build) },
433-
{ "graphicsInfo", SnapXResources.graphicsInfo },
432+
{ "Build", $"{Build}" },
433+
{
434+
"GPUS",
435+
SnapXResources.graphicsInfo.Gpus is { Count: > 0 } gpus
436+
? string.Join(", ", gpus.Select(gpu => $"{gpu.Description} ({gpu.DriverVersion})"))
437+
: string.Empty
438+
},
439+
{ "Monitors", string.Join(", ", SnapXResources.graphicsInfo?.Monitors ?? []) },
434440
{ "totalMemory", totalMemory },
435441
{ "usedMemory", usedMemory },
436442
{ "Dotnet", SnapXResources.Dotnet },
@@ -708,7 +714,6 @@ private static void HandleExceptions()
708714
}
709715
#endif
710716

711-
// Add the event handler for handling non-UI thread exceptions to the event
712717
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
713718
AppDomain.CurrentDomain.ProcessExit += ((_, _) => CloseSequence());
714719
}

0 commit comments

Comments
 (0)