GNOME Bugzilla – Bug 398110
[theoraenc] GLib failed to allocate 3080991032 bytes on gentoo
Last modified: 2007-01-29 18:14:32 UTC
Steps to reproduce: 1. GST_DEBUG=5 gst-launch-0.10 videotestsrc ! video/x-raw-yuv, framerate=5/1 ! theoraenc ! fakesink 2> gst-debug.log Stack trace: See attached file Other information: running gst-launch-0.10 videotestsrc ! video/x-raw-yuv, framerate=5/1 ! theoraenc ! fakesink crashes with GLib-ERROR **: gmem.c:135: failed to allocate 3080991032 bytes
Created attachment 80632 [details] GDB Stack Trace
Cannot reproduce this, and it's valgrind clean for me too. Please provide a stack trace with full debugging symbols for gst-plugins-base, GStreamer core and GLib (you attached a debug log). Also, what libtheora version are you using? What GLib version? Does it make a difference if you do 'export G_SLICE=always-malloc' before running gst-launch? Could you run this through valgrind on your box?
Some more debugging on IRC revealed that packet->bytes was uninitialised. The reason this happened was that theora_encode_headers() returned a failure code, which in turn was due to libtheora having been compiled with encoding support disabled. Good stuff. Fixed in CVS: 2007-01-29 Tim-Philipp Müller <tim at centricular dot net> * ext/theora/theoraenc.c: (theora_enc_chain): Check return value of theora_encode_header(), or we might try to allocate a random number of bytes. theora_encode_header() can fail if libtheora has been compiled with encoding support disabled. Fixes #398110.