OpenNoteScanner icon indicating copy to clipboard operation
OpenNoteScanner copied to clipboard

App crashes immediately after/while starting

Open HansCronau opened this issue 7 years ago • 12 comments

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

HansCronau avatar Jun 27 '18 07:06 HansCronau

Hi @HansCronau ,

can you post a logcat output here?

allgood avatar Jun 27 '18 13:06 allgood

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

HansCronau avatar Jun 27 '18 14:06 HansCronau

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

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

allgood avatar Jun 27 '18 15:06 allgood

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

jannis701 avatar Jul 07 '18 00:07 jannis701

@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.

allgood avatar Jul 08 '18 15:07 allgood

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!

jannis701 avatar Jul 08 '18 19:07 jannis701

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

allgood avatar Jul 08 '18 20:07 allgood

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
'''

jas4711 avatar Aug 07 '18 09:08 jas4711

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 avatar Aug 12 '18 11:08 fisx

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

fisx avatar Aug 12 '18 11:08 fisx

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

Tested with:

  • Open Note Scanner 1.0.31
  • OpenCV 3.4.1, 3.4.2 and 3.4.3 (same behaviour in all cases)

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

kaihil avatar Nov 05 '18 21:11 kaihil

@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.

allgood avatar Nov 05 '18 22:11 allgood