Fatal signal 8 (SIGFPE)

2,505 views
Skip to first unread message

Ali Rıza GÖKSU

unread,
Jul 10, 2013, 8:38:50 AM7/10/13
to jav...@googlegroups.com
Hi,

I use this library to stream video from Android device camera to servers by rtmp protocol. My code is;

recorder = new FFmpegFrameRecorder(ffmpeg_link, imageWidth, imageHeight, 1);

recorder.setFormat("flv");

recorder.setSampleRate(sampleAudioRateInHz);

recorder.setVideoBitrate(videoBitrate);

recorder.setAudioBitrate(audioBitrate);

recorder.setFrameRate(frameRate);


recorder.setInterleaved(false);

recorder.setAudioCodec(avcodec.AV_CODEC_ID_AAC);

recorder.setVideoCodec(avcodec.AV_CODEC_ID_FLV1);

recorder.setPixelFormat(com.googlecode.javacv.cpp.avutil.AV_PIX_FMT_YUV420P);


and everything is ok. Than I replace code like that;

recorder.setFormat("mp4");

recorder.setVideoCodec(avcodec.AV_CODEC_ID_MPEG4);


When I record vide on sdcard everything is ok but when stream video to server get this error


 A/libc(32147): Fatal signal 8 (SIGFPE) at 0x00007d93 (code=0), thread 32147 


I flow on debug and get error on this code 

    public boolean record(IplImage image, int pixelFormat) throws Exception {

        .

        .

        .

        .


        synchronized (oc) {

            /* write the compressed frame in the media file */

            if (interleaved && audio_st != null) {

                if ((ret = av_interleaved_write_frame(oc, video_pkt)) < 0) {

                    throw new Exception("av_interleaved_write_frame() error " + ret + " while writing interleaved video frame.");

                }

            } else {

                if ((ret = av_write_frame(oc, video_pkt)) < 0) {

                    throw new Exception("av_write_frame() error " + ret + " while writing video frame.");

                }

            }

        }

        return picture.key_frame() != 0;

    }


I search signal 8 (SIGFPE) and found this;

The SIGFPE signal is sent to a process when it executes an erroneous arithmetic operation, such as division by zero.

so can you help me please?

Samuel Audet

unread,
Jul 14, 2013, 2:20:30 AM7/14/13
to jav...@googlegroups.com
Hello,

On 07/10/2013 09:38 PM, Ali Rıza GÖKSU wrote:
> The SIGFPE signal is sent to a process when it executes an erroneous arithmetic operation, such as division by zero.
>
> so can you help me please?

It works fine with the FLV1 codec but not with the MPEG4 codec? Sounds
like a bug in FFmpeg, but maybe I'm doing something incorrect with the API.

Could you produce some sample data that causes the crash so I can take a
look at this and maybe fix it? When you have something, please create a
new issue, attach the data file, and provide the few lines of code
needed to reproduce the crash here:
http://code.google.com/p/javacv/issues/
Thanks!

Samuel
Reply all
Reply to author
Forward
0 new messages