klippa-app/react-native-klippa-scanner-sdk

Fatal Exception: java.lang.IllegalArgumentException: Comparison method violates its general contract!

Closed this issue · 5 comments

Hi,

The SDK is running in production and we receive this issue from Android.

Fatal Exception: java.lang.IllegalArgumentException: Comparison method violates its general contract!
       at java.util.TimSort.mergeLo(TimSort.java:777)
       at java.util.TimSort.mergeAt(TimSort.java:514)
       at java.util.TimSort.mergeCollapse(TimSort.java:439)
       at java.util.TimSort.sort(TimSort.java:245)
       at java.util.Arrays.sort(Arrays.java:1492)
       at java.util.ArrayList.sort(ArrayList.java:1470)
       at java.util.Collections.sort(Collections.java:206)
       at com.klippa.scanner.internal.f.a(:204)
       at com.klippa.scanner.view.ReceiptRecogniserView$1.run(:31)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:919)

Regards,

Hi @Dallas62,

We have registered it in our internal issue tracker and going to look into it.
Can you perhaps give more information about the context when you get this error? (for example: scanning specific objects, scanning very dark areas).
Perhaps you can also give the config that you're using when launching the scanner (without the license)

Here the configuration:

                    License:KLIPPA_LICENCE,
                    ImageMaxWidth: 1400,
                    ImageMaxHeight: 1400,
                    ImageLimit: 1,
                    AllowMultipleDocuments: false,
                    DefaultMultipleDocuments: false,
                    MoveCloserMessage: i18n.t('document_scanner.move_closer'),
                    ImageLimitReachedMessage: i18n.t(
                        'document_scanner.image_limit_reached',
                    ),
                    ImageTooBrightMessage: i18n.t(
                        'document_scanner.image_too_bright',
                    ),
                    ImageTooDarkMessage: i18n.t(
                        'document_scanner.image_too_dark',
                    ),
                    Success: {
                        message: i18n.t('document_scanner.succes'),
                        previewDuration: 0.3,
                    },

                    PrimaryColor: '#FF992D',
                    AccentColor: '#6BD8A2',
                    OverlayColor: '#6BD8A2',
                    WarningBackgroundColor: '#F9B06C',
                    WarningTextColor: '#FFFFFF',

I don't have the context of the issue.

Thanks! I will let you know when we have fixed the bug :)

Hi @Dallas62,

Thank you again for reporting this issue. We just released a new KlippaScannerVersion 1.3.6 in which the issue should be resolved.

You are able to specify which version to use with the following instructions: https://github.com/klippa-app/react-native-klippa-scanner-sdk#how-to-use-a-specific-version-of-the-sdk

If there are any questions feel free to contact us.

I have also pushed version 0.1.5 of this plugin if you prefer to do that :)