vance-group/vr-jugglua — Issue #2: osgLua load wrapper fails the second time for the same library
Author: rpavlik
Created: 2011-10-13 22:48:45+00:00
State: open

Sample test case: run the OsgPointers test on its own (not within ctest) - it tries to set up multiple LuaScript objects, each of which will load the wrapper on startup.

Backtrace:

```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff408b55b in osgIntrospection::Reflection::getOrRegisterType(osgIntrospection::ExtendedTypeInfo const&, bool) () from /usr/lib/libosgIntrospection.so.74
(gdb) bt
#0 0x00007ffff408b55b in osgIntrospection::Reflection::getOrRegisterType(osgIntrospection::ExtendedTypeInfo const&, bool) () from /usr/lib/libosgIntrospection.so.74
#1 0x00007fffee23ae58 in ?? () from /usr/lib/osgPlugins-2.8.5/osgwrapper_OpenThreads.so
#2 0x00007fffee23c04c in ?? () from /usr/lib/osgPlugins-2.8.5/osgwrapper_OpenThreads.so
#3 0x00007fffee23e5b6 in ?? () from /usr/lib/osgPlugins-2.8.5/osgwrapper_OpenThreads.so
#4 0x00007fffee189720 in ?? () from /usr/lib/osgPlugins-2.8.5/osgwrapper_OpenThreads.so
warning: (Internal error: pc 0x1 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)

#5 0x0000000000000001 in ?? (warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)

) at /usr/include/osgIntrospection/Type:378
warning: (Internal error: pc 0x0 in read in psymtab, but not in symtab.)

#6 0x00007fffffffe0e8 in ?? ()
#7 0x00007fffee1f0a2b in _init () from /usr/lib/osgPlugins-2.8.5/osgwrapper_OpenThreads.so
#8 0x00007fff00000000 in ?? ()
#9 0x00007ffff7debd25 in call_init (main_map=0x9e5e30, argc=-297397936, argv=0x7fffffffc610, env=0x587fe0) at dl-init.c:70
#10 _dl_init (main_map=0x9e5e30, argc=-297397936, argv=0x7fffffffc610, env=0x587fe0) at dl-init.c:134
#11 0x00007ffff7df07f2 in dl_open_worker (a=) at dl-open.c:463
#12 0x00007ffff7deb986 in _dl_catch_error (objname=, errstring=, mallocedp=, operate=, args=) at dl-error.c:178
#13 0x00007ffff7deffba in _dl_open (file=0x882a98 "/usr/lib/osgPlugins-2.8.5/osgwrapper_OpenThreads.so", mode=-2147483391, caller_dlopen=0x7ffff468c247, nsid=-2, argc=1, argv=0x32a5, env=0x587fe0) at dl-open.c:554
#14 0x00007ffff3073f66 in dlopen_doit (a=) at dlopen.c:67
#15 0x00007ffff7deb986 in _dl_catch_error (objname=, errstring=, mallocedp=, operate=, args=) at dl-error.c:178
#16 0x00007ffff30742ac in _dlerror_run (operate=0x7ffff3073f00 , args=0x7fffffffca70) at dlerror.c:164
#17 0x00007ffff3073ee1 in __dlopen (file=, mode=) at dlopen.c:88
#18 0x00007ffff468c247 in osgDB::DynamicLibrary::getLibraryHandle(std::basic_string, std::allocator > const&) () from /usr/lib/libosgDB.so.74
#19 0x00007ffff468c660 in osgDB::DynamicLibrary::loadLibrary(std::basic_string, std::allocator > const&) () from /usr/lib/libosgDB.so.74
#20 0x00000000004c959d in loadWrapperLib (libname=) at /home/rpavlik/src/vrjugglua/third-party/osgLua/src/osgLua/loadWrapperLib.cpp:83
#21 0x00000000004c83bf in osgLua::loadWrapper (L=0x59b280, name=0x505e78 "OpenThreads") at /home/rpavlik/src/vrjugglua/third-party/osgLua/src/osgLua/osgLua.cpp:97
#22 0x000000000047611d in vrjLua::bindOsgToLua (state=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece or DW_OP_bit_piece.
) at /home/rpavlik/src/vrjugglua/vrjugglua/binding_detail/BindOsgToLua.inl:41
#23 0x000000000047c4c3 in vrjLua::LuaScript::_applyBindings (this=0x7fffffffcfd0) at /home/rpavlik/src/vrjugglua/vrjugglua/LuaScript.cpp:221
#24 0x000000000047cabc in vrjLua::LuaScript::LuaScript (this=0x7fffffffcfd0, create=) at /home/rpavlik/src/vrjugglua/vrjugglua/LuaScript.cpp:91
#25 0x0000000000472d6f in Fixture::Fixture (this=0x556ac8) at /home/rpavlik/src/vrjugglua/tests/OsgPointers.cpp:66
```