Lollipop 5.1 (API 22) app crashes on OpenCV init 2.4.13

asked 2017-03-09 17:02:30 -0500

updated 2017-03-09 19:05:55 -0500

Lollipop 5.1 (API 22) app crashes on OpenCV init 2.4.11 with next error:

03-09 23:01:30.944 28467-28467/com.example.myapp E/MTPROF: mtprof entry can not be found!
 java.io.FileNotFoundException: /proc/mtprof/status: open failed: ENOENT (No such file or directory)
     at libcore.io.IoBridge.open(IoBridge.java:496)
     at java.io.FileInputStream.<init>(FileInputStream.java:76)
     at java.io.FileInputStream.<init>(FileInputStream.java:103)
     at android.app.ActivityThread.attach(ActivityThread.java:5464)
     at android.app.ActivityThread.main(ActivityThread.java:5666)
     at java.lang.reflect.Method.invoke(Native Method)
     at java.lang.reflect.Method.invoke(Method.java:372)
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
  Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
     at libcore.io.Posix.open(Native Method)
     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
     at libcore.io.IoBridge.open(IoBridge.java:482)
     at java.io.FileInputStream.<init>(FileInputStream.java:76) 
     at java.io.FileInputStream.<init>(FileInputStream.java:103) 
     at android.app.ActivityThread.attach(ActivityThread.java:5464) 
     at android.app.ActivityThread.main(ActivityThread.java:5666) 
     at java.lang.reflect.Method.invoke(Native Method) 
     at java.lang.reflect.Method.invoke(Method.java:372) 
     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959) 
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

Error happens here

OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_11, mContext, loaderCallback);

Works ok on 4.4.4 (API 19)

Any ideas why it happens?

5.1 - Meizu M2 4.4.4 - Samsung S Advanced (GT-i9070)

Also tried using static method (without OpenCV manager when commenting OpenCVLoader.initAsync) and still got same error

edit retag flag offensive close merge delete