Ask Your Question

mat newMat = new Mat() crashes android app [closed]

asked 2017-01-24 20:55:13 -0500

marsfan gravatar image

The title pretty much sums it up. I have this chunk of code that runs fine, but when I try to create a mat, the entire app crashes.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by marsfan
close date 2017-01-27 08:43:10.792196



no it does not sum up anything.

your complaint is missing everything, from code, to context.

berak gravatar imageberak ( 2017-01-24 21:19:56 -0500 )edit

wild guess (you seem to be a typical noob): you're trying to execute opencv code, while the native dll's powering it are not loaded yet. (e.g. you're trying to run it from onCreate())

stacktrace, or this won't go anywhere.

berak gravatar imageberak ( 2017-01-24 21:31:50 -0500 )edit

I completely agree with @berak, without context, this is going nowhere ...

StevenPuttemans gravatar imageStevenPuttemans ( 2017-01-25 03:30:59 -0500 )edit

@berak you are right, I am a total noob at this. I was also exhausted when I wrote this post, so that made things worse. I am answering my own question, because I figured it out.

marsfan gravatar imagemarsfan ( 2017-01-26 15:35:02 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-27 08:42:38 -0500

marsfan gravatar image

So in a mixture of my noobness and exhaustion, I posted this question. After A good night's sleep, I realized that I just forgot to initialize opencv in the main activity of my android app.

I will close this and save everyone the trouble, sorry for your time.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-01-24 20:55:13 -0500

Seen: 448 times

Last updated: Jan 27 '17