Commit Graph
11 Commits
Author SHA1 Message Date
Magne Sjaastad 068d2b98bc #14414 Block gRPC idle processing while crash handling is in progress 2026-07-30 14:39:57 +02:00
Kristian Bendiksen 42d8a4b14a #14270 Capture uncaught exception throw site in crash reports
Add a std::set_terminate handler (manageTerminate) that runs before the
stack unwinds when a C++ exception escapes the Qt event loop, so the
captured stack trace points at the original throw site instead of the
crash-logging plumbing reached via the SIGABRT signal handler. The
handler also recovers the exception type and message via
std::current_exception and reports them as crash attributes.

Remove the catch-and-rethrow around the event loop in RiaMain: that
handler unwound the stack to main before anything captured it, which
defeated the new terminate handler. The SIGABRT signal handler remains
as a fallback for direct abort()/assert() failures that do not go
through std::terminate.
2026-06-22 14:18:05 +02:00
Magne Sjaastad 022d77bef8 macOS: Initial Apple Silicon and x86_64 build support
* Refactor: add MACOSX_BUNDLE option to qt_add_executable in multiple CMakeLists.txt files
* #14045 macOS: Guard std::stacktrace usage and skip ucontext on Apple platforms
* #14045 macOS: Guard std::ispanstream with std::istringstream fallback
* #14045 macOS: Add vcpkg overlay triplets for osx and exclude grpc on osx
* #14045 macOS: CMake macOS build support and openzgy OpenMP-disable patch
* #14045 CI: Add macOS build workflow
* #14045 macOS: Use feature-test macros to detect <stacktrace> and <spanstream>
* #14045 macOS: Make MAX_STIMPLAN_LAYERS constexpr to fix arm64 link error
* #14045 CI: Ship README-macOS.txt with artifact to document Gatekeeper workaround
* #14045 CI: Pin macOS runner to macos-14 and set deployment target to 14.0
* #14045 CI: Move macOS runner to macos-15 and fix README step on configure failure
2026-06-01 12:38:55 +02:00
Magne Sjaastad 8df24c5bd3 Crash: use SA_SIGINFO on Linux for enhanced crash diagnostics
Switch signal handler registration from signal() to sigaction(SA_SIGINFO)
on Linux to capture fault address, signal code description, and program
counter at crash time. These are logged to the file logger and included
in OpenTelemetry crash reports.
2026-03-23 10:30:14 +01:00
Magne Sjaastad 7f0ef8dbc4 Simplifies OpenTelemetry integration
Removes conditional compilation for OpenTelemetry, ensuring it is always included.

Reinitializes OpenTelemetry based on user preferences, ensuring that changes to telemetry settings are applied immediately.

Configures cloud services, including OpenTelemetry, after the logger is initialized, ensuring that telemetry data is properly captured and transmitted.

Retrieves system username for telemetry tracking.
2025-12-22 16:41:29 +01:00
Magne Sjaastad 4274c9079d Enables OpenTelemetry integration
Initializes OpenTelemetry after the application configuration
is loaded, allowing for telemetry data collection.

Reports application crashes to OpenTelemetry when enabled,
providing stack trace information for debugging.
2025-12-18 08:40:30 +01:00
Magne Sjaastad 84cdfe796c Include full version string in stack trace report 2025-08-03 17:54:29 +02:00
Magne Sjaastad 82fbc7ae89 Add logging of stack using std::stacktrace
When a segfault happens, add the stack trace to spdlog
2025-05-09 15:54:28 +02:00
Magne Sjaastad 048478a01c Make IO of data for preferences more robust
Never write to preferences if running in console mode
Delete stale settings lock files

On Linux, application settings are stored in a text file in the users home folder. On Windows, these settings are stored in Registry. Users have reported stale lock files the configuration directory. In some cases, these lock files can prevent the application from starting. It appears that the application start, but no GUI is displayed.
2025-03-06 12:31:12 +01:00
Magne Sjaastad 06766b3650 Add option to Preferences to flush file loggers when a signal is triggered 2024-02-02 08:30:30 +01:00
Magne Sjaastad 0e57cfe201 Memory Management : Adjustment and fixes
Add release of several static singleton objects
Fix several minor memory leaks
2022-03-03 14:39:41 +01:00