creationix / node-gir

Node bindings to libgirepository
http://live.gnome.org/GObjectIntrospection
MIT License
231 stars 58 forks source link

Segfault when loading the Midgard GIR file #4

Closed bergie closed 12 years ago

bergie commented 12 years ago

This script:

var Midgard, gir;
gir = require("./build/default/girepository.node");
gir.init();
Midgard = gir.load("Midgard");

Causes:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffd1cc63f4 in g_base_info_get_name ()
   from /usr/lib/libgirepository-1.0.so.1
(gdb) 
(gdb) bt full
#0  0x00007fffd1cc63f4 in g_base_info_get_name ()
   from /usr/lib/libgirepository-1.0.so.1
No symbol table info available.
#1  0x00007fffd1f2c41a in gir::GIRObject::PropertyList (info=0xc4c800)
    at ../src/interfaces/object.cc:554
        parent = 0x0
        l = 0
        list = {val_ = 0xc16b18}
        first = false
        gcounter = 0
#2  0x00007fffd1f299c5 in gir::GIRObject::Prepare (target=..., 
    info=0xc4c800) at ../src/interfaces/object.cc:152
        temp = {<v8::Handle<v8::FunctionTemplate>> = {
            val_ = 0xc16ad0}, <No data fields>}
        oft = {type_name = 0xc3ea80 "ParamLongtext", info = 0xc4c800, 
          function = {<v8::Handle<v8::FunctionTemplate>> = {
              val_ = 0x7ffff7fa3d88}, <No data fields>}, type = 12893408}
        scope = {prev_next_ = 0xc16ad0, prev_limit_ = 0xc18860, 
          is_closed_ = false}
        name_ = 0x7fffd1f0b7a4 "ParamLongtext"
        name = 0xc3ea80 "ParamLongtext"
        t = {<v8::Handle<v8::FunctionTemplate>> = {
            val_ = 0x7ffff7fa3d88}, <No data fields>}
        l = 0
#3  0x00007fffd1f25166 in gir::NamespaceLoader::BuildClasses (
    namespace_=0xc40eb0 "Midgard") at ../src/namespace_loader.cc:75
        info = 0xc4c800
        i = 58
        exports = {val_ = 0xc16898}
        length = 171
#4  0x00007fffd1f25073 in gir::NamespaceLoader::LoadNamespace (
    namespace_=0xc40eb0 "Midgard") at ../src/namespace_loader.cc:52
        er = 0x0
        lib = 0xc42000
#5  0x00007fffd1f24e8c in gir::NamespaceLoader::Load (args=...)
    at ../src/namespace_loader.cc:32
        scope = {prev_next_ = 0xc16890, prev_limit_ = 0xc18860, 
          is_closed_ = false}
        namespace_ = {str_ = 0xc40eb0 "Midgard", length_ = 7}
        exports = {val_ = 0xc16890}
#6  0x000000000056db10 in ?? ()
No symbol table info available.
...

Midgard GIR file is from Ubuntu OBS packages, and today's checkout of node-gir.

bergie commented 12 years ago

Might be a problem also in Midgard end: https://github.com/midgardproject/midgard-core/issues/120

I'll update the bug as soon as I know which side the problem lies.

swick commented 12 years ago

my pull request (https://github.com/creationix/node-gir/pull/6) shoud fix it.

bergie commented 12 years ago

@swick confirmed, now I can open a Midgard DB connection: http://lists.midgard-project.org/pipermail/dev/2011-September/003085.html

piotras commented 12 years ago

Already fixed