flutter-clutter / flutter-simple-edge-detection

A Flutter plugin enabling the user to detect edges of a given image. It returns the relative coordinates of the detection rectangle.
71 stars 47 forks source link

Run time(Out of Memory) error while using this package. #11

Closed abhishekove closed 4 years ago

abhishekove commented 4 years ago

E/cv::error()(25743): OpenCV(4.4.0) Error: Insufficient memory (Failed to allocate 396761445280 bytes) in OutOfMemoryError, file /build/master_pack-android/opencv/modules/core/src/alloc.cpp, line 73 E/libc++abi(25743): terminating with uncaught exception of type cv::Exception: OpenCV(4.4.0) /build/master_pack-android/opencv/modules/core/src/alloc.cpp:73: error: (-4:Insufficient memory) Failed to allocate 396761445280 bytes in function 'OutOfMemoryError' F/libc (25743): Fatal signal 6 (SIGABRT), code -6 in tid 26135 (DartWorker), pid 25743 (_app_docscanner)


Build fingerprint: 'Xiaomi/riva/riva:8.1.0/OPM1.171019.026/V11.0.2.0.OCKMIXM:user/release-keys' Revision: '0' ABI: 'arm64' pid: 25743, tid: 26135, name: DartWorker >>> com.dev.flutter_app_docscanner <<< signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- Abort message: 'terminating with uncaught exception of type cv::Exception: OpenCV(4.4.0) /build/master_pack-android/opencv/modules/core/src/alloc.cpp:73: error: (-4:Insufficient memory) Failed to allocate 396761445280 bytes in function 'OutOfMemoryError' ' x0 0000000000000000 x1 0000000000006617 x2 0000000000000006 x3 0000000000000008 x4 fefefefefefeffee x5 fefefefefefeffee x6 fefefefefefeffee x7 7f7f7f7f7f7f7fff x8 0000000000000083 x9 d8990fa8bbd15576 x10 0000000000000000 x11 0000000000000001 x12 ffffffffffffffff x13 000000005f9804cc x14 00135f14cf2c6400 x15 00009bbecf145629 x16 0000005d0d39dfa8 x17 00000073d84ee598 x18 00000073336dad84 x19 000000000000648f x20 0000000000006617 x21 00000073298fdb68 x22 ffffff80ffffffc8 x23 00000073298fdc20 x24 00000073298fdb00 x25 00000073298fdb40 x26 0000007337858400 x27 000000732f33fb30 x28 0000000000000004 x29 00000073298fda70 x30 00000073d84a3df8 sp 00000073298fda30 pc 00000073d84a3e14 pstate 0000000060000000 backtrace:

00 pc 000000000001de14 /system/lib64/libc.so (abort+104)

#01 pc 000000000009ce88  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libc++_shared.so
#02 pc 000000000009d07c  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libc++_shared.so
#03 pc 00000000000aead0  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libc++_shared.so
#04 pc 00000000000ae3d8  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libc++_shared.so (__cxa_rethrow+196)
#05 pc 0000000000305174  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libopencv_java4.so (cv::Mat::create(int, int const*, int)+1316)
#06 pc 0000000000327d98  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libopencv_java4.so
#07 pc 000000000001ce64  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libnative_edge_detection.so (_ZNK2cv7MatExprcvNS_3MatEEv+96)
#08 pc 000000000001c9fc  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libnative_edge_detection.so (ImageProcessor::crop_and_transform(cv::Mat, float, float, float, float, float, float, float, float)+512)
#09 pc 000000000001c788  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libnative_edge_detection.so (ImageProcessor::process_image(cv::Mat, float, float, float, float, float, float, float, float)+136)
#10 pc 000000000000ef6c  /data/app/com.dev.flutter_app_docscanner-IsHbl2638h0fBP3Q2TWjlQ==/lib/arm64/libnative_edge_detection.so (process_image+640)
#11 pc 00000000000065a4  <anonymous:000000733b480000>

Lost connection to device.

mlopez0 commented 2 years ago

How did you fix this?