Linux debug: hot restart no longer crashes with live mpv players

Hot restart frees the old isolate's NativeCallables while mpv handles stay
alive; media_kit then quits them on the next start and mpv calls the dead
wakeup callback (SIGSEGV on the mpv 'core' thread). A debug-only runner
hook clears every live handle's wakeup callback on the engine's
on-pre-engine-restart signal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
foxyzandClaude Opus 5.5 committed 2026-10-09 18:53:07 +03:00
1 parent 151ec95289
commit d002ff6941
5 files changed
+100 -1

No files matched your search

+2
View File
@@ -9,6 +9,7 @@ project(runner LANGUAGES CXX)
add_executable(${BINARY_NAME}
"main.cc"
"my_application.cc"
"hot_restart_guard.cc"
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
)
@@ -22,5 +23,6 @@ add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
# Add dependency libraries. Add any application-specific dependencies here.
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
target_link_libraries(${BINARY_NAME} PRIVATE ${CMAKE_DL_LIBS})
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")