Skip to content

Make GFXRECON_LOG_FATAL actually fatal on non-Android platforms#2986

Open
fabian-lunarg wants to merge 14 commits into
LunarG:devfrom
fabian-lunarg:fabian_make_log_fatal_fatal_again
Open

Make GFXRECON_LOG_FATAL actually fatal on non-Android platforms#2986
fabian-lunarg wants to merge 14 commits into
LunarG:devfrom
fabian-lunarg:fabian_make_log_fatal_fatal_again

Conversation

@fabian-lunarg

@fabian-lunarg fabian-lunarg commented Jun 2, 2026

Copy link
Copy Markdown
Contributor
  • Add Log::SetFatalCallback(): on kFatal, invoke the callback, followed by a catch-all std::abort().
  • Remove the copy-pasted fatal_error_handler_/RaiseFatalError pattern from all four replay consumer classes
  • tools set the callback once to throw std::runtime_error instead.

fixes #1024

@fabian-lunarg fabian-lunarg self-assigned this Jun 2, 2026
@fabian-lunarg fabian-lunarg requested a review from a team as a code owner June 2, 2026 09:40
@fabian-lunarg fabian-lunarg added the approved-to-run-ci Can run CI check on internal LunarG machines label Jun 2, 2026
@fabian-lunarg

Copy link
Copy Markdown
Contributor Author

fyi @per-mathisen-arm

@fabian-lunarg fabian-lunarg force-pushed the fabian_make_log_fatal_fatal_again branch 3 times, most recently from 41dbd0e to c899215 Compare June 2, 2026 11:31
@fabian-lunarg fabian-lunarg force-pushed the fabian_make_log_fatal_fatal_again branch 2 times, most recently from 7d071a4 to add4957 Compare June 4, 2026 13:22
Comment thread framework/decode/dx12_replay_consumer_base.cpp
@fabian-lunarg fabian-lunarg force-pushed the fabian_make_log_fatal_fatal_again branch from add4957 to 9a51d9e Compare June 10, 2026 07:59
Comment thread framework/decode/custom_dx12_struct_decoders.cpp Outdated
Comment thread framework/decode/dx12_replay_consumer_base.cpp
@fabian-lunarg fabian-lunarg force-pushed the fabian_make_log_fatal_fatal_again branch 8 times, most recently from 860c18e to bbb4f8b Compare June 15, 2026 07:29
Comment thread tools/replay/replay_feature.h
- Add Log::SetFatalCallback(): on kFatal, invoke the callback or abort() if
  none is set.
- Remove the copy-pasted fatal_error_handler_/RaiseFatalError
  pattern from all four replay consumer classes, tools set the callback once
  to throw std::runtime_error instead.

# Conflicts:
#	tools/replay/android_main.cpp
#	tools/replay/desktop_main.cpp
…been disabled"

- we obviously want to continue, so FATAL was wrong severity
… open failure to ERROR

# Conflicts:
#	framework/decode/vulkan_replay_consumer_base.cpp
- logs were not fatal before, not followed by an abort/exit.
- abort() is called regardless of whether a fatal_callback_ is set
- Log::Release() clears the callback, removing the need for manual resets
- unit test for callback invocation updated
@fabian-lunarg fabian-lunarg force-pushed the fabian_make_log_fatal_fatal_again branch from bbb4f8b to 52ebe95 Compare June 16, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-to-run-ci Can run CI check on internal LunarG machines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up use of GFXRECON_LOG_FATAL

3 participants