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

[web] Dispose a temporary image that may be created by instantiateImageCodecWithSize #54096

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

jason-simmons
Copy link
Member

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jul 25, 2024
);
if (!identical(frameInfo.image, scaledImage)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't seem right to me, as we actually dispose the original image inside the image scaling code: https://github.com/flutter/engine/pull/54096/files#diff-31d1d1318cb022b618cf4b314284d2555b4219200e8e40f67c9c1bc275ac1986L469

Are we sure this is the actual issue here? Maybe I'm just missing something but it seems like we'd be double-disposing the original image. Perhaps this is just covering up some other problem we have?

Copy link
Contributor

Choose a reason for hiding this comment

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

The unit test failures seem to indicate that we are double disposing now with your change, so I suspect this needs to be looked at a bit deeper.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looked at this again, and I think the issue is actually that CkResizingCodec._scaleImageUsingDomCanvas was not matching the dispose behavior of ResizingCodec.scaleImageIfNeeded

This is passing CI now - PTAL

Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

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

LGTM

@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 29, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 29, 2024
Copy link
Contributor

auto-submit bot commented Jul 29, 2024

auto label is removed for flutter/engine/54096, Failed to merge flutter/engine/54096 with Pull request flutter/engine/54096 could not be merged: Pull Request is not mergeable.

@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 31, 2024
@auto-submit auto-submit bot merged commit ed95b49 into flutter:main Jul 31, 2024
29 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 31, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 1, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 1, 2024
…ions) (#152654)

Manual roll requested by [email protected]

flutter/engine@32f7888...ed95b49

2024-07-31 [email protected] [web] Dispose a temporary image that may be created by instantiateImageCodecWithSize (flutter/engine#54096)
2024-07-31 [email protected] Roll Skia from b5ad5bf3696d to 8db309541ad9 (2 revisions) (flutter/engine#54266)
2024-07-31 [email protected] Roll Dart SDK from 5df6a6e0c037 to efabc9163078 (1 revision) (flutter/engine#54263)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 1, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 1, 2024
…152658)

flutter/engine@32f7888...0fbff21

2024-07-31 [email protected] Remove pre-existing diagnostics with no behavioral changes. (flutter/engine#54264)
2024-07-31 [email protected] Cleanup dart analyze diagnostics in ignored directories. (flutter/engine#54262)
2024-07-31 [email protected] [web] Dispose a temporary image that may be created by instantiateImageCodecWithSize (flutter/engine#54096)
2024-07-31 [email protected] Roll Skia from b5ad5bf3696d to 8db309541ad9 (2 revisions) (flutter/engine#54266)
2024-07-31 [email protected] Roll Dart SDK from 5df6a6e0c037 to efabc9163078 (1 revision) (flutter/engine#54263)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…ions) (flutter#152654)

Manual roll requested by [email protected]

flutter/engine@32f7888...ed95b49

2024-07-31 [email protected] [web] Dispose a temporary image that may be created by instantiateImageCodecWithSize (flutter/engine#54096)
2024-07-31 [email protected] Roll Skia from b5ad5bf3696d to 8db309541ad9 (2 revisions) (flutter/engine#54266)
2024-07-31 [email protected] Roll Dart SDK from 5df6a6e0c037 to efabc9163078 (1 revision) (flutter/engine#54263)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…lutter#152658)

flutter/engine@32f7888...0fbff21

2024-07-31 [email protected] Remove pre-existing diagnostics with no behavioral changes. (flutter/engine#54264)
2024-07-31 [email protected] Cleanup dart analyze diagnostics in ignored directories. (flutter/engine#54262)
2024-07-31 [email protected] [web] Dispose a temporary image that may be created by instantiateImageCodecWithSize (flutter/engine#54096)
2024-07-31 [email protected] Roll Skia from b5ad5bf3696d to 8db309541ad9 (2 revisions) (flutter/engine#54266)
2024-07-31 [email protected] Roll Dart SDK from 5df6a6e0c037 to efabc9163078 (1 revision) (flutter/engine#54263)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…ions) (flutter#152654)

Manual roll requested by [email protected]

flutter/engine@32f7888...ed95b49

2024-07-31 [email protected] [web] Dispose a temporary image that may be created by instantiateImageCodecWithSize (flutter/engine#54096)
2024-07-31 [email protected] Roll Skia from b5ad5bf3696d to 8db309541ad9 (2 revisions) (flutter/engine#54266)
2024-07-31 [email protected] Roll Dart SDK from 5df6a6e0c037 to efabc9163078 (1 revision) (flutter/engine#54263)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#152658)

flutter/engine@32f7888...0fbff21

2024-07-31 [email protected] Remove pre-existing diagnostics with no behavioral changes. (flutter/engine#54264)
2024-07-31 [email protected] Cleanup dart analyze diagnostics in ignored directories. (flutter/engine#54262)
2024-07-31 [email protected] [web] Dispose a temporary image that may be created by instantiateImageCodecWithSize (flutter/engine#54096)
2024-07-31 [email protected] Roll Skia from b5ad5bf3696d to 8db309541ad9 (2 revisions) (flutter/engine#54266)
2024-07-31 [email protected] Roll Dart SDK from 5df6a6e0c037 to efabc9163078 (1 revision) (flutter/engine#54263)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

instantiateImageCodecWithSize is not disposing intermediates on web
2 participants