MediaRecorder prepare() causes segfault

by dwilde1 » Mon, 29 Mar 2010 13:47:36 GMT


Sponsored Links
 Folks,

I have a situation where my MediaRecorder instance causes a segfault.
I'm working with a HTC Hero, Android 1.5+APIs. In the log i see (after
the segfault announcement) a register dump and then a numbered list
#00 libmedia_jni.so to  #18 linker, then a stack trace.

My Eclipse won't let me copy the log buffer, but I've done three
screen captures that sum it up. If you have time to examine, send me a
direct e-mail.

<pre><code>
    if (mRecorder == null) mRecorder = new MediaRecorder();
    mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
    mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    mRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    mRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
//       mRecorder.setVideoSize(640, 480);
//       mRecorder.setVideoFrameRate(20);
    mRecorder.setPreviewDisplay(surfaceHolder.getSurface());
    mRecorder.prepare();
    mRecorder.start();
</code></pre>

I've tried other variants, including H263 and 3gp. What else can I do
to debug this? Everythin g seems fine up to prepare().

I tried adding the onErrorListener, but it seems to interfere with the
MediaPlayer's onErrorListener. I'm using a 4-second beep-count to
prepare for auto triggering of the camera, and when I enable the error
handler for the MR everything in my handler state machines goes awry.

Thanks in advance! :D

--



MediaRecorder prepare() causes segfault

by dwilde1 » Tue, 30 Mar 2010 03:09:10 GMT


 n Mar 28, 4:24pm, dwilde1 <dwil...@gmail.com> wrote:

UPDATE:

I learned about the log redirection capabilities of adb last night
after I posted:)

Here's the pertinent section from a run (note: I've reduced resolution
to 320x240 also, no joy):


I/ActivityManager( 80): Start proc com.ejf.convince.jenplus for
activity com.ejf.convince.jenplus/.JenPLUS: pid=17738 uid=10075
gids={1006, 3003}
I/jdwp (17738): received file descriptor 10 from ADB
W/System.err(17738): Can't dispatch DDM chunk 46454154: no handler
defined
W/System.err(17738): Can't dispatch DDM chunk 4d505251: no handler
defined
I/WindowManager( 80): Screen status=true, current orientation=-1,
SensorEnabled=false
I/WindowManager( 80): needSensorRunningLp, mCurrentAppOrientation
=-1
I/WindowManager( 80): Enabling listeners
W/ActivityThread(17738): Application com.ejf.convince.jenplus is
waiting for the debugger on port 8100...
I/System.out(17738): Sending WAIT chunk
I/dalvikvm(17738): Debugger is active
I/AlertDialog( 80): [onCreate] auto launch SIP.
I/WindowManager( 80): onOrientationChanged, rotation changed to 0
I/System.out(17738): Debugger has connected
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): waiting for debugger to settle...
I/System.out(17738): debugger has settled (1370)
I/ActivityManager( 80): Displayed activity
com.ejf.convince.jenplus/.JenPLUS: 5186 ms
I/OpenCore( 2696): [Hank debug] LN 289 FN CreateNode
I/AudioHardwareMSM72XX( 2696): AUDIO_START: start kernel pcm_out
driver.
W/AudioFlinger( 2696): write blocked for 96 msecs
I/PlayerDriver( 2696): CIQ 1625 sendEvent state=5
I/OpenCore( 2696): [Hank debug] LN 289 FN CreateNode
I/PlayerDriver( 2696): CIQ 1625 sendEvent state=5
I/OpenCore( 2696): [Hank debug] LN 289 FN CreateNode
I/PlayerDriver( 2696): CIQ 1625 sendEvent state=5
I/OpenCore( 2696): [Hank debug] LN 289 FN CreateNode
I/PlayerDriver( 2696): CIQ 1625 sendEvent state=5
W/AuthorDriver( 2696): Intended width(640) exceeds the max allowed
width(352). Max width is used instead.
W/AuthorDriver( 2696): Intended height(480) exceeds the max allowed
height(288). Max height is used instead.
I/AudioHardwareMSM72XX( 2696): AudioHardware pcm playback is going to
standby.
I/DEBUG (16094): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG (16094): Build fingerprint: 'sprint/htc_heroc/heroc/heroc:
1.5/CUPCAKE/85027:user/release-keys'
I/DEBUG (16094): pid: 17738, tid: 17738 >>>
com.ejf.convince.jenplus <<<
I/DEBUG (16094): signal 11 (SIGSEGV), fault addr 00000018
I/DEBUG (16094): r0 ffffe4c0 r1 ffffe268 r2 41098b48 r3 00000000
I/DEBUG (16094): r4 4349ff70 r5 ab309358 r6 0000a9c8 r7 beb0f448
I/DEBUG (16094): r8 beb0f468 r9 41049dd8 10 41a93b78 fp 00001070
I/DEBUG (16094): ip ad083e5c sp beb0f440 lr ad03dd75 pc
ab3054f4 cpsr 80000030
I


Sponsored Links


MediaRecorder prepare() causes segfault

by dwilde1 » Wed, 31 Mar 2010 01:24:12 GMT


 urther UPDATE: I've tried all combinations of CAMERA and RECORD_*
permissions in the Manifest and also tried reducing frame rate to 10
and resolution to 176x144, and preset the surfaceHolder to that same
resolution, still no joy, I've also started rebooting the phone every
time it crashes. What else haven't I understood or tried? I can't
debug into the prepare() code, and nobody seems to be able to answer
ANY of these MR questions. I'm fully prepared to accept that I'm
missing something, but I was raised -- and hammered during 27 years of
embedded coding -- to believe that a segfault in a VM interpreter is a
really bad (read: embarrassing :) thing to see.

I'd like to understand this and at least point to a fix. My next step
is to see what's involved in importing the rest of the source into my
system.


On Mar 29, 8:40am, dwilde1 <dwil...@gmail.com> wrote:

--



Other Threads

1. Official Specs + Video Hands On Galaxy S II dan Galaxy Tab II

mudah2an bulan depan launching di indonesia
*was wes wos*




-- 
===============

2. 2.3 Platform Google APIs missing Licensing Service..?

Used adb to install an app that works fine on a 2.2 Platform Google
API avd, but in the newly release 2.3 flavour, I keep getting this
message:

I/LicenseChecker(  530): Binding to licensing service.
W/ActivityManager(   70): Unable to start service Intent
{ act=com.android.vending.licensing.ILicensingService }: not found
E/LicenseChecker(  530): Could not bind to service.

However I have been having problems with my 2.3 avd (had to start it
four times before it was stable enough to sign in) so I can't be sure
if my avd is corrupted or not.

Can anyone else confirm if the Licensing Service is installed
correctly on the 2.3 Google APIs package..?

-- 

3. Do I need to edit libgps.so file in /system/lib folder of my Samsung Fascinate to edit GPS settings at code level ?

4. Heap measured in DDMS

5. Logcat Filter for two or tags in Eclipse?

6. Problem Activity

7. answering machine in android