Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get the Bitmap when Capturable includes Network image #7

Closed
jeluchu opened this issue Jan 18, 2022 · 18 comments · Fixed by #9 or #11
Closed

Can't get the Bitmap when Capturable includes Network image #7

jeluchu opened this issue Jan 18, 2022 · 18 comments · Fixed by #9 or #11
Labels
bug Something isn't working
Milestone

Comments

@jeluchu
Copy link

jeluchu commented Jan 18, 2022

Hello!! When I press the button where I have the controller.capture function, I get the same error all the time, at first I thought I had something wrong configured, I cloned the repository to see the example, and I had it similar, but the example does not give me the same error as me

Error obtained

java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps

Capturable

                        Capturable(
                            modifier = Modifier.constrainAs(ivLetterImage) {
                                linkTo(parent.start, parent.end)
                                linkTo(parent.top, tvAddressee.top)
                                width = Dimension.fillToConstraints
                            },
                            controller = controller,
                            onCaptured = { bitmap, error ->
                                //ticketBitmap = bitmap
                                error
                                context.share(
                                    nameOfImage = letters,
                                    message = "",
                                    bitmap = bitmap?.asAndroidBitmap().orEmpty()
                                )
                            }
                        ) {
                            LetterImage(
                                addressee = addressee.value.text,
                                message = message.value.text,
                                sender = sender.value.text,
                                letterImage = letterImage
                            )
                        }

LetterImage Composable

@ExperimentalFoundationApi
@Composable
fun LetterImage(
    modifier: Modifier = Modifier,
    addressee: String,
    message: String,
    sender: String,
    letterImage: String
) {

    ConstraintLayout(
        modifier = modifier
    ) {

        val (
            ivLetter,
            tvAddressee,
            tvMessage,
            tvSender
        ) = createRefs()

        NetworkImage(
            modifier = Modifier
                .wrapContentHeight()
                .fillMaxWidth()
                .constrainAs(ivLetter) {
                    linkTo(parent.start, parent.end)
                    linkTo(parent.top, parent.bottom)
                },
            contentScale = ContentScale.Crop,
            url = letterImage,
            builder = {
                crossfade(true)
            }
        )

        Text(
            text = addressee,
            maxLines = 1,
            color = lightGreyPastel,
            fontWeight = FontWeight.Bold,
            style = TypographyNook.h6,
            modifier = Modifier
                .padding(top = 30.dp, start = 40.dp)
                .constrainAs(tvAddressee) {
                    start.linkTo(parent.start)
                    top.linkTo(ivLetter.top)
                }
        )

        Text(
            text = message,
            maxLines = 7,
            color = lightGreyPastel,
            fontWeight = FontWeight.Bold,
            style = TypographyNook.h6,
            modifier = Modifier
                .padding(top = 20.dp, start = 60.dp, end = 60.dp)
                .constrainAs(tvMessage) {
                    linkTo(parent.start, parent.end)
                    top.linkTo(tvAddressee.bottom)
                    bottom.linkTo(tvSender.top)
                }
        )

        Text(
            text = sender, //16,
            maxLines = 1,
            color = lightGreyPastel,
            fontWeight = FontWeight.Bold,
            style = TypographyNook.h6,
            modifier = Modifier
                .padding(top = 20.dp, bottom = 30.dp, end = 40.dp)
                .constrainAs(tvSender) {
                    end.linkTo(parent.end)
                    linkTo(tvMessage.bottom, parent.bottom)
                }
        )

    }

}
@PatilShreyas
Copy link
Owner

@jeluchu can you provide full stacktrace? It doesn't look like issue of this library

@jeluchu
Copy link
Author

jeluchu commented Jan 20, 2022

Yes @PatilShreyas, here I show you the log and also the function I do to send the bitmap, there is a bug in val uri = Uri.parse(path) because as such the bitmap generated by Capturable gives me full (as far as I have seen debugging).

When the bitmap is generated what I do is a function to share that generated image

When bitmap

context.share(
   nameOfImage = letters,
   message = "",
   bitmap = bitmap?.asAndroidBitmap().orEmpty()
)

Extension

@Suppress("DEPRECATION")
fun Context.share(
    nameOfImage: String,
    message: String,
    bitmap: Bitmap
) {

    val bytes = ByteArrayOutputStream()
    bitmap.compress(Bitmap.CompressFormat.PNG, 100, bytes)
    val path = MediaStore.Images.Media.insertImage(contentResolver, bitmap, nameOfImage, null)
    val uri = Uri.parse(path)

    val shareIntent = Intent()
    shareIntent.action = Intent.ACTION_SEND
    shareIntent.putExtra(Intent.EXTRA_TEXT, message)
    shareIntent.putExtra(Intent.EXTRA_STREAM, uri)
    shareIntent.type = INTENT_TYPE_IMG_PNG
    shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
    startActivity(Intent.createChooser(shareIntent, "send"))

}

Log

2022-01-20 14:27:03.816 8540-8540/com.jeluchu.inook E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.jeluchu.inook, PID: 8540
    java.lang.NullPointerException: uriString
        at android.net.Uri$StringUri.<init>(Uri.java:507)
        at android.net.Uri$StringUri.<init>(Uri.java:497)
        at android.net.Uri.parse(Uri.java:469)
        at com.jeluchu.inook.core.extensions.context.ContextExensionsGettersKt.share(ContextExensionsGetters.kt:46)
        at com.jeluchu.inook.features.letters.view.LetterBuilderKt$LetterBuilder$2$1$1$2.invoke(LetterBuilder.kt:122)
        at com.jeluchu.inook.features.letters.view.LetterBuilderKt$LetterBuilder$2$1$1$2.invoke(LetterBuilder.kt:112)
        at dev.shreyaspatil.capturable.CapturableKt$applyCapturability$1$1$1$3.invokeSuspend(Capturable.kt:102)
        at dev.shreyaspatil.capturable.CapturableKt$applyCapturability$1$1$1$3.invoke(Unknown Source:11)
        at dev.shreyaspatil.capturable.CapturableKt$applyCapturability$1$1$1$3.invoke(Unknown Source:6)
        at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:114)
        at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1$1.invokeSuspend(Unknown Source:15)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
        at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
        at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7839)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

@PatilShreyas
Copy link
Owner

The log which you shared here is about NullPointerException occurring in your code which is related to uriString variable.

For saving bitmap, you can refer to this code

fun saveBitmap(context: Context, bitmap: Bitmap, filename: String = DEFAULT_FILENAME): Uri? {
    val contentValues = ContentValues().apply {
        put(MediaStore.MediaColumns.DISPLAY_NAME, filename)
        put(MediaStore.MediaColumns.MIME_TYPE, "image/jpeg")

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
            put(MediaStore.MediaColumns.RELATIVE_PATH, Environment.DIRECTORY_PICTURES)
        }
    }

    val contentResolver = context.contentResolver

    val imageUri: Uri? = contentResolver.insert(
        MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
        contentValues
    )

    return imageUri.also {
        val fileOutputStream = imageUri?.let { contentResolver.openOutputStream(it) }
        bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fileOutputStream)
        fileOutputStream?.close()
    }
}

Closing this issue since this doesn't looks like associated with the library.

@jeluchu
Copy link
Author

jeluchu commented Jan 20, 2022

But the problem is not that @PatilShreyas, since I am using that function that I was showing you in another area and it works without problems, when capturing the bitmap, it always comes as null, so I can't save the bitmap in any case

There you can see the real problem, the bitmap is null and error shows a different message

Image of the debugging problem

@PatilShreyas
Copy link
Owner

Oh okay @jeluchu, if that's the issue then reopening this issue. Can you give me details like on which device you're testing and all?

@PatilShreyas PatilShreyas reopened this Jan 20, 2022
@jeluchu
Copy link
Author

jeluchu commented Jan 20, 2022

I am currently testing on a simulator, Pixel 4 XL with API Level 31, I also tested with a physical device of the brand BQ X Pro with API Level 30, but I had the same result. If you need any other details, please let me know @PatilShreyas

@PatilShreyas
Copy link
Owner

PatilShreyas commented Jan 20, 2022

Can you send me the project sample on which this issue is occurring? Maybe a zip of the project? (If works for you)

@jeluchu
Copy link
Author

jeluchu commented Jan 20, 2022

I would have to try to make a project from scratch, since I implemented the library in one of the apps I have made in compose and published in the Play Store. Maybe in a zero development it will work, but in the current development I have it is not working correctly as I have indicated before

@jeluchu
Copy link
Author

jeluchu commented Jan 23, 2022

@PatilShreyas I have discovered something about this error that I pointed out to you

My composable LetterImage contains another composable I have which is NetworkImage

NetworkImage

@Composable
fun NetworkImage(
    url: Any,
    modifier: Modifier = Modifier,
    isOriginalSize: Boolean = false,
    isCrossfade: Boolean = true,
    contentScale: ContentScale = ContentScale.Crop
) {

    Image(
        painter = rememberImagePainter(
            data = url,
            builder = {
                if (isOriginalSize) size(OriginalSize)
                crossfade(isCrossfade)
            }
        ),
        contentDescription = null,
        modifier = modifier,
        contentScale = contentScale
    )

}

NetworkImage is a component I have for uploading images together with the Coil library, with which you can pass a url to upload an image from the internet.

I've been making several modifications inside the composable I want to capture (LetterImage) and I always get the same error:

java.lang.IllegalArgumentException: Software rendering doesn't support hardware bitmaps.

So I tried to remove the composable NetworkImage that remotely loads the background image, and it works.

From what I've seen, the incompatibility is with the images that are uploaded over the internet and it's not able to capture them with the full Composable.

I don't know if your library is really compatible, or if there is already a way to make this work with images uploaded over the internet.

I hope I've explained correctly what I've discovered, and that you can shed some more light on this problem.

Thank you very much!

@PatilShreyas
Copy link
Owner

Thanks @jeluchu for the detailed info, will look into it.

@PatilShreyas PatilShreyas changed the title Cannot get the bitmap with Capturable Can't get the Bitmap when Capturable includes Network image Jan 23, 2022
@PatilShreyas PatilShreyas added this to the v1.0.1 milestone Jan 23, 2022
@PatilShreyas PatilShreyas added the bug Something isn't working label Jan 23, 2022
@PatilShreyas
Copy link
Owner

PatilShreyas commented Jan 23, 2022

As mentioned here: #9 (comment)

Crash IllegalArgumentException: Software rendering doesn't support hardware bitmaps on capturing Bitmap of Composable including network image (such as Glide, Picasso, Coil). This issue was occurring on devices above Android Oreo (API 26+) in which drawing Bitmap from Canvas causes such issues while drawing hardware-generated Bitmap (i.e. image loaded from the network). The solution is to use PixelCopy API on the devices having API version 26+ for generating Bitmap from View by copying "specific" Surface area pixels into the Bitmap.

Thanks, @jeluchu for this helpful finding and for making it better 😀. This will be released in v1.0.2

PatilShreyas added a commit that referenced this issue Jan 23, 2022
Fix #7: IllegalArgumentException: Software rendering doesn't support hardware bitmaps
@jeluchu
Copy link
Author

jeluchu commented Jan 23, 2022

Thank you very much @PatilShreyas !
I'm glad to hear that the problem was finally found and solved, I'll be looking forward to version 1.0.2 😄

@PatilShreyas PatilShreyas linked a pull request Jan 23, 2022 that will close this issue
@PatilShreyas
Copy link
Owner

@jeluchu This has been released in v1.0.2

@jeluchu
Copy link
Author

jeluchu commented Jan 23, 2022

I have just tested it and it works fine, thank you very much again @PatilShreyas! 🎊

@thaiquoctoanvn
Copy link

thaiquoctoanvn commented Nov 24, 2022

Hi @PatilShreyas, I am using your v1.0.3 library and still encounter with this error. The bitmap returned in callback is always null.

image

I have run my code in emulator device on Android O (API 26). Any suggestions for me to solve this matter?

@thaiquoctoanvn
Copy link

thaiquoctoanvn commented Nov 24, 2022

This is my brief of composition structure. The imageUri is the uri of an image from image gallery

       Capturable(
                    controller = captureController,
                    onCaptured = { bitmap, error ->
                        bitmap?.let {
                            loadingObserver.value = true
                        }
                        error?.let {
                            it.printStackTrace()
                            isImageSaveOk = false
                            shouldShowSnackbar.value = true
                        }
                    }
                ) {
                    Box(
                        modifier = Modifier
                            .fillMaxWidth()
                            .aspectRatio(1f)
                            .customGradient(
                                colors = selectedColorScheme.value!!.colors,
                                angle = 135f
                            )
                            .onSizeChanged {
                                boundarySize.value = it
                            },
                        contentAlignment = Alignment.Center,
                    ) {
                        Box(
                            modifier = Modifier
                                .padding(8.dp)
                                .fillMaxSize() 
                            contentAlignment = Alignment.Center
                        ) {
                            AsyncImage(
                                modifier = Modifier
                                    .fillMaxSize()
                                    .clip(shape = RoundedCornerShape(8.dp))
                                model = imageUri,
                                contentDescription = "",
                                filterQuality = FilterQuality.High
                            )
                        }
                    }
                }

@thaiquoctoanvn
Copy link

thaiquoctoanvn commented Nov 24, 2022

Here is the full log of the exception. Hope to see your response as soon as possible @PatilShreyas

W/System.err: java.lang.IllegalStateException: Software rendering doesn't support hardware bitmaps
W/System.err:     at android.graphics.BaseCanvas.throwIfHwBitmapInSwMode(BaseCanvas.java:532)
W/System.err:     at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:62)
W/System.err:     at android.graphics.BaseCanvas.drawBitmap(BaseCanvas.java:120)
W/System.err:     at android.graphics.Canvas.drawBitmap(Canvas.java:1434)
W/System.err:     at androidx.compose.ui.graphics.AndroidCanvas.drawImageRect-HPBpro0(AndroidCanvas.android.kt:271)
W/System.err:     at androidx.compose.ui.graphics.drawscope.CanvasDrawScope.drawImage-AZ2fEMs(CanvasDrawScope.kt:263)
W/System.err:     at androidx.compose.ui.node.LayoutNodeDrawScope.drawImage-AZ2fEMs(Unknown Source:38)
W/System.err:     at androidx.compose.ui.graphics.drawscope.DrawScope.drawImage-AZ2fEMs$default(DrawScope.kt:510)
W/System.err:     at androidx.compose.ui.graphics.painter.BitmapPainter.onDraw(BitmapPainter.kt:93)
W/System.err:     at androidx.compose.ui.graphics.painter.Painter.draw-x_KDEd0(Painter.kt:212)
W/System.err:     at coil.compose.AsyncImagePainter.onDraw(AsyncImagePainter.kt:210)
W/System.err:     at androidx.compose.ui.graphics.painter.Painter.draw-x_KDEd0(Painter.kt:212)
W/System.err:     at coil.compose.ContentPainterModifier.draw(ContentPainterModifier.kt:189)
W/System.err:     at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:376)
W/System.err:     at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:371)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:124)
W/System.err:     at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:110)
W/System.err:     at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:273)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:355)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:124)
W/System.err:     at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:110)
W/System.err:     at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:273)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:355)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:124)
W/System.err:     at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:110)
W/System.err:     at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:273)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:355)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:839)
W/System.err:     at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:124)
W/System.err:     at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:110)
W/System.err:     at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:273)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:355)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:839)
W/System.err:     at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
W/System.err:     at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent(LayoutNodeDrawScope.kt:64)
W/System.err:     at androidx.compose.ui.draw.DrawBackgroundModifier.draw(DrawModifier.kt:105)
W/System.err:     at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:376)
W/System.err:     at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:92)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:371)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:236)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:397)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator$invoke$1.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:124)
W/System.err:     at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:110)
W/System.err:     at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:120)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:396)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.invoke(NodeCoordinator.kt:58)
W/System.err:     at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:273)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:355)
W/System.err:     at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:839)
W/System.err:     at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:151)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:368)
W/System.err:     at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:360)
W/System.err:     at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:839)
W/System.err:     at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:1003)
W/System.err:     at android.view.View.draw(View.java:19126)
W/System.err:     at android.view.View.draw(View.java:18993)
W/System.err:     at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
W/System.err:     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
W/System.err:     at android.view.View.draw(View.java:19126)
W/System.err:     at androidx.core.view.ViewKt.drawToBitmap(View.kt:240)
W/System.err:     at dev.shreyaspatil.capturable.CapturableKt.drawToBitmapPostLaidOut(Capturable.kt:130)
W/System.err:     at dev.shreyaspatil.capturable.CapturableKt.access$drawToBitmapPostLaidOut(Capturable.kt:1)
W/System.err:     at dev.shreyaspatil.capturable.CapturableKt$applyCapturability$1$1$1$invokeSuspend$$inlined$mapNotNull$1$2.emit(Emitters.kt:114)
W/System.err:     at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:383)
W/System.err:     at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(Unknown Source:12)
W/System.err:     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/System.err:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
W/System.err:     at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
W/System.err:     at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
W/System.err:     at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
W/System.err:     at android.os.Handler.handleCallback(Handler.java:789)
W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:98)
W/System.err:     at android.os.Looper.loop(Looper.java:164)
W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6541)
W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
W/System.err:     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

@abinhho
Copy link

abinhho commented Aug 9, 2023

PixelCopy made another issue: #101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants