mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 09:33:25 -08:00
* [Servatrice] Exit non-zero when server initialization fails initServer() reported every startup failure through a zero exit code: the database could not be opened, the server printed nothing of its own, and the process looked like a clean shutdown. Log the two refusal reasons at critical level and return 1 so supervisors and the Docker exit status can tell the difference. * [Servatrice] Keep console logging independent of the logfile logMessage() returned before the console echo unless a logfile was open and server/writelog was true, so --log-to-console produced nothing when server/logfile was empty or could not be opened. That is how a refused database connection could end in a silent exit. Print to the console before the logfile gates, drop the duplicate echo from flushBuffer(), and read writelog/logfilters once in main instead of calling the non-thread-safe global QSettings from every logging thread. * [Servatrice] Uninstall the log handler before tearing down globals The handler reaches into the global logger and settingsCache. Leaving it installed while main deletes those objects turns any Qt warning emitted during QCoreApplication/QFactoryLoader teardown into a use-after-free; with QT_DEBUG_PLUGINS=1 that warning exists, and Servatrice died with SIGSEGV in QSettings::value() on the way out. * [Servatrice] Buffer console logs on the logger thread Address review feedback on the startup failure change: - Append console lines to a buffer drained by the logger thread, so a stalled stdout reader cannot block game threads. - Report islServer->errorString() instead of the literal call text. - Let the constructor reuse reloadConfig() instead of parsing the filter list twice. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> |
||
|---|---|---|
| .. | ||
| card_zone_algorithms | ||
| carddatabase | ||
| deck_list_model | ||
| deck_list_zones | ||
| game | ||
| loading_from_clipboard | ||
| movecard_tests | ||
| oracle | ||
| picture_loader_benchmark | ||
| settings | ||
| theme_migration | ||
| card_update_progress_test.cpp | ||
| clamped_arithmetic_test.cpp | ||
| CMakeLists.txt | ||
| crash_reporter_test.cpp | ||
| deck_hash_performance_test.cpp | ||
| expression_test.cpp | ||
| forwarded_address_test.cpp | ||
| holder_line_test.cpp | ||
| installer_close_server_test.cpp | ||
| lag_monitor_test.cpp | ||
| latency_tracker_test.cpp | ||
| loader_local_matching_test.cpp | ||
| metrics_registry_test.cpp | ||
| password_hash_test.cpp | ||
| payload_paths_test.cpp | ||
| playmat_resolver_test.cpp | ||
| rate_limiter_test.cpp | ||
| report_categories_test.cpp | ||
| server_card_counter_test.cpp | ||
| server_counter_test.cpp | ||
| server_developer_role_test.cpp | ||
| server_dump_zone_test.cpp | ||
| server_game_join_test.cpp | ||
| server_logger_test.cpp | ||
| server_moderator_role_test.cpp | ||
| server_rate_limiter_test.cpp | ||
| server_room_channels_test.cpp | ||
| single_instance_manager_test.cpp | ||
| test_age_formatting.cpp | ||
| translation_loader_test.cpp | ||
| translation_loader_test.ts | ||
| trusted_sources_test.cpp | ||
| user_data_backup_test.cpp | ||
| warning_categories_test.cpp | ||