Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix crashed when shutdown the app. #383

Merged
merged 1 commit into from
Jun 11, 2023
Merged

Conversation

andycall
Copy link
Member

@andycall andycall commented Jun 8, 2023

DartWorker cannot access the runtime_ member in ScriptState; it only belongs to the Flutter.ui thread.

In this case, we read the JSRuntime from JSContext instead.

Thread 20 Crashed:: DartWorker
0   libquickjs.dylib              	       0x10501db28 init_list_head + 0 (list.h:46) [inlined]
1   libquickjs.dylib              	       0x10501db28 gc_decref + 4 (gc.c:696) [inlined]
2   libquickjs.dylib              	       0x10501db28 JS_RunGC + 28 (gc.c:797)
3   libwebf.dylib                 	       0x10555b750 webf::ScriptState::~ScriptState() + 24 (script_state.cc:31) [inlined]
4   libwebf.dylib                 	       0x10555b750 webf::ScriptState::~ScriptState() + 44 (script_state.cc:26)
5   libwebf.dylib                 	       0x1055598c8 webf::ExecutingContext::~ExecutingContext() + 688 (executing_context.cc:110)
6   libwebf.dylib                 	       0x105559bd0 webf::ExecutingContext::~ExecutingContext() + 12 (executing_context.cc:92)
7   libwebf.dylib                 	       0x10555c06c webf::WebFPage::~WebFPage() + 28 (page.cc:150) [inlined]
8   libwebf.dylib                 	       0x10555c06c webf::WebFPage::~WebFPage() + 44 (page.cc:144)
9   libwebf.dylib                 	       0x10555c728 std::__1::default_delete<webf::WebFPage>::operator()[abi:v15006](webf::WebFPage*) const + 4 (unique_ptr.h:48) [inlined]

@answer-huang answer-huang added this pull request to the merge queue Jun 11, 2023
Merged via the queue into main with commit 925847b Jun 11, 2023
@answer-huang answer-huang deleted the fix/crash_at_shutdown branch June 11, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants