bugGnash - The GNU Flash player - Bugs: bug #27752, Gnash 0.8.6: SegFault when loading...

 
 

bug #27752: Gnash 0.8.6: SegFault when loading lirc extension. No SegFault if lirc.so renamed

Submitted by:  None
Submitted on:  Mon 19 Oct 2009 09:23:47 AM UTC  
 
Category: pluginSeverity: 3 - Normal
Release: otherStatus: Works For Me
Privacy: PublicAssigned to: Rob Savoye <rsavoye>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 28 Jan 2010 01:08:30 AM UTC, comment #3:

No response, works for me...

Rob Savoye <rsavoye>
Project AdministratorIn charge of this item.
Mon 19 Oct 2009 07:30:11 PM UTC, comment #2:

Out of trunk, the lirc extension works fine for me today.

Rob Savoye <rsavoye>
Project AdministratorIn charge of this item.
Mon 19 Oct 2009 04:38:13 PM UTC, comment #1:

Have you tried the lirc support in libnet, instead of the lirc extension ? Renaming the plugin only makes it not get loaded.

Rob Savoye <rsavoye>
Project AdministratorIn charge of this item.
Mon 19 Oct 2009 09:23:47 AM UTC, original submission:

Description:

When gnash is run with any Flash application, gnash seg-faults. But if lirc.so (the only extension in its directory) is renamed in the /mydir/lib/gnash/plugins dir to lirc.so.ok, it works fine.

A few debug prints have been added in the source of extension.cpp (given below).

The verbose output has also been pasted below, alongwith gdb backtrace.

Compilation: Cross (GNU GCC)
CPU: ARM
Build on: Intel Dual Core 2.0 GHz PC
Build OS: Linux - ubuntu 9.04
Target OS: Linux - Debian lenny/sid

Gnash Build options 0.8.6
Target:
Renderer: cairo - GUI: GTK - Media handler: gst
Configured with: --prefix=/mydir --host=arm-linux-gnueabi --build=i686-pc-linux-gnu --target=arm-linux-gnueabi --enable-gui=gtk --enable-extensions=lirc -enable-lirc --with-gif-incl=/usr/arm-linux-gnueabi/include --with-gif-lib=/usr/arm-linux-gnueabi/lib --with-ungif-incl=/usr/arm-linux-gnueabi/include --with-ungif-lib=/usr/arm-linux-gnueabi/lib --enable-renderer=cairo --enable-media=GST -with-gstreamer-incl=/mydir/wtv-gstreamer/build/include/gstreamer-0.10/ --with-gstreamer-lib=/mydir/wtv-gstreamer/build/lib/ --with-png-incl=/usr/arm-linux-gnueabi/include/libpng/ --with-png-lib=/usr/arm-linux-gnueabi/lib/ --with-libxml2-incl=/usr/arm-linux-gnueabi/include/libxml2/ --with-cairo-incl=/usr/arm-linux-gnueabi/include/cairo/ --with-cairo-lib=/usr/arm-linux-gnueabi/lib/ --with-atk-incl=/usr/arm-linux-gnueabi/include/atk-1.0/ --with-atk-lib=/usr/arm-linux-gnueabi/lib/
CXXFLAGS: -I/usr/arm-linux-gnueabi/include/ -O2 -pthread -pthread -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wnon-virtual-dtor -Wunused -pthread -W -Wall -Wcast-align -Wcast-qual -Wpointer-arith -Wreturn-type -Wnon-virtual-dtor -Wunused -fvisibility-inlines-hidden
Version: .:
Built against gstreamer version: 0.10.22
Linked against gstreamer version: 0.10.22

--------------------------------------------------------

# gnash --fullscreen -r 1 -vvv file.swf
1653:1] 01:46:24 DEBUG: Verbose output turned on
1653:1] 01:46:24 DEBUG: Verbose output turned on
1653:1] 01:46:24 DEBUG: Created top level window
1653:1] 01:46:24 ERROR: Couldn't find pixmap file: GnashG.png

    • (gtk-gnash:1653): WARNING **: Couldn't find pixmap file: GnashG.png

1653:1] 01:46:24 DEBUG: GtkWidget* gnash_canvas_new() enter
1653:1] 01:46:24 DEBUG: void gnash_canvas_class_init(GnashCanvasClass*) enter
1653:1] 01:46:24 DEBUG: void gnash_canvas_class_init(GnashCanvasClass*) returning
1653:1] 01:46:24 DEBUG: void gnash_canvas_init(GnashCanvas*) enter
1653:1] 01:46:24 DEBUG: void gnash_canvas_init(GnashCanvas*) returning
1653:1] 01:46:24 DEBUG: GtkWidget* gnash_canvas_new() returning
1653:1] 01:46:24 DEBUG: void gnash_canvas_setup(GnashCanvas, int, char**) enter
1653:1] 01:46:24 DEBUG: void gnash_canvas_setup(GnashCanvas, int, char**) returning
1653:1] 01:46:24 DEBUG: void gnash::GtkGui::createQualityMenu(GtkWidget*) enter
1653:1] 01:46:24 ERROR: Gui::getQuality called before a movie_root was available
1653:1] 01:46:24 DEBUG: void gnash::GtkGui::createQualityMenu(GtkWidget*) returning
1653:1] 01:46:25 DEBUG: void gnash::GtkGui::createQualityMenu(GtkWidget*) enter
1653:1] 01:46:25 ERROR: Gui::getQuality called before a movie_root was available
1653:1] 01:46:25 DEBUG: void gnash::GtkGui::createQualityMenu(GtkWidget*) returning
1653:1] 01:46:25 DEBUG: void gnash_canvas_size_allocate(GtkWidget, GtkAllocation) enter
1653:1] 01:46:25 DEBUG: gnash_canvas_size_allocate 223 1
1653:1] 01:46:25 DEBUG: void gnash_canvas_size_allocate(GtkWidget, GtkAllocation) returning
1653:1] 01:46:25 DEBUG: void gnash_canvas_realize(GtkWidget*) enter
1653:1] 01:46:25 DEBUG: void gnash_canvas_realize(GtkWidget*) returning
1653:1] 01:46:25 DEBUG: void gnash_canvas_after_realize(GtkWidget*) enter
1653:1] 01:46:25 DEBUG: void gnash_canvas_after_realize(GtkWidget*) returning
1653:1] 01:46:25 DEBUG: socket name /dev/lircd for fd 4
1653:1] 01:46:25 DEBUG: /root/ appended to local sandboxes
1653:1] 01:46:25 DEBUG: /root/file.swf appended to local sandboxes
1653:1] 01:46:25 SECURITY: Checking security of URL 'file:///root/file.swf'
1653:1] 01:46:25 SECURITY: Load of file /root/file.swf granted (under local sandbox /root/)
1653:1] 01:46:25 DEBUG: Movie file:///root/file.swf (SWF4) added to library
1653:1] 01:46:25 DEBUG: gnash::SharedObjectLibrary::SharedObjectLibrary(gnash::VM&) enter
1653:1] 01:46:25 DEBUG: Invalid SOL safe dir /root/.gnash/SharedObjects: No such file or directory. Will try to create on flush/exit.
1653:1] 01:46:25 DEBUG: gnash::SharedObjectLibrary::SharedObjectLibrary(gnash::VM&) returning
1653:1] 01:46:25 DEBUG: Plugins path: /mydir/lib/gnash/plugins
1653:1] 01:46:25 SECURITY: Extensions enabled, scanning plugin dir for load
1653:1] 01:46:25 DEBUG: bool gnash::Extension::scanDir(const std::string&) enter
1653:1] 01:46:25 DEBUG: Scanning directory "/mydir/lib/gnash/plugins" for plugins
1653:1] 01:46:25 DEBUG: Gnash Plugin name: lirc
1653:1] 01:46:25 DEBUG: bool gnash::Extension::scanDir(const std::string&) returning
1653:1] 01:46:25 SECURITY: Loading module: lirc from /mydir/lib/gnash/plugins
1653:1] 01:46:25 DEBUG: .....................1
1653:1] 01:46:25 DEBUG: bool gnash::Extension::initModule(const std::string&, gnash::as_object&) enter
1653:1] 01:46:25 DEBUG: .....................2
1653:1] 01:46:25 DEBUG: .....................3
1653:1] 01:46:25 DEBUG: .....................4
1653:1] 01:46:25 DEBUG: gnash::SharedLib::SharedLib(const std::string&, const std::string&) enter
1653:1] 01:46:25 DEBUG: gnash::SharedLib::SharedLib(const std::string&, const std::string&) returning
1653:1] 01:46:25 DEBUG: .....................5
1653:1] 01:46:25 DEBUG: Opened dynamic library "lirc"
1653:1] 01:46:25 DEBUG: .....................6
1653:1] 01:46:25 DEBUG: .....................7
1653:1] 01:46:25 DEBUG: .....................10
1653:1] 01:46:25 DEBUG: .....................11
1653:1] 01:46:25 DEBUG: void (* gnash::SharedLib::getInitEntry(const std::string&))(gnash::as_object&) enter
1653:1] 01:46:25 DEBUG: Found symbol lirc_class_init @ 0x41d9ad4c
1653:1] 01:46:25 DEBUG: void (* gnash::SharedLib::getInitEntry(const std::string&))(gnash::as_object&) returning
1653:1] 01:46:25 DEBUG: .....................12
1653:1] 01:46:25 DEBUG: .....................13
Segmentation fault

--------------------------------------------------------

=========================================
GDB Backtrace:
=========================================

(gdb) bt
#0 0x4021be08 in gnash::as_value::set_as_object () from /mydir/lib/gnash/libgnashcore-0.8.6.so
#1 0x4021bee8 in gnash::as_value::as_value () from /mydir/lib/gnash/libgnashcore-0.8.6.so
#2 0x41d9ad90 in lirc_class_init () from /mydir/lib/gnash/plugins/lirc.so
#3 0x40673a28 in gnash::Extension::initModule () from /mydir/lib/gnash/libgnashbase-0.8.6.so
#4 0x40675478 in gnash::Extension::scanAndLoad () from /mydir/lib/gnash/libgnashbase-0.8.6.so
#5 0x4032cf20 in gnash::AVM1Global::loadExtensions () from /mydir/lib/gnash/libgnashcore-0.8.6.so
#6 0x4032de70 in gnash::AVM1Global::registerClasses () from /mydir/lib/gnash/libgnashcore-0.8.6.so
#7 0x404b413c in gnash::VM::init () from /mydir/lib/gnash/libgnashcore-0.8.6.so
#8 0x40275c18 in gnash::movie_root::movie_root () from /mydir/lib/gnash/libgnashcore-0.8.6.so
#9 0x00035868 in gnash::Player::run ()
#10 0x0001cd14 in main ()
(gdb)

--------------------------------------------------------

========================================
Changes done in source of extension.cpp:
========================================

bool
Extension::scanAndLoad(as_object& where)
{
// GNASH_REPORT_FUNCTION;

if (_modules.empty()) {
scanDir(_pluginsdir);
}

std::vector<std::string>::iterator it;
for (it = _modules.begin(); it != _modules.end(); it++) {
const std::string& mod = *it;
log_security(_("Loading module: %s from %s"), mod, _pluginsdir);

log_debug(".....................1");

initModule(mod, where);

log_debug(".....................16");

}
return true;
}

bool
Extension::initModule(const std::string& module, as_object &where)
{
GNASH_REPORT_FUNCTION;

log_debug(".....................2");

SharedLib *sl;
std::string symbol(module);

log_debug(".....................3");

///std::cout << "...............symbol: " << symbol << "\n";
///std::cout << "..............._pluginsdir: " << _pluginsdir << "\n";

///log_security(_("Initializing module: \"%s\" from %"), symbol, _pluginsdir);

if (_plugins[module] == 0) {

log_debug(".....................4");

sl = new SharedLib(module, "GNASH_PLUGINS");

log_debug(".....................5");

sl->openLib();

log_debug(".....................6");

_plugins[module] = sl;

log_debug(".....................7");

} else {

log_debug(".....................8");

sl = _plugins[module];

log_debug(".....................9");

}

log_debug(".....................10");

symbol.append("_class_init");

log_debug(".....................11");

SharedLib::initentry *symptr = sl->getInitEntry(symbol);

log_debug(".....................12");

if (symptr) {

log_debug(".....................13");

symptr(where);

log_debug(".....................14");

} else {
log_error(_("Couldn't get class_init symbol"));
}

log_debug(".....................15");

return true;
}

Anonymous

 

(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)
  •  

    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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 28 Jan 2010 01:08:30 AM UTCrsavoyeOpen/ClosedOpen=>Closed
    Mon 19 Oct 2009 07:30:11 PM UTCrsavoyeStatusNeed Info=>Works For Me
    Mon 19 Oct 2009 04:38:13 PM UTCrsavoyeStatusNone=>Need Info
      Assigned toNone=>rsavoye

    Back to the top


    Powered by Savane 3.1-cleanup1