diff --git a/base b/base index 5df21c423..781db2531 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit 5df21c42336ce3b8b16e6b93edbffa79280587b5 +Subproject commit 781db253176d6a7bed650dfa4057ff361b0674bb diff --git a/frontend/document/credocument.lua b/frontend/document/credocument.lua index 25b057ca7..be1b614f1 100644 --- a/frontend/document/credocument.lua +++ b/frontend/document/credocument.lua @@ -116,6 +116,15 @@ end function CreDocument:engineInit() if not engine_initialized then cre = require("libs/libkoreader-cre") + + -- When forking to execute any stuff in a sub-process, + -- as that stuff may not care about properly closing + -- the document, skip cre.cpp finalizer to avoid any + -- assertion failure. + require("ffi/util").addRunInSubProcessAfterForkFunc("cre_skip_teardown", function() + cre.setSkipTearDown(true) + end) + -- initialize cache self:cacheInit() diff --git a/platform/android/luajit-launcher b/platform/android/luajit-launcher index c4293f5ed..6714035be 160000 --- a/platform/android/luajit-launcher +++ b/platform/android/luajit-launcher @@ -1 +1 @@ -Subproject commit c4293f5ed35350d67d09876148aef1a5b65f6cdd +Subproject commit 6714035be92d660bb5b7915b284fa7f108c257d5