Skip to content

Exception when using ScaleTransition ('TransformLayer' is not a subtype of type 'ImageFilterLayer?') #117115

Description

@b3nni97

Steps to Reproduce

I could not reproduce the problem with a simple example. After talking to @jonahwilliams, it is enough to just attach a StackTrace.

#116792 is the commit that caused the bug.

Stack Trace
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following _TypeError was thrown during paint():
type 'TransformLayer' is not a subtype of type 'ImageFilterLayer?' of 'oldLayer'

The relevant error-causing widget was:
  Container
  Container:file:///Users/xxx/Desktop/xxx/xxx/lib/pages/onboarding/onboarding.dart:40:18

When the exception was thrown, this was the stack:
#0      RenderTransform.updateCompositedLayer (package:flutter/src/rendering/proxy_box.dart)
#1      PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:151:46)
#2      PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:112:5)
#3      PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:264:7)
#4      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:245:7)
#5      _RenderColoredBox.paint (package:flutter/src/widgets/basic.dart:7587:15)
#6      RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#7      PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#8      RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2924:15)
#9      RenderStack.paintStack (package:flutter/src/rendering/stack.dart:654:5)
#10     RenderStack.paint (package:flutter/src/rendering/stack.dart:670:7)
#11     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#12     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#13     RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2924:15)
#14     RenderStack.paintStack (package:flutter/src/rendering/stack.dart:654:5)
#15     RenderStack.paint (package:flutter/src/rendering/stack.dart:670:7)
#16     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#17     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#18     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:144:15)
#19     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#20     PaintingContext.paintChild (package:flutter/src/rendering/object.dart:253:13)
#21     RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:144:15)
#22     RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2853:7)
#23     PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:169:11)
#24     PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:112:5)
#25     PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:1137:31)
#26     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:518:19)
#27     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:865:13)
#28     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:381:5)
#29     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1289:15)
#30     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1218:9)
#31     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1076:5)
#32     _invoke (dart:ui/hooks.dart:145:13)
#33     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:338:5)
#34     _drawFrame (dart:ui/hooks.dart:112:31)

The following RenderObject was being processed when the exception was fired: _RenderColoredBox#98295 relayoutBoundary=up1:
  needs compositing
  creator: ColoredBox ← Container ← AnimatedBuilder-[GlobalKey#f43fe] ← Stack-[GlobalKey#f369f
    bottomsheet menu key] ← RubberBottomSheet ← OnboardingView ← Onboarding ← Positioned ← Stack ←
    Semantics ← Builder ← RepaintBoundary-[GlobalKey#a46fa] ← ⋯
  parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
  constraints: BoxConstraints(0.0<=w<=375.0, 0.0<=h<=812.0)
  size: Size(375.0, 812.0)
  behavior: opaque
This RenderObject had the following descendants (showing up to depth 5):
    child: RenderTransform#5b9e0 relayoutBoundary=up2 NEEDS-PAINT
      child: RenderRepaintBoundary#1f806 relayoutBoundary=up3
        child: _RenderSnapshotWidget#b9c5b relayoutBoundary=up4
          child: RenderStack#4d3ea relayoutBoundary=up5
            child 1: RenderStack#fba08 relayoutBoundary=up6
            child 2: RenderPositionedBox#18f2e relayoutBoundary=up6
════════════════════════════════════════════════════════════════════════════════════════════════════
Another exception was thrown: type 'TransformLayer' is not a subtype of type 'ImageFilterLayer?' of 'oldLayer'
Another exception was thrown: type 'TransformLayer' is not a subtype of type 'ImageFilterLayer?' of 'oldLayer'
Another exception was thrown: type 'TransformLayer' is not a subtype of type 'ImageFilterLayer?' of 'oldLayer'

Logs
 Flutter (Channel unknown, 3.7.0-6.0.pre.18, on macOS 12.6 21G115 darwin-arm64, locale de-DE)

Activity

  1. added
    in triagePresently being triaged by the triage team
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: error messageError messages from the Flutter framework
    c: crashStack traces logged to the console
    and removed
    in triagePresently being triaged by the triage team
    on Dec 15, 2022
  2. added
    r: fixedIssue is closed as already fixed in a newer version
    on Jan 3, 2023
  3. github-actions commented on Mar 4, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: error messageError messages from the Flutter frameworkc: crashStack traces logged to the consoleframeworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions