https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
u

लातों वाला भूत

11/04/2023, 7:11 PM
I am trying to launch my multiplatform app in production for iOS But randomly getting this error on resuming app from background The stacktrace is not very helpful. Has anyone faced something like this before or any pointers on where to look? Only happens in iOS and not in Android Stack trace in Thread:
🧵 3
c

Chrimaeon

11/04/2023, 8:04 PM
Please post long stacktraces and code snippets in a thread to the post to not clutter the channel.
u

लातों वाला भूत

11/04/2023, 8:06 PM
Copy code
Crashed: RenderingDispatchQueue
0  Medial                         0x15db094 virtual thunk to GrMtlTexture::onRelease() + 4322209940
1  Medial                         0x14f1b34 GrGpuResource::release() + 4321254196
2  Medial                         0x14fe438 GrResourceCache::purgeAsNeeded() + 4321305656
3  Medial                         0x14fe6a8 GrResourceCache::insertResource(GrGpuResource*) + 4321306280
4  Medial                         0x15da508 GrMtlTexture::GrMtlTexture(GrMtlGpu*, SkBudgeted, SkISize, sk_sp<GrMtlAttachment>, GrMipmapStatus, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 4322206984
5  Medial                         0x15da8b0 GrMtlTexture::MakeNewTexture(GrMtlGpu*, SkBudgeted, SkISize, MTLPixelFormat, unsigned int, GrMipmapStatus, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 4322207920
6  Medial                         0x15cc788 GrMtlGpu::onCreateTexture(SkISize, GrBackendFormat const&, GrRenderable, int, SkBudgeted, GrProtected, int, unsigned int, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 4322150280
7  Medial                         0x14efa9c GrGpu::createTextureCommon(SkISize, GrBackendFormat const&, GrTextureType, GrRenderable, int, SkBudgeted, GrProtected, int, unsigned int, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 4321245852
8  Medial                         0x14efd14 GrGpu::createTexture(SkISize, GrBackendFormat const&, GrTextureType, GrRenderable, int, SkBudgeted, GrProtected, GrColorType, GrColorType, GrMipLevel const*, int, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 4321246484
9  Medial                         0x150237c GrResourceProvider::createTexture(SkISize, GrBackendFormat const&, GrTextureType, GrColorType, GrRenderable, int, SkBudgeted, GrMipmapped, GrProtected, GrMipLevel const*, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 4321321852
10 Medial                         0x1502c1c GrResourceProvider::createTexture(SkISize, GrBackendFormat const&, GrTextureType, GrColorType, GrRenderable, int, SkBudgeted, SkBackingFit, GrProtected, GrMipLevel const&, std::__1::basic_string_view<char, std::__1::char_traits<char>>) + 4321324060
11 Medial                         0x14f82c4 std::__1::__function::__func<GrProxyProvider::createNonMippedProxyFromBitmap(SkBitmap const&, SkBackingFit, SkBudgeted)::$_0, std::__1::allocator<GrProxyProvider::createNonMippedProxyFromBitmap(SkBitmap const&, SkBackingFit, SkBudgeted)::$_0>, GrSurfaceProxy::LazyCallbackResult (GrResourceProvider*, GrSurfaceProxy::LazySurfaceDesc const&)>::operator()(GrResourceProvider*&&, GrSurfaceProxy::LazySurfaceDesc const&) + 4321280708
12 Medial                         0x1506588 GrSurfaceProxyPriv::doLazyInstantiation(GrResourceProvider*) + 4321338760
13 Medial                         0x14f6f24 GrProxyProvider::createProxyFromBitmap(SkBitmap const&, GrMipmapped, SkBackingFit, SkBudgeted) + 4321275684
14 Medial                         0x150f1cc make_bmp_proxy(GrProxyProvider*, SkBitmap const&, GrColorType, GrMipmapped, SkBackingFit, SkBudgeted) + 4321374668
15 Medial                         0x150ee2c GrMakeCachedBitmapProxyView(GrRecordingContext*, SkBitmap const&, std::__1::basic_string_view<char, std::__1::char_traits<char>>, GrMipmapped) + 4321373740
16 Medial                         0x14d1d20 (anonymous namespace)::draw_image(GrRecordingContext*, skgpu::v1::SurfaceDrawContext*, GrClip const*, SkMatrixProvider const&, SkPaint const&, SkImage_Base const&, SkRect const&, SkRect const&, SkPoint const*, SkMatrix const&, GrQuadAAFlags, SkCanvas::SrcRectConstraint, SkSamplingOptions, SkTileMode) + 4321123616
17 Medial                         0x14d2dd0 skgpu::v1::Device::drawImageQuad(SkImage const*, SkRect const*, SkRect const*, SkPoint const*, GrQuadAAFlags, SkMatrix const*, SkSamplingOptions const&, SkPaint const&, SkCanvas::SrcRectConstraint) + 4321127888
18 Medial                         0x14cefc4 skgpu::v1::Device::drawImageRect(SkImage const*, SkRect const*, SkRect const&, SkSamplingOptions const&, SkPaint const&, SkCanvas::SrcRectConstraint) + 4321112004
19 Medial                         0x130a4fc SkCanvas::onDrawImageRect2(SkImage const*, SkRect const&, SkRect const&, SkSamplingOptions const&, SkPaint const*, SkCanvas::SrcRectConstraint) + 4319257852
20 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
21 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
22 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
23 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
24 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
25 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
26 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
27 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
28 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
29 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
30 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
31 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
32 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
33 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
34 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
35 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
36 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
37 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
38 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
39 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
40 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
41 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
42 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
43 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
44 Medial                         0x137f9f0 SkRecordDraw(SkRecord const&, SkCanvas*, SkPicture const* const*, SkDrawable* const*, int, SkBBoxHierarchy const*, SkPicture::AbortCallback*) + 4319738352
45 Medial                         0x130bfec SkCanvas::onDrawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264748
46 Medial                         0x130bee4 SkCanvas::drawPicture(SkPicture const*, SkMatrix const*, SkPaint const*) + 4319264484
47 Medial                         0x1857c24 org_jetbrains_skia_Canvas__1nDrawPicture + 4324817956
48 Medial                         0x2e7900 kfun:org.jetbrains.skia.Canvas#drawPicture(org.jetbrains.skia.Picture;org.jetbrains.skia.Matrix33?;org.jetbrains.skia.Paint?){}org.jetbrains.skia.Canvas + 62 (Native.native.kt:62)
49 Medial                         0x4e9bd8 kfun:androidx.compose.ui.window.MetalRedrawer.$draw$lambda$4$FUNCTION_REFERENCE$4.invoke#internal + 579 (Canvas.kt:579)
50 Medial                         0x4eb584 kfun:androidx.compose.ui.window.MetalRedrawer.$draw$lambda$4$FUNCTION_REFERENCE$4.$<bridge-UNN>invoke(){}#internal + 428 (MetalRedrawer.kt:428)
51 Medial                         0x4eb700 kfun:androidx.compose.ui.window.MetalRedrawer.$draw$lambda$5$FUNCTION_REFERENCE$5.$<bridge-UNN>invoke(){}#internal + 15 (ObjectiveCUtils.kt:15)
52 Medial                         0x127f43c ___6f72672e6a6574627261696e732e636f6d706f73652e75693a75692f6f70742f6275696c644167656e742f776f726b2f356234626566333562333562396631322f636f6d706f73652f75692f75692f7372632f75696b69744d61696e2f6b6f746c696e2f616e64726f6964782f636f6d706f73652f75692f77696e646f772f4d6574616c52656472617765722e6b74_knbridge114_block_invoke + 4318688316
53 libdispatch.dylib              0x26a8 _dispatch_call_block_and_release + 32
54 libdispatch.dylib              0x4300 _dispatch_client_callout + 20
55 libdispatch.dylib              0xb894 _dispatch_lane_serial_drain + 748
56 libdispatch.dylib              0xc3c4 _dispatch_lane_invoke + 380
57 libdispatch.dylib              0x17004 _dispatch_root_queue_drain_deferred_wlh + 288
58 libdispatch.dylib              0x16878 _dispatch_workloop_worker_thread + 404
59 libsystem_pthread.dylib        0x1964 _pthread_wqthread + 288
60 libsystem_pthread.dylib        0x1a04 start_wqthread + 8
@Chrimaeon My bad.
s

Sebastian Aigner

11/05/2023, 10:11 PM
Looking at the stacktrace, this seems like it'd be an instance of https://github.com/JetBrains/compose-multiplatform/issues/3862 👀
u

लातों वाला भूत

11/05/2023, 10:18 PM
Interesting I am using Kamel for Image loading. I dont think it is due to the library because Android builds have not reported any such error Since this is only happening for iOS builds in production Will this be taken up on priority?
s

Sebastian Aigner

11/05/2023, 10:20 PM
The issue is marked as high priority 👌🏼 These kind of crashes (especially if they're regressions) is something we do take very seriously!
u

लातों वाला भूत

11/05/2023, 10:25 PM
Thanks
j

juhaodong

11/06/2023, 8:28 AM
same for me,
u

लातों वाला भूत

11/06/2023, 11:55 AM
Are you using any image loading library? Also have you tried removing caching behaviour to see if it helps? How frequent is it?
8 Views