allgood / OpenNoteScanner

Android application for scanning and manipulating handwritten notes and documents.
Other
1.36k stars 284 forks source link

App crashes immediately after/while starting #122

Open HansCronau opened 6 years ago

HansCronau commented 6 years ago

OpenNoteScanner crashes on me when I start it. Just before crashing it showes a first view of the camera.

Android 7.1.2 LineageOS 14.1 LG-D855

allgood commented 6 years ago

Hi @HansCronau ,

can you post a logcat output here?

HansCronau commented 6 years ago

@ctodobom, could you give specific instructions? Have Termux at my disposal.

allgood commented 6 years ago

you can use one of the options detailed on this site:

https://f-droid.org/en/docs/Getting_logcat_messages_after_crash/

jannis701 commented 6 years ago

I have the exact same issue. Android 5.0.1 Samsung Galaxy S4 (GT-I9505)

I attached the output of adb logcat *:Ewhen starting OpenNoteScanner

android-error-log.txt

allgood commented 6 years ago

@jannis701 ... can you confirm your OpenCV is on version 3.4? This is not the version used by Open Note Scanner, so, looks like it is a conflict with newer OpenCV versions.

jannis701 commented 6 years ago

Yes I did install OpenCV 3.4.1 (newest Version) manually, because I don't use the playstore. Thank you for the hint, using OpenCV 3.1.0 works for me!

allgood commented 6 years ago

Great... I am working on a fix, don't know if I will be able to solve, but I'm trying!

jas4711 commented 6 years ago

I have the same issue with OpenCV 3.4.2 on Replicant 6 and with Open Note Scanner 1.0.30 from fdroid. Crash log below if it helps. OpenCV 3.1.0 works fine.


08-07 10:51:44.250 16148 16167 E cv::error(): OpenCV(3.4.2) Error: Assertion failed (_dx.type() == (((3) & ((1 << 3) - 1)) + (((1)-1) << 3)) || _dx.type() == (((3) & ((1 << 3) - 1)) + (((3)-1) << 3))) in void cv::Canny(cv::InputArray, cv::InputArray, cv::OutputArray, double, double, bool), file /build/3_4_pack-android/opencv/modules/imgproc/src/canny.cpp, line 1062
08-07 10:51:44.250 16148 16167 E org.opencv.imgproc: imgproc::Canny_11() caught cv::Exception: OpenCV(3.4.2) /build/3_4_pack-android/opencv/modules/imgproc/src/canny.cpp:1062: error: (-215:Assertion failed) _dx.type() == (((3) & ((1 << 3) - 1)) + (((1)-1) << 3)) || _dx.type() == (((3) & ((1 << 3) - 1)) + (((3)-1) << 3)) in function 'void cv::Canny(cv::InputArray, cv::InputArray, cv::OutputArray, double, double, bool)'
08-07 10:51:44.250 16148 16167 E AndroidRuntime: FATAL EXCEPTION: Worker Thread
08-07 10:51:44.250 16148 16167 E AndroidRuntime: Process: com.todobom.opennotescanner, PID: 16148
08-07 10:51:44.250 16148 16167 E AndroidRuntime: Theme: themes:{}
08-07 10:51:44.250 16148 16167 E AndroidRuntime: CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.2) /build/3_4_pack-android/opencv/modules/imgproc/src/canny.cpp:1062: error: (-215:Assertion failed) _dx.type() == (((3) & ((1 << 3) - 1)) + (((1)-1) << 3)) || _dx.type() == (((3) & ((1 << 3) - 1)) + (((3)-1) << 3)) in function 'void cv::Canny(cv::InputArray, cv::InputArray, cv::OutputArray, double, double, bool)'
08-07 10:51:44.250 16148 16167 E AndroidRuntime: ]
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at org.opencv.imgproc.Imgproc.Canny_1(Native Method)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at org.opencv.imgproc.Imgproc.Canny(Imgproc.java:984)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at com.todobom.opennotescanner.ImageProcessor.findContours(ImageProcessor.java:497)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at com.todobom.opennotescanner.ImageProcessor.detectPreviewDocument(ImageProcessor.java:213)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at com.todobom.opennotescanner.ImageProcessor.processPreviewFrame(ImageProcessor.java:132)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at com.todobom.opennotescanner.ImageProcessor.handleMessage(ImageProcessor.java:89)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
08-07 10:51:44.250 16148 16167 E AndroidRuntime:    at android.os.HandlerThread.run(HandlerThread.java:61)
08-07 10:51:44.270  2357  2555 W ActivityManager:   Force finishing activity com.todobom.opennotescanner/.OpenNoteScannerActivity
'''
fisx commented 6 years ago

metoo. fairphone2, most recent lineageos, most recent version of open note scanner from f-droid. just tried everything from scratch. for me it crashes before the camera gets a chance to show anything.

fisx commented 6 years ago

(See also, at least from the title: #95)

kaihil commented 6 years ago

Same here (Sorry, cannot provide logcat output right now)

Tested with:

Android 6.0.1 LineageOS 13.20170328-UNOFFICIAL-golden Samsung S3 mini GT-I8190

allgood commented 6 years ago

@kaihil , you need to install opencv 3.1 available on https://github.com/ctodobom/opencv/releases or let Open Note Scanner install it. Code will not work with newer versions.