Skip to content

Crash in "Color Filter Cache" macrobenchmark #149216

@gaaclarke

Description

@gaaclarke

reproduction

  1. launch flutter/dev/macrobenchmarks
  2. navigate to the "Color Filter Cache" tab
  3. swipe from the left side to go back
  4. notice the crash

stacktrace

* thread #10, name = 'io.flutter.1.raster', stop reason = signal SIGABRT
  * frame #0: 0x00000001d9e6e974 libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x00000001ed8f10ec libsystem_pthread.dylib`pthread_kill + 268
    frame #2: 0x00000001998bfb80 libsystem_c.dylib`abort + 180
    frame #3: 0x00000001998bee70 libsystem_c.dylib`__assert_rtn + 284
    frame #4: 0x000000019164bc74 Metal`MTLReportFailure.cold.1 + 48
    frame #5: 0x000000019162a03c Metal`MTLReportFailure + 464
    frame #6: 0x00000001914f1aa8 Metal`_MTLMessageContextEnd + 860
    frame #7: 0x00000002299efca4 MetalTools`-[MTLDebugBlitCommandEncoder validateCopyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:] + 1228
    frame #8: 0x00000002299f0274 MetalTools`-[MTLDebugBlitCommandEncoder copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:] + 124
    frame #9: 0x0000000101959580 GPUToolsCapture`-[CaptureMTLBlitCommandEncoder copyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:] + 268
    frame #10: 0x0000000104d8b530 Flutter`impeller::BlitPassMTL::OnCopyBufferToTextureCommand(impeller::BufferView, std::_fl::shared_ptr<impeller::Texture>, impeller::TRect<long long>, std::_fl::basic_string<char, std::_fl::char_traits<char>, std::_fl::allocator<char>>, unsigned int, bool) + 548
    frame #11: 0x0000000104a7a164 Flutter`impeller::BlitPass::AddCopy(impeller::BufferView, std::_fl::shared_ptr<impeller::Texture>, std::_fl::optional<impeller::TRect<long long>>, std::_fl::basic_string<char, std::_fl::char_traits<char>, std::_fl::allocator<char>>, unsigned int, bool) + 364
    frame #12: 0x0000000104a43408 Flutter`impeller::BlendFilterContents::RenderFilter(std::_fl::vector<std::_fl::shared_ptr<impeller::FilterInput>, std::_fl::allocator<std::_fl::shared_ptr<impeller::FilterInput>>> const&, impeller::ContentContext const&, impeller::Entity const&, impeller::Matrix const&, impeller::TRect<float> const&, std::_fl::optional<impeller::TRect<float>> const&) const + 1832
    frame #13: 0x0000000104a50720 Flutter`impeller::FilterContents::GetEntity(impeller::ContentContext const&, impeller::Entity const&, std::_fl::optional<impeller::TRect<float>> const&) const + 348
    frame #14: 0x0000000104a501fc Flutter`impeller::FilterContents::Render(impeller::ContentContext const&, impeller::Entity const&, impeller::RenderPass&) const + 88
    frame #15: 0x0000000104a7153c Flutter`impeller::EntityPass::RenderElement(impeller::Entity&, unsigned long, impeller::InlinePassContext&, int, impeller::ContentContext&, impeller::EntityPassClipStack&, impeller::TPoint<float>) const + 1912
    frame #16: 0x0000000104a705fc Flutter`impeller::EntityPass::OnRender(impeller::ContentContext&, impeller::TSize<long long>, impeller::EntityPassTarget&, impeller::TPoint<float>, impeller::TPoint<float>, unsigned int, impeller::EntityPassClipStack&, unsigned long, std::_fl::shared_ptr<impeller::Contents>, std::_fl::optional<impeller::InlinePassContext::RenderPassResult> const&) const + 4536
    frame #17: 0x0000000104a162b4 Flutter`impeller::AiksContext::Render(impeller::Picture const&, impeller::RenderTarget&, bool) + 4252
    frame #18: 0x0000000104a80740 Flutter`impeller::Renderer::Render(std::_fl::unique_ptr<impeller::Surface, std::_fl::default_delete<impeller::Surface>>, std::_fl::function<bool (impeller::RenderTarget&)> const&) const + 340
    frame #19: 0x0000000104ef6a44 Flutter`std::_fl::__function::__func<fml::internal::CopyableLambda<flutter::GPUSurfaceMetalImpeller::AcquireFrameFromCAMetalLayer(SkISize const&)::$_0>, std::_fl::allocator<fml::internal::CopyableLambda<flutter::GPUSurfaceMetalImpeller::AcquireFrameFromCAMetalLayer(SkISize const&)::$_0>>, bool (flutter::SurfaceFrame&, flutter::DlCanvas*)>::operator()(flutter::SurfaceFrame&, flutter::DlCanvas*&&) + 916
    frame #20: 0x0000000104df1acc Flutter`flutter::SurfaceFrame::Submit() + 92
    frame #21: 0x0000000104ea775c Flutter`flutter::Rasterizer::DrawToSurfacesUnsafe(flutter::FrameTimingsRecorder&, std::_fl::vector<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>, std::_fl::allocator<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>>>) + 1832
    frame #22: 0x0000000104ea84f4 Flutter`std::_fl::__function::__func<flutter::Rasterizer::DrawToSurfaces(flutter::FrameTimingsRecorder&, std::_fl::vector<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>, std::_fl::allocator<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>>>)::$_1, std::_fl::allocator<flutter::Rasterizer::DrawToSurfaces(flutter::FrameTimingsRecorder&, std::_fl::vector<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>, std::_fl::allocator<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>>>)::$_1>, void ()>::operator()() + 64
    frame #23: 0x0000000104985830 Flutter`fml::SyncSwitch::Execute(fml::SyncSwitch::Handlers const&) const + 72
    frame #24: 0x0000000104ea6e74 Flutter`flutter::Rasterizer::DrawToSurfaces(flutter::FrameTimingsRecorder&, std::_fl::vector<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>, std::_fl::allocator<std::_fl::unique_ptr<flutter::LayerTreeTask, std::_fl::default_delete<flutter::LayerTreeTask>>>>) + 364
    frame #25: 0x0000000104ea93bc Flutter`std::_fl::__function::__func<flutter::Rasterizer::Draw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem>> const&)::$_0, std::_fl::allocator<flutter::Rasterizer::Draw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem>> const&)::$_0>, void (std::_fl::unique_ptr<flutter::FrameItem, std::_fl::default_delete<flutter::FrameItem>>)>::operator()(std::_fl::unique_ptr<flutter::FrameItem, std::_fl::default_delete<flutter::FrameItem>>&&) + 208
    frame #26: 0x0000000104ea8ba4 Flutter`flutter::Rasterizer::Draw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem>> const&) + 452
    frame #27: 0x0000000104ec171c Flutter`std::_fl::__function::__func<fml::internal::CopyableLambda<flutter::Shell::OnAnimatorDraw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem>>)::$_0>, std::_fl::allocator<fml::internal::CopyableLambda<flutter::Shell::OnAnimatorDraw(std::_fl::shared_ptr<flutter::Pipeline<flutter::FrameItem>>)::$_0>>, void ()>::operator()() + 168
    frame #28: 0x0000000104983de0 Flutter`fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 592
    frame #29: 0x0000000104987fc4 Flutter`fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
    frame #30: 0x00000001919b76e4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
    frame #31: 0x00000001919b7388 CoreFoundation`__CFRunLoopDoTimer + 1004
    frame #32: 0x0000000191941184 CoreFoundation`__CFRunLoopDoTimers + 288
    frame #33: 0x000000019193e18c CoreFoundation`__CFRunLoopRun + 1856
    frame #34: 0x000000019193d968 CoreFoundation`CFRunLoopRunSpecific + 608
    frame #35: 0x00000001049880b0 Flutter`fml::MessageLoopDarwin::Run() + 88
    frame #36: 0x0000000104987118 Flutter`std::_fl::__function::__func<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0, std::_fl::allocator<fml::Thread::Thread(std::_fl::function<void (fml::Thread::ThreadConfig const&)> const&, fml::Thread::ThreadConfig const&)::$_0>, void ()>::operator()() + 180
    frame #37: 0x0000000104986da8 Flutter`fml::ThreadHandle::ThreadHandle(std::_fl::function<void ()>&&)::$_0::__invoke(void*) + 36
    frame #38: 0x00000001ed8eda90 libsystem_pthread.dylib`_pthread_start + 136

log

-[MTLDebugBlitCommandEncoder validateCopyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:775: failed assertion `Copy From Buffer Validation
sourceOffset (36834) must be a multiple of 4 bytes.

doctor

[!] Flutter (Channel [user-branch], 3.22.0-42.0.pre.86, on macOS 14.5 23F79 darwin-arm64, locale en)
    ! Flutter version 3.22.0-42.0.pre.86 on channel [user-branch] at /Users/aaclarke/dev/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
    • Framework revision 6543a2155e (6 hours ago), 2024-05-28 11:46:17 -0400
    • Engine revision d0323905fc
    • Dart version 3.5.0 (build 3.5.0-191.0.dev)
    • DevTools version 2.36.0-dev.10
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions