mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
The Flutter engine exports ten entry points of an unwinder of its own. Libraries loaded after it bound those to the engine and the rest, such as _Unwind_GetCFA, to libgcc_s, and the two do not share a context. The first Lua error in the system libmpv's LuaJIT ended the app with a segmentation fault (at start, on a song change, on repeat), and a C++ exception in a system library ended it with an abort. The runner now lists libgcc_s ahead of the engine, so later libraries find it first. As a check behind that, main() looks up which library answers for _Unwind_RaiseException and, if it is still the engine, starts the app once more with libgcc_s preloaded, then gives programs it starts the environment it was given. Not compiled or run on Linux yet. Refs mornyeapp/Mornye-Desktop#37, mornyeapp/Mornye-Desktop#40