GNOME Bugzilla – Bug 606265
H263 crashes ekiga - bug in ffmpeg?
Last modified: 2011-07-27 10:59:42 UTC
Version: 3.2.6 What were you doing when the application crashed? Appel vers "Test echo" Distribution: Mandriva Linux release 2010.0 (Official) for i586 Gnome Release: 2.28.0 2009-12-16 (Mandriva) BugBuddy Version: 2.28.0 System: Linux 2.6.31.6-desktop586-1mnb #1 SMP Tue Dec 8 15:43:31 EST 2009 i686 X Vendor: The X.Org Foundation X Vendor Release: 10605000 Selinux: No Accessibility: Disabled GTK+ Theme: Ia Ora Steel Icon Theme: gnome GTK+ Modules: canberra-gtk-module, gnomebreakpad Memory status: size: 208257024 vsize: 208257024 resident: 40349696 share: 26791936 rss: 40349696 rss_rlim: 18446744073709551615 CPU usage: start_time: 1262814852 rtime: 134 utime: 117 stime: 17 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100 Backtrace was generated from '/usr/bin/ekiga' [Thread debugging using libthread_db enabled] [New Thread 0xb4fb5910 (LWP 15827)] [New Thread 0xab732b70 (LWP 16261)] [New Thread 0xab808b70 (LWP 16260)] [New Thread 0xab849b70 (LWP 16259)] [New Thread 0xab88ab70 (LWP 16258)] [New Thread 0xab8cbb70 (LWP 16257)] [New Thread 0xb19b7b70 (LWP 16250)] [New Thread 0xb119eb70 (LWP 16249)] [New Thread 0xb3d4ab70 (LWP 15946)] [New Thread 0xb3d8bb70 (LWP 15945)] [New Thread 0xb3bffb70 (LWP 15853)] [New Thread 0xb3378b70 (LWP 15846)] [New Thread 0xb3b79b70 (LWP 15843)] [New Thread 0xb3dccb70 (LWP 15839)] [New Thread 0xb3e0db70 (LWP 15838)] [New Thread 0xb3e4eb70 (LWP 15836)] [New Thread 0xb3e8fb70 (LWP 15831)] [New Thread 0xb3ed0b70 (LWP 15830)] [New Thread 0xb3f11b70 (LWP 15829)] 0xffffe430 in __kernel_vsyscall ()
+ Trace 219941
Thread 3 (Thread 0xab808b70 (LWP 16260))
Thanks for taking the time to report this bug. Unfortunately, that stack trace is missing some elements that will help a lot to solve the problem, so it will be hard for the developers to fix that crash. Could you please install some debugging packages [1], start the application as normal, and reproduce the crash, if possible? Once bug-buddy pops up, you can find the stacktrace in the Details, now containing way more information. Please copy that stacktrace and paste it as a comment here. Thanks in advance! [1] More details can be found here: http://live.gnome.org/GettingTraces
More details on the problem: It happens when I call "echo" number with the video capability H263-1998. With H264 or H263 or Theora, it works fine.
(In reply to comment #1) > Thanks for taking the time to report this bug. > Unfortunately, that stack trace is missing some elements that will help a lot > to solve the problem, so it will be hard for the developers to fix that crash. > Could you please install some debugging packages [1], start the application as > normal, and reproduce the crash, if possible? > > Once bug-buddy pops up, you can find the stacktrace in the Details, now > containing way more information. Please copy that stacktrace and paste it as a > comment here. Thanks in advance! > > [1] More details can be found here: > http://live.gnome.org/GettingTraces I have compiled Ekiga from the sources (Ptlib, Opal and Ekiga) to have more codecs than the one provided by the my distribution version. Do you want me to rebuild ptlib, opal and ekiga with debug flag ? If yes, can you tell me exactly which configure flags you want: --enable-debug for opal ? --enable-gtk-debug --enable-opal-debug for Ekiga ? I did not find any debug flags for ptlib ... Olivier
It seems to me this is a bug in libavcodec: Thread 3: [...]
+ Trace 220005
I had not time to analyse it. Reporter, could you install libavcodec dbg package and check in ff_epzs_motion_search function where exactly it crashes (by adding printf for ex.)?
Olivier, could you please update libavcodec and libx264 packages to latest unstable versions (tell us what version), recompile opal (make clean before !) and re-send us the stack trace? Is it also possible to test ekiga and H263 on a 64 bits machine?
I have finally obtained a detailed backtrace of the crash. It appears in ffmpeg. See https://roundup.ffmpeg.org/roundup/ffmpeg/issue1700 for more information. Closing bug as notgnome.
Reopening, so that people can see it, and until the issue is settled. For reference, some parts of this patch have been committed to opal. Patch from Guido Trentalancia. diff -pruN opal-3.8.3/plugins/video/H.263-1998/h263-1998.cxx opal-3.8.3-fix-h263-crash-on-null-context//plugins/video/H.263-1998/h263-1998.cxx --- opal-3.8.3/plugins/video/H.263-1998/h263-1998.cxx 2010-12-20 23:42:42.000000000 +0100 +++ opal-3.8.3-fix-h263-crash-on-null-context//plugins/video/H.263-1998/h263-1998.cxx 2011-01-21 06:26:16.283344061 +0100 @@ -221,7 +221,7 @@ H263_Base_EncoderContext::H263_Base_Enco H263_Base_EncoderContext::~H263_Base_EncoderContext() { - free(_inputFrameBuffer); + if (_inputFrameBuffer) free(_inputFrameBuffer); } bool H263_Base_EncoderContext::Open(CodecID codecId) @@ -517,8 +517,8 @@ H263_RFC2190_EncoderContext::~H263_RFC21 CloseCodec(); - av_free(_context); - av_free(_inputFrame); + if (_context) av_free(_context); + if (_inputFrame) av_free(_inputFrame); TRACE_AND_LOG(tracer, 3, "encoder closed"); } @@ -770,8 +770,8 @@ H263_RFC2429_EncoderContext::~H263_RFC24 if (_txH263PFrame) delete _txH263PFrame; - av_free(_context); - av_free(_inputFrame); + if (_context) av_free(_context); + if (_inputFrame) av_free(_inputFrame); TRACE_AND_LOG(tracer, 3, "encoder closed"); } @@ -951,8 +951,8 @@ H263_Base_DecoderContext::~H263_Base_Dec { CloseCodec(); - av_free(_context); - av_free(_outputFrame); + if (_context) av_free(_context); + if (_outputFrame) av_free(_outputFrame); } bool H263_Base_DecoderContext::OpenCodec() @@ -1315,7 +1315,7 @@ static int free_codec_options ( const st char ** strings = (char **) parm; for (char ** string = strings; *string != NULL; string++) free(*string); - free(strings); + if (strings) free(strings); return 1; } @@ -1360,7 +1360,12 @@ static int codec_encoder(const struct Pl unsigned int * flag) { H263_Base_EncoderContext * context = (H263_Base_EncoderContext *)_context; - return context->EncodeFrames((const BYTE *)from, *fromLen, (BYTE *)to, *toLen, *flag); + if (context) + return context->EncodeFrames((const BYTE *)from, *fromLen, (BYTE *)to, *toLen, *flag); + else { + TRACE_AND_LOG(tracer, 1, "Context for the encoder has not been initialised !"); + return 0; + } } #define PMAX(a,b) ((a)>=(b)?(a):(b)) @@ -1590,7 +1595,7 @@ static int encoder_set_options(const Plu unsigned * parmLen) { H263_Base_EncoderContext * context = (H263_Base_EncoderContext *)_context; - if (parmLen == NULL || *parmLen != sizeof(const char **) || parm == NULL) + if (parmLen == NULL || *parmLen != sizeof(const char **) || parm == NULL || context == NULL) return 0; context->Lock(); @@ -1678,7 +1683,12 @@ static int codec_decoder(const struct Pl unsigned int * flag) { H263_Base_DecoderContext * context = (H263_Base_DecoderContext *)_context; - return context->DecodeFrames((const BYTE *)from, *fromLen, (BYTE *)to, *toLen, *flag) ? 1 : 0; + if (context) + context->DecodeFrames((const BYTE *)from, *fromLen, (BYTE *)to, *toLen, *flag) ? 1 : 0; + else { + TRACE_AND_LOG(tracer, 1, "Context for the decoder has not been initialised !"); + return 0; + } } static int decoder_get_output_data_size(const PluginCodec_Definition * codec, void *, const char *, void *, unsigned *) diff -pruN opal-3.8.3/plugins/video/H.264/h264-x264.h opal-3.8.3-fix-h263-crash-on-null-context//plugins/video/H.264/h264-x264.h --- opal-3.8.3/plugins/video/H.264/h264-x264.h 2010-12-20 23:42:42.000000000 +0100 +++ opal-3.8.3-fix-h263-crash-on-null-context//plugins/video/H.264/h264-x264.h 2011-01-21 06:11:44.545191085 +0100 @@ -54,7 +54,10 @@ #include "shared/h264frame.h" - +#ifndef INT64_C +#define INT64_C(c) (c ## LL) +#define UINT64_C(c) (c ## ULL) +#endif extern "C" { #ifdef _MSC_VER diff -pruN opal-3.8.3/src/codec/opalpluginmgr.cxx opal-3.8.3-fix-h263-crash-on-null-context//src/codec/opalpluginmgr.cxx --- opal-3.8.3/src/codec/opalpluginmgr.cxx 2010-12-20 23:43:00.000000000 +0100 +++ opal-3.8.3-fix-h263-crash-on-null-context//src/codec/opalpluginmgr.cxx 2011-01-21 05:57:51.479056064 +0100 @@ -302,7 +302,7 @@ void OpalPluginMediaFormatInternal::SetO format.AddOption(new OpalMediaOptionString(key, false, val), true); break; } - free(array); + if (array) free(array); } } @@ -488,7 +488,7 @@ bool OpalPluginMediaFormatInternal::Adju freeOptionsControl.Call(output, sizeof(output)); } - free(input); + if (input) free(input); return ok; } @@ -654,7 +654,7 @@ bool OpalPluginTranscoder::UpdateOptions char ** options = fmt.GetOptions().ToCharArray(false); bool ok = setCodecOptions.Call(options, sizeof(options), context) != 0; - free(options); + if (options) free(options); return ok; }
This has finally been fixed! The commit is very probably http://opalvoip.svn.sourceforge.net/viewvc/opalvoip?view=revision&revision=26248