Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

[BUG] Crash on VisionImageProcessorSingleBase$startDetection$2.onComplete() #29

Closed
mrahimygk opened this issue Jan 7, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mrahimygk
Copy link

mrahimygk commented Jan 7, 2020

Lib leads to a crash on uk.co.brightec.kbarcode.processor.base.VisionImageProcessorSingleBase$startDetection$2.onComplete(VisionImageProcessorSingleBase.java:4)

Tested on Huawei Honor 8X

To Reproduce
Steps to reproduce the behavior:
Adding the BarcodeView in kotlin code:

        this?.activity?.let {
        val barcodeView = BarcodeView(it)
        barcodeView.apply {
            setOptions(
                Options.Builder()
                    .cameraFacing(CameraCharacteristics.LENS_FACING_BACK)
                    .barcodeFormats(
                        intArrayOf(
                            Barcode.FORMAT_CODE_128,
                            Barcode.FORMAT_CODE_39,
                            Barcode.FORMAT_CODE_93
                        )
                    )
                    .barcodesSort(null)
                    .scaleType(BarcodeView.CENTER_CROP)
                    .build()
            )
            this.layoutParams =
                FrameLayout.LayoutParams(
                    FrameLayout.LayoutParams.MATCH_PARENT,
                    FrameLayout.LayoutParams.MATCH_PARENT
                )
            layout.addView(this)
            lifecycle.addObserver(this)
        }
        }

Expected behavior
Showing the camera canvas

Smartphone:

  • Device: Huawei Honor 8X

Additional context
This is the crashlytics message:

Fatal Exception: x.b
at uk.co.brightec.kbarcode.processor.base.VisionImageProcessorSingleBase$startDetection$2.onComplete(VisionImageProcessorSingleBase.java:4)
at com.google.android.gms.tasks.zzj.run(zzj.java:6)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)

@mrahimygk mrahimygk added the bug Something isn't working label Jan 7, 2020
@mrahimygk mrahimygk changed the title [BUG] Crash [BUG] Crash on VisionImageProcessorSingleBase$startDetection$2.onComplete() Jan 7, 2020
@alistairsykes
Copy link
Contributor

Hi @m-rahimy ,

Which version of the library are you using? Have you tried out a newer version?

I have had a go at reproducing this with no success. Is this crash happening consistently? Is it happening on any other devices for you?

@alistairsykes alistairsykes self-assigned this Mar 11, 2020
@alistairsykes
Copy link
Contributor

Closing due to inactive

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

No branches or pull requests

2 participants