Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Shulz
, 1 year ago
Attempt to invoke virtual method 'org.opencv.core.Mat org.opencv.core.Mat.submat(org.opencv.core.Rect)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'org.opencv.core.Mat org.opencv.core.Mat.submat(org.opencv.core.Rect)' on a null object reference	at com.example.backup.contour_image.MainActivity.onTouch(MainActivity.java:103)	at android.view.View.dispatchTouchEvent(View.java:9406)	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2668)	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2257)