This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Use separate io_manager when spawn engine #28220
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Each Engine should use its own io_manager when spawn new engine. The current situation is that when a new Engine is spawned from an old Engine, the new Engine will use the io_manager of the old Engine. the new Engine will be crash when the old Engine is destroyed.


For example:
In this case, two engines are used to display GIF images on the same page, when I remove the top flutterView and destroy the engine, the bottomEngine will continue to decode pictures, but it will be crash because io_manager is null
In addition, when I modified the code, I found that ImageDeocoder also had the same problem. In other words, there will be similar crash in certain situations ,please take a look