bugGnash - The GNU Flash player - Bugs: bug #27280, when compiling gnahs trunk with...

 
 

bug #27280: when compiling gnahs trunk with gstreamer to test the camera code it crash

Submitted by:  Benoit Mortier <opensides>
Submitted on:  Tue 18 Aug 2009 05:53:45 PM UTC  
 
Category: NoneSeverity: 6 - Security
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 16 Jan 2010 08:22:08 PM UTC, comment #8:

Your patch handles webcam = 0 but in this case the
webcam pointer is NOT zero, see frame #0:

webcam=0xa5fa90

The error must be somewhere deeper.
My guess is in the class initializers (as far as I remember
those classes used for webcam/mic are not much solid)

Sandro Santilli <strk>
Project Member
Sat 16 Jan 2010 07:17:58 PM UTC, comment #7:

As I can't reproduce this, I made a guessed patch based on your stack dump. This should at least not segfault as of revno #11761.

Rob Savoye <rsavoye>
Project Administrator
Sat 19 Sep 2009 11:43:45 PM UTC, comment #6:

Hello,

When compiling th latest code from Gnash on my Debian Lenny box a still got the same kind of problem, but its' gone worse as i get a segmentation fault now in the findcamera program

findwebcams

Use this utility to set your desired default webcam device.

(<unknown>:14172): GStreamer-CRITICAL **: gst_clock_get_time: assertion `GST_IS_CLOCK (clock)' failed
Erreur de segmentation

Sep 20 01:31:36 catbert kernel: [59060.467213] findwebcams[13690]: segfault at 0 ip 08049276 sp bfa286d0 error 4 in findwebcams[8048000+2000]
Sep 20 01:32:30 catbert kernel: [59114.152794] findwebcams[13743]: segfault at 0 ip 08049276 sp bf85a500 error 4 in findwebcams[8048000+2000]
Sep 20 01:32:38 catbert kernel: [59122.832006] findwebcams[13772]: segfault at 0 ip 08049276 sp bfd2e1d0 error 4 in findwebcams[8048000+2000]
Sep 20 01:39:09 catbert kernel: [59516.157835] findwebcams[14172]: segfault at 0 ip 08049276 sp bf877580 error 4 in findwebcams[8048000+2000]

Benoit Mortier <opensides>
Tue 25 Aug 2009 01:57:22 PM UTC, comment #5:

Stack trace in comment #4 is playing Camera-v8.swf, right after
these log prints:

10684:1] 15:54:10 TRACE: PASSED: Camera::width property exists
10684:1] 15:54:10 ERROR: webcamChangeSourceBin: the resolution you chose isn't supported, picking a supported value

Sandro Santilli <strk>
Project Member
Tue 25 Aug 2009 01:56:00 PM UTC, comment #4:

Finally got it:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f7d097eb710 (LWP 10684)]
0x00007f7d089fb971 in gnash::media::gst::VideoInputGst::checkForSupportedFramerate (this=0xb6d250, webcam=0xa5fa90, fps=30)
at /usr/src/gnash/gnash-head/libmedia/gst/VideoInputGst.cpp:671
warning: Source file is more recent than executable.
671 for (int i = 0; i < webcam->_currentFormat->numFramerates; ++i) {
#0 0x00007f7d089fb971 in gnash::media::gst::VideoInputGst::checkForSupportedFramerate (this=0xb6d250, webcam=0xa5fa90, fps=30)
at /usr/src/gnash/gnash-head/libmedia/gst/VideoInputGst.cpp:671
#1 0x00007f7d089fe5d1 in gnash::media::gst::VideoInputGst::webcamChangeSourceBin (this=0xb6d250, webcam=0xa5fa90)
at /usr/src/gnash/gnash-head/libmedia/gst/VideoInputGst.cpp:744
#2 0x00007f7d08eb0920 in gnash::camera_setmode (fn=@0x7fff11827620)
at /usr/src/gnash/gnash-head/libcore/asobj/flash/media/Camera_as.cpp:239
#3 0x00007f7d08e11f20 in gnash::builtin_function::operator() (this=0xb5a700,
fn=@0x7fff11827620)
at /usr/src/gnash/gnash-head/libcore/builtin_function.h:101
#4 0x00007f7d08f4ecfe in gnash::call_method (method=@0x7fff11827a00,
env=@0xa58a50, this_ptr=0xb6d1c0, args=<value optimized out>,
super=0xdec660, callerDef=0xa58000)
at /usr/src/gnash/gnash-head/libcore/vm/action.cpp:66
#5 0x00007f7d08f36634 in gnash::SWF::SWFHandlers::ActionCallMethod (
thread=@0x7fff11827fc0)
at /usr/src/gnash/gnash-head/libcore/vm/ASHandlers.cpp:3461
#6 0x00007f7d08f2ed2a in gnash::SWF::SWFHandlers::execute (
this=<value optimized out>, type=<value optimized out>,
thread=@0x7fff11827fc0)
at /usr/src/gnash/gnash-head/libcore/vm/ASHandlers.cpp:428
#7 0x00007f7d08f4716f in gnash::ActionExec::operator() (this=0x7fff11827fc0)

Sandro Santilli <strk>
Project Member
Tue 25 Aug 2009 12:59:44 PM UTC, comment #3:

Alright, here are the crashes (still not in test_videoinput):

Unexpected failures follow:
--=[ testsuite/actionscript.all ]=--
FAIL: astests-v8-Runner: gprocessor returned an error while playing 'Camera-v8.swf'
--=[ testsuite/libmedia.all ]=--
FAIL: Test case test_audioinput still running after 600 seconds, killing it (deadlock?)
--=[ testsuite/misc-haxe.all/classes.all ]=--
FAIL: Accessibility_asv6.swf: [ln:165]Accessibility.isActive is not a Bool.
FAIL: Accessibility_asv6.swf: [ln:226]Unexpected return with call to new on Accessibility
FAIL: Camera_asv8.swf died prematurely (segmentation violation)
FAIL: Camera_asv7.swf died prematurely (segmentation violation)
FAIL: Camera_asv6.swf died prematurely (segmentation violation)

Stack trace for the Camera-v8.swf crash:

Dammit, can't reproduce again !!

Sandro Santilli <strk>
Project Member
Mon 24 Aug 2009 03:56:25 PM UTC, comment #2:

I confirm the issue.
The problem is with _currentFormat member being NULL
for a webcam (beside others) and a lot of code still referencing
it (beside other NULL members).

The VideoInputGst class needs more documentation to be made
more robust (like: better to always check for non-null or make
it an invariant and forbid creation of such GnashWebcamPrivate?).

Relevant information from ./test_videoinput:

--- time passed ---

Actually, I can't reproduce the crash anymore, now wonder
if it has to do with some system lock of the input camera

Sandro Santilli <strk>
Project Member
Tue 18 Aug 2009 06:59:19 PM UTC, comment #1:

A backtrace would be helpful or an example of a file that crashes. This happens when trying to construct a string from a null pointer, which is often a sign of memory corruption. It may also be a simple logic error, but marking as a security bug to be on the safe side.

Benjamin Wolsey <bwy>
Project Member
Tue 18 Aug 2009 05:53:45 PM UTC, original submission:

Hello,

i just compiled the gnash trunk 11430 on Debian Lenny and added the webcam to the gnashrc file but it immediately crash when i try to wiew the camera in flash

an i got this crash in the console

(gtk-gnash:30490): GStreamer-CRITICAL **: gst_clock_get_time: assertion `GST_IS_CLOCK (clock)' failed
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid

i use the following parameter to configure

CONFIGURE_FLAGS="--prefix=/usr/local \
--sysconfdir=/etc \
--mandir=/usr/local/share/man \
--infodir=/usr/local/share/info \
--disable-testsuite \
--disable-rpath \
--enable-plugin \
--enable-avm2 \
--enable-gtk-widget \
--with-npapi-plugindir=/usr/local/lib/gnash \
--with-kde-pluginprefix=/usr/local \
--with-plugins-install=prefix \
--enable-shared=yes \
--enable-sdk-install \
--enable-lotsa-warnings \
--without-gcc-arch \
--enable-i810-lod-bias \
--disable-cygnal \
--enable-ltdl-install \
--enable-jemalloc \
--with-gstreamer-lib=/usr/lib \
--with-gstpbutils-lib=/usr/lib/ "

and the version of my gstreamer libraries are

libgstreamer0.10-dev:
Installé : 0.10.19-3

libgstreamer-plugins-base0.10-dev:
Installé : 0.10.19-2

if you need more detail just ask me

Benoit Mortier <opensides>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rsavoye (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by bwy (Posted a comment)
  • -unavailable- added by opensides (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 20 Oct 2010 05:51:49 PM UTCbwyStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sat 16 Jan 2010 07:17:58 PM UTCrsavoyeStatusConfirmed=>Ready For Test
    Mon 24 Aug 2009 03:56:25 PM UTCstrkStatusNone=>Confirmed
    Tue 18 Aug 2009 06:59:19 PM UTCbwySeverity3 - Normal=>6 - Security

    Back to the top


    Powered by Savane 3.1-cleanup1