Repository navigation
Closed
Labels
a: platform-viewsEmbedding Android/iOS views in Flutter appsc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specifically
Description
I've caught crash in debug mode with the following stacktrace:
_validateGetBytes:29: failed assertion `CPU access for textures with MTLResourceStorageModePrivate storage mode is disallowed.'
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x000000019e5dbec4 libsystem_kernel.dylib`__pthread_kill + 8
frame #1: 0x000000019e4f71d8 libsystem_pthread.dylib`pthread_kill$VARIANT$mp + 136
frame #2: 0x000000019e44b844 libsystem_c.dylib`abort + 100
frame #3: 0x000000019e44ac10 libsystem_c.dylib`__assert_rtn + 204
frame #4: 0x00000001b24aad78 Metal`MTLReportFailure.cold.2 + 52
frame #5: 0x00000001b2496ecc Metal`MTLReportFailure + 476
frame #6: 0x00000001cd2bac70 MetalTools`_validateGetBytes(MTLDebugTexture*, MTLOrigin, MTLSize, unsigned long, unsigned long, void*, unsigned long, unsigned long, unsigned long) + 156
frame #7: 0x00000001cd2bab0c MetalTools`-[MTLDebugTexture getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:] + 148
frame #8: 0x00000001b8ccc748 AppleMetalGLRenderer`gldReadFramebufferData + 1248
frame #9: 0x00000001b8c74c50 GLEngine`gleTextureSubImageCopy + 640
frame #10: 0x00000001b8c0c8d8 GLEngine`glCopyTexSubImage2D_Exec + 720
frame #11: 0x00000001b8cd94cc OpenGLES`glCopyTexSubImage2D + 80
frame #12: 0x00000001071a2860 Flutter`GrGLGpu::onCopySurface(GrSurface*, GrSurface*, SkIRect const&, SkIPoint const&) + 1632
frame #13: 0x00000001070d4058 Flutter`GrCopyRenderTask::onExecute(GrOpFlushState*) + 344
frame #14: 0x00000001070d7954 Flutter`GrDrawingManager::flush(GrSurfaceProxy**, int, SkSurface::BackendSurfaceAccess, GrFlushInfo const&, GrPrepareForExternalIORequests const&) + 2392
frame #15: 0x00000001070d7df4 Flutter`GrDrawingManager::flushSurfaces(GrSurfaceProxy**, int, SkSurface::BackendSurfaceAccess, GrFlushInfo const&) + 168
frame #16: 0x00000001070f42c8 Flutter`GrRenderTargetContext::flush(SkSurface::BackendSurfaceAccess, GrFlushInfo const&) + 252
frame #17: 0x00000001071695b0 Flutter`SkGpuDevice::flush() + 36
frame #18: 0x0000000106f01464 Flutter`flutter::FlutterPlatformViewsController::SubmitFrame(GrContext*, std::__1::shared_ptr<flutter::IOSGLContext>) + 2768
frame #19: 0x0000000106f15f20 Flutter`flutter::IOSSurfaceGL::SubmitFrame(GrContext*) + 68
frame #20: 0x0000000106f6c400 Flutter`flutter::Rasterizer::DrawToSurface(flutter::LayerTree&) + 528
frame #21: 0x0000000106f6d24c Flutter`std::__1::__function::__func<flutter::Rasterizer::Draw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_0, std::__1::allocator<flutter::Rasterizer::Draw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_0>, void (std::__1::unique_ptr<flutter::LayerTree, std::__1::default_delete<flutter::LayerTree> >)>::operator()(std::__1::unique_ptr<flutter::LayerTree, std::__1::default_delete<flutter::LayerTree> >&&) + 104
frame #22: 0x0000000106f6c6d4 Flutter`flutter::Rasterizer::Draw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >) + 432
frame #23: 0x0000000106f72820 Flutter`std::__1::__function::__func<flutter::Shell::OnAnimatorDraw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_29, std::__1::allocator<flutter::Shell::OnAnimatorDraw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_29>, void ()>::operator()() + 76
frame #24: 0x0000000106f27cfc Flutter`fml::MessageLoopImpl::FlushTasks(fml::FlushType) + 1700
frame #25: 0x0000000106f2a008 Flutter`fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) + 32
frame #26: 0x000000019e76303c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
frame #27: 0x000000019e762d78 CoreFoundation`__CFRunLoopDoTimer + 880
frame #28: 0x000000019e762448 CoreFoundation`__CFRunLoopDoTimers + 276
frame #29: 0x000000019e75d584 CoreFoundation`__CFRunLoopRun + 1920
frame #30: 0x000000019e75cadc CoreFoundation`CFRunLoopRunSpecific + 464
frame #31: 0x00000001a86e2328 GraphicsServices`GSEventRunModal + 104
frame #32: 0x00000001a2857ae0 UIKitCore`UIApplicationMain + 1936
* frame #33: 0x00000001040d66f0 Runner`main at AppDelegate.swift:9:13
frame #34: 0x000000019e5e6360 libdyld.dylib`start + 4
Happened after opening drawer with blur effect over texture and platform view.
Using iPad 6 gen with iOS 13.3, Xcode 11.3.1,
Flutter 1.14.6 • channel beta • https://github.com/flutter/flutter.git
Framework • revision fabeb2a16f (2 weeks ago) • 2020-01-28 07:56:51 -0800
Engine • revision c4229bfbba
Tools • Dart 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)
Rarely reproducible, but stack-trace seems to be meaningful, so I decided to open issue
Reproduced on dev channel as well:
Flutter 1.15.3 • channel dev • https://github.com/flutter/flutter.git
Framework • revision 67826bdce5 (3 days ago) • 2020-02-10 14:59:32 -0800
Engine • revision 6158f03ef5
Tools • Dart 2.8.0 (build 2.8.0-dev.8.0 514a8d4c84)
Metadata
Metadata
Assignees
Labels
a: platform-viewsEmbedding Android/iOS views in Flutter appsc: crashStack traces logged to the consoleengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specifically
Activity
[-]CPU access for textures with MTLResourceStorageModePrivate storage mode is disallowed.[/-][+][iOS] [Crash] CPU access for textures with MTLResourceStorageModePrivate storage mode is disallowed.[/+]rostopira commentedon Feb 13, 2020
@TahaTesser according to:
I would suggest adding
platform-viewstag, alsoxcodeandtooltags seems unrelated.chinmaygarde commentedon Jun 13, 2020
This is an issue with Apple's OpenGL emulation on Metal. Flutter now uses Metal directly and this is no longer on issue.
github-actions commentedon Aug 20, 2021
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 -vand a minimal reproduction of the issue.