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

App Crashes on DocumentFilter.getMagicFilter(bitmap) #2

Open
Melhosh opened this issue Dec 10, 2021 · 8 comments
Open

App Crashes on DocumentFilter.getMagicFilter(bitmap) #2

Melhosh opened this issue Dec 10, 2021 · 8 comments

Comments

@Melhosh
Copy link

Melhosh commented Dec 10, 2021

Hello,
App crashes on DocumentFilter.getMagicFilter(bitmap) and DocumentFilter.getShadowRemoval(bitmap) filters.
Below the Crash log:

E/pdf.scanner.ap: No implementation found for long org.opencv.imgproc.Imgproc.createCLAHE_2() (tried Java_org_opencv_imgproc_Imgproc_createCLAHE_12 and Java_org_opencv_imgproc_Imgproc_createCLAHE_12__)
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
    Process: com.pdf.scanner.app, PID: 760
    java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.imgproc.Imgproc.createCLAHE_2() (tried Java_org_opencv_imgproc_Imgproc_createCLAHE_12 and Java_org_opencv_imgproc_Imgproc_createCLAHE_12__)
        at org.opencv.imgproc.Imgproc.createCLAHE_2(Native Method)
        at org.opencv.imgproc.Imgproc.createCLAHE(Imgproc.java:806)
@Melhosh
Copy link
Author

Melhosh commented Dec 11, 2021

Hello @garg-lucifer
Have you got a chance to check the above issue?

@garg-lucifer
Copy link
Owner

Hey, can you help me reproduce that error? Is it giving errors for every single image or some specific images? Can you send me some images for which it is failing so that I can reproduce that?

@Melhosh
Copy link
Author

Melhosh commented Dec 11, 2021

It is happening for every single image.
Android 11
Samsung Note 10

@garg-lucifer
Copy link
Owner

I'm sorry but currently, I don't know what's the issue. It's running fine on my Android & I can't reproduce the error either.

@MuSHaKS
Copy link

MuSHaKS commented Jan 5, 2022

i have the same errors. -_-

@garg-lucifer
Copy link
Owner

Hey, @MuSHaKS if possible can you share your project's build.gradle file for app and module level?

@MuSHaKS
Copy link

MuSHaKS commented Jan 5, 2022

Hey @garg-lucifer , Please find the below app build.gradle:

plugins {
id 'com.android.application'
}

android {
compileSdk 31

defaultConfig {
    applicationId "com.altawfeerhyper.archivesystem"
    minSdk 21
    targetSdk 31
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
    viewBinding true
    dataBinding true
}

}

dependencies {

implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
implementation 'androidx.preference:preference:1.1.1' // for preference layouts
implementation 'androidx.exifinterface:exifinterface:1.3.3' // for check rotate device
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// Image document filter
implementation 'com.github.garg-lucifer:AndroidDocumentFilter:0.7.0'
// for document scanner
implementation project(path: ':documentscanner')
implementation project(':openCVLibrary')

//ZXing  Barcode scanner
implementation 'com.journeyapps:zxing-android-embedded:3.3.0'
// image zooming
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
// for edit text layout preferencex
implementation 'com.takisoft.preferencex:preferencex:1.1.0'

def room_version = "2.4.0"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"

def lifecycle_version = "2.4.0"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version" 
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version"

//Volley
implementation 'com.android.volley:volley:1.2.1'
//Toast
implementation 'com.github.GrenderG:Toasty:1.5.0'
//Gson
implementation 'com.google.code.gson:gson:2.8.6'

}

@garg-lucifer
Copy link
Owner

Hey @MuSHaKS I have created another project LibraryTesting in which I tried to replicate your project by adding all the dependencies you've used except implementation project(path: ':documentscanner') implementation project(':openCVLibrary') these two because my library already uses OpenCVLibrary and it's working fine currently on every filter. It would be great if you can fork LibraryTesting and if you can reproduce that error on your end so I can at least replicate that on my end and try to solve it. Also, I know that these two libraries might be imp to you but can you once remove them and try to test again if it works and let me know?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants