Kamel-Media / Kamel

Kotlin asynchronous media loading and caching library for Compose.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

While using KamelImage, it is giving issue in iOS, images are not loaded.

PrabhuSandhya-Pinisetti opened this issue · comments

Here is my code

KamelImage(
asyncPainterResource("https://sebi.io/demo-image-api/${image.path}"),
contentDescription = "${image.category} by ${image.author}",
contentScale = ContentScale.Crop,
modifier = Modifier.fillMaxWidth().aspectRatio(1.0f)
)

Below is the issue in iOS

Thread Performance Checker: Thread running at QOS_CLASS_USER_INITIATED waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions

Backtrace

3 ComposeMultiplatform 0x000000010327a253 ZN15SkResourceCache4FindERKNS_3KeyEPFbRKNS_3RecEPvES6 + 67
4 ComposeMultiplatform 0x00000001031c3ab5 _ZN13SkBitmapCache4FindERK17SkBitmapCacheDescP8SkBitmap + 85
5 ComposeMultiplatform 0x00000001032cb39a _ZNK12SkImage_Lazy11getROPixelsEP15GrDirectContextP8SkBitmapN7SkImage11CachingHintE + 58
6 ComposeMultiplatform 0x00000001031c4d68 _ZN14SkBitmapDevice13drawImageRectEPK7SkImagePK6SkRectRS4_RK17SkSamplingOptionsRK7SkPaintN8SkCanvas17SrcRectConstraintE + 88
7 ComposeMultiplatform 0x00000001031e6c39 _ZN8SkCanvas16onDrawImageRect2EPK7SkImageRK6SkRectS5_RK17SkSamplingOptionsPK7SkPaintNS_17SrcRectConstraintE + 409
8 ComposeMultiplatform 0x00000001038006c6 org_jetbrains_skia_Canvas__1nDrawImageRect + 118
9 ComposeMultiplatform 0x000000010216f9a1 kfun:org.jetbrains.skia.Canvas#drawImageRect(org.jetbrains.skia.Image;org.jetbrains.skia.Rect;org.jetbrains.skia.Rect;org.jetbrains.skia.SamplingMode;org.jetbrains.skia.Paint?;kotlin.Boolean){}org.jetbrains.skia.Canvas + 1057
10 ComposeMultiplatform 0x000000010216f521 kfun:org.jetbrains.skia.Canvas#drawImage(org.jetbrains.skia.Image;kotlin.Float;kotlin.Float){}org.jetbrains.skia.Canvas + 801
11 ComposeMultiplatform 0x00000001022e85e0 kfun:androidx.compose.ui.graphics.toBitmap#internal + 688
12 ComposeMultiplatform 0x00000001022e7d2f kfun:androidx.compose.ui.graphics#toComposeImageBitmap__at__org.jetbrains.skia.Image(){}androidx.compose.ui.graphics.ImageBitmap + 159
13 ComposeMultiplatform 0x0000000102cee9db kfun:io.kamel.image.decoder.ImageBitmapDecoder.$decodeCOROUTINE$0.invokeSuspend#internal + 1067
14 ComposeMultiplatform 0x0000000102ceecc7 kfun:io.kamel.image.decoder.ImageBitmapDecoder#decode#suspend(io.ktor.utils.io.ByteReadChannel;io.kamel.core.config.ResourceConfig;kotlin.coroutines.Continuation<androidx.compose.ui.graphics.ImageBitmap>){}kotlin.Any + 503
15 ComposeMultiplatform 0x0000000102b7c085 kfun:io.kamel.core.object-3.$collect$lambda$0COROUTINE$2.invokeSuspend#internal + 2005
16 ComposeMultiplatform 0x0000000102b7cb4c kfun:io.kamel.core.object-3.collect$lambda$0#internal + 700
17 ComposeMultiplatform 0x0000000102b7cc5a kfun:io.kamel.core.object-3.$collect$lambda$0$FUNCTION_REFERENCE$10.emit#internal + 186
18 ComposeMultiplatform 0x0000000101ee5730 kfun:kotlinx.coroutines.flow.$emitAllImplCOROUTINE$0.invokeSuspend#internal + 1472
19 ComposeMultiplatform 0x0000000101d164c1 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 849
20 ComposeMultiplatform 0x0000000101f208f5 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 3637
21 ComposeMultiplatform 0x0000000101f5c194 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.dispatch$lambda$0#internal + 148
22 ComposeMultiplatform 0x0000000101f5c22e kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 78
23 ComposeMultiplatform 0x0000000101f5c30e kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.$invoke(){}#internal + 78
24 ComposeMultiplatform 0x0000000101f5e6dd _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f72652f6f70742f6275696c644167656e742f776f726b2f343465633665383530643563363366302f6b6f746c696e782d636f726f7574696e65732d636f72652f6e617469766544617277696e2f7372632f44697370617463686572732e6b74_knbridge4 + 253
25 libdispatch.dylib 0x0000000106af754f _dispatch_call_block_and_release + 12
26 libdispatch.dylib 0x0000000106af87ec _dispatch_client_callout + 8
27 libdispatch.dylib 0x0000000106afb304 _dispatch_queue_override_invoke + 1488
28 libdispatch.dylib 0x0000000106b0d8d7 _dispatch_root_queue_drain + 414
29 libdispatch.dylib 0x0000000106b0e57c _dispatch_worker_thread2 + 278
30 libsystem_pthread.dylib 0x00007ff837749c0f _pthread_wqthread + 257
31 libsystem_pthread.dylib 0x00007ff837748bbf start_wqthread + 15
Thread Performance Checker: Thread running at QOS_CLASS_USER_INITIATED waiting on a thread without a QoS class specified. Investigate ways to avoid priority inversions
PID: 35508, TID: 1804278
Backtrace

3 ComposeMultiplatform 0x0000000103279f12 _ZN15SkResourceCache21GetDiscardableFactoryEv + 50
4 ComposeMultiplatform 0x00000001031c38e6 _ZN13SkBitmapCache5AllocERK17SkBitmapCacheDescRK11SkImageInfoP8SkPixmap + 86
5 ComposeMultiplatform 0x00000001032cb49c _ZNK12SkImage_Lazy11getROPixelsEP15GrDirectContextP8SkBitmapN7SkImage11CachingHintE + 316
6 ComposeMultiplatform 0x00000001031c4d68 _ZN14SkBitmapDevice13drawImageRectEPK7SkImagePK6SkRectRS4_RK17SkSamplingOptionsRK7SkPaintN8SkCanvas17SrcRectConstraintE + 88
7 ComposeMultiplatform 0x00000001031e6c39 _ZN8SkCanvas16onDrawImageRect2EPK7SkImageRK6SkRectS5_RK17SkSamplingOptionsPK7SkPaintNS_17SrcRectConstraintE + 409
8 ComposeMultiplatform 0x00000001038006c6 org_jetbrains_skia_Canvas__1nDrawImageRect + 118
9 ComposeMultiplatform 0x000000010216f9a1 kfun:org.jetbrains.skia.Canvas#drawImageRect(org.jetbrains.skia.Image;org.jetbrains.skia.Rect;org.jetbrains.skia.Rect;org.jetbrains.skia.SamplingMode;org.jetbrains.skia.Paint?;kotlin.Boolean){}org.jetbrains.skia.Canvas + 1057
10 ComposeMultiplatform 0x000000010216f521 kfun:org.jetbrains.skia.Canvas#drawImage(org.jetbrains.skia.Image;kotlin.Float;kotlin.Float){}org.jetbrains.skia.Canvas + 801
11 ComposeMultiplatform 0x00000001022e85e0 kfun:androidx.compose.ui.graphics.toBitmap#internal + 688
12 ComposeMultiplatform 0x00000001022e7d2f kfun:androidx.compose.ui.graphics#toComposeImageBitmap__at__org.jetbrains.skia.Image(){}androidx.compose.ui.graphics.ImageBitmap + 159
13 ComposeMultiplatform 0x0000000102cee9db kfun:io.kamel.image.decoder.ImageBitmapDecoder.$decodeCOROUTINE$0.invokeSuspend#internal + 1067
14 ComposeMultiplatform 0x0000000102ceecc7 kfun:io.kamel.image.decoder.ImageBitmapDecoder#decode#suspend(io.ktor.utils.io.ByteReadChannel;io.kamel.core.config.ResourceConfig;kotlin.coroutines.Continuation<androidx.compose.ui.graphics.ImageBitmap>){}kotlin.Any + 503
15 ComposeMultiplatform 0x0000000102b7c085 kfun:io.kamel.core.object-3.$collect$lambda$0COROUTINE$2.invokeSuspend#internal + 2005
16 ComposeMultiplatform 0x0000000102b7cb4c kfun:io.kamel.core.object-3.collect$lambda$0#internal + 700
17 ComposeMultiplatform 0x0000000102b7cc5a kfun:io.kamel.core.object-3.$collect$lambda$0$FUNCTION_REFERENCE$10.emit#internal + 186
18 ComposeMultiplatform 0x0000000101ee5730 kfun:kotlinx.coroutines.flow.$emitAllImplCOROUTINE$0.invokeSuspend#internal + 1472
19 ComposeMultiplatform 0x0000000101d164c1 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 849
20 ComposeMultiplatform 0x0000000101f208f5 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 3637
21 ComposeMultiplatform 0x0000000101f5c194 kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.dispatch$lambda$0#internal + 148
22 ComposeMultiplatform 0x0000000101f5c22e kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 78
23 ComposeMultiplatform 0x0000000101f5c30e kfun:kotlinx.coroutines.DarwinGlobalQueueDispatcher.$dispatch$lambda$0$FUNCTION_REFERENCE$0.$invoke(){}#internal + 78
24 ComposeMultiplatform 0x0000000101f5e6dd _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f72652f6f70742f6275696c644167656e742f776f726b2f343465633665383530643563363366302f6b6f746c696e782d636f726f7574696e65732d636f72652f6e617469766544617277696e2f7372632f44697370617463686572732e6b74_knbridge4 + 253
25 libdispatch.dylib 0x0000000106af754f _dispatch_call_block_and_release + 12
26 libdispatch.dylib 0x0000000106af87ec _dispatch_client_callout + 8
27 libdispatch.dylib 0x0000000106afb304 _dispatch_queue_override_invoke + 1488
28 libdispatch.dylib 0x0000000106b0d8d7 _dispatch_root_queue_drain + 414
29 libdispatch.dylib 0x0000000106b0e57c _dispatch_worker_thread2 + 278
30 libsystem_pthread.dylib 0x00007ff837749c0f _pthread_wqthread + 257
31 libsystem_pthread.dylib 0x00007ff837748bbf start_wqthread + 15

After rebuilding the project, it worked