title: Open CV java.lang.UnsatisfiedLinkError: n_Mat randomly happening
body: <p>I've got an app on the market using openCV with something like 300.000 downloads. I often got a crash report (maybe 1 user out of 50) with this error (never got this bug myself on Wildfire, Nexus 4/One/S):</p>
  
  <blockquote>
    <p>java.lang.UnsatisfiedLinkError: n_Mat at
    org.opencv.core.Mat.n_Mat(Native Method) at
    org.opencv.core.Mat.(Mat.java:471) at
    org.opencv.android.JavaCameraView.initializeCamera(JavaCameraView.java:382)
    at
    org.opencv.android.JavaCameraView.connectCamera(JavaCameraView.java:450)
    at
    org.opencv.android.CameraBridgeViewBase.onEnterStartedState(CameraBridgeViewBase.java:397)
    at
    org.opencv.android.CameraBridgeViewBase.processEnterState(CameraBridgeViewBase.java:355)
    at
    org.opencv.android.CameraBridgeViewBase.checkCurrentState(CameraBridgeViewBase.java:348)
    at
    org.opencv.android.CameraBridgeViewBase.surfaceChanged(CameraBridgeViewBase.java:223)
    at android.view.SurfaceView.updateWindow(SurfaceView.java:558) at
    android.view.SurfaceView.dispatchDraw(SurfaceView.java:350) at
    android.view.ViewGroup.drawChild(ViewGroup.java:1644) at
    android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) at
    android.view.ViewGroup.drawChild(ViewGroup.java:1644) at
    android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) at
    android.view.View.draw(View.java:6883) at
    android.widget.FrameLayout.draw(FrameLayout.java:357) at
    android.view.ViewGroup.drawChild(ViewGroup.java:1646) at
    android.view.ViewGroup.dispatchDraw(ViewGroup.java:1373) at
    android.view.View.draw(View.java:6883) at
    android.widget.FrameLayout.draw(FrameLayout.java:357) at
    com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1921)
    at android.view.ViewRoot.draw(ViewRoot.java:1528) at
    android.view.ViewRoot.performTraversals(ViewRoot.java:1264) at
    android.view.ViewRoot.handleMessage(ViewRoot.java:1866) at
    android.os.Handler.dispatchMessage(Handler.java:99) at
    android.os.Looper.loop(Looper.java:130) at
    android.app.ActivityThread.main(ActivityThread.java:3687) at
    java.lang.reflect.Method.invokeNative(Native Method) at
    java.lang.reflect.Method.invoke(Method.java:507) at
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) at
    dalvik.system.NativeStart.main(Native Method)</p>
  </blockquote>
  
  <p>I use static initialization for OpenCV (as I don't want my users to download other app when installing my app) and copied all the needed libs .so in <code>armeabi</code>, <code>armeabi-v7a</code>, <code>mips</code>, <code>x86</code>.</p>
  
  <p>Also I know the crash happens when the activity starts and the most on this devices (don't know if this could be device related): ALCATEL ONE TOUCH 985N (one_touch_985N_gsm), Nexus One (passion), Galaxy Ace (GT-S5830D)...</p>
  
  <p>Thank you</p>