I am trying to process bitmap images from frames that I captured from MediaMetadataretriever using my own function. But I got a fatal crash saying
SIGNAL 11 (SIGSEGV) at 0x422d8f20 (code=2) SIGNAL 11 (SIGSEGV) at 0x42311320 (code=2)
I tried to log in to find out where everything went wrong. It seems to crash when I call the native function. Below is the function that I called for the native function.
protected Bitmap processFrame(Bitmap l_frame) { WarnC='a'; int[] rgba = mRGBA; byte[] src_array =stream; ByteArrayOutputStream src_stream = new ByteArrayOutputStream(); l_frame.compress(Bitmap.CompressFormat.PNG, 0, src_stream); src_array = src_stream.toByteArray(); Log.i("test", "ok"); WarnC= processcaller.LaneDetection(mFrameWidth, mFrameHeight, src_array, rgba); Bitmap bmp = g_frame; bmp.setPixels(rgba, 0, mFrameWidth , 0, 0, mFrameWidth,mFrameHeight); rgba =null; src_array=null; return bmp; }
The Log.i("test","ok"); signal came out immediately after Log.i("test","ok"); I searched the net and saw how most of them talk about segmentation errors and could be the cause of calling uninitialized or functions that don't exist. But looking through my code, I just can't find it. Any pointers?
source share