Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@zanderso
Copy link
Member

@zanderso zanderso commented Mar 8, 2023

@zanderso zanderso requested a review from jonahwilliams March 8, 2023 18:49
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zanderso zanderso added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 8, 2023
@auto-submit auto-submit bot merged commit 431df2e into main Mar 8, 2023
@auto-submit auto-submit bot deleted the revert-39918-move_decompress_to_io branch March 8, 2023 19:30
@jason-simmons
Copy link
Member

I suspect that this is happening because ui_task is being captured into the task posted to the concurrent task runner. ui_task is a shared object created with fml::MakeCopyable, and it will be destructed on whatever thread drops the last reference.

ui_task captures some DartPersistentValue objects that will be deleted when ui_task is destructed. The DartPersistentValue destructor will try to enter the associated Dart isolate and invoke Dart APIs. This will fail if the destructor is running on a background thread but the UI thread has already entered that isolate.

Try capturing the DartPersistentValue objects as raw pointers and then rewrapping them in unique_ptr objects within the code that is explicitly scheduled on the UI thread.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants