Hello folks.
I just can't seem to leave this alone and now I need a little insight.
As has been reported before when trying to use OSG on Cygwin we
experience some hangs and I believe this has been confirmed by Alberto
Luaces. Working with debug version of the Cygwin Dll and debug version
of OSG and then gdb I have acquired some understanding of where the
hang is but now need some advice to how to move further.
Robert suggested before using a simple test case of osgconv so that is
what I have been working with and it seems the hangs are a result of
the cygwin_osgdb_osg.dll plugin. From my test cases (and I have not
tested all examples ) it seems that if cygwin_osgdb_gif.dll,
cygwin_osgdb_jpg.dll, or cygwin_osgdb_rgb.dll for example (these are
all I have looked at) are the only dll loaded then there is no hang but
if cygwin_osgdb_osg.dll is used I can the hang when this dll is
attempted to be closed.
My example is using gbd and osgconvd (debug version) as in:
OSG_NOTIFY_LEVEL=INFO; export OSG_NOTIFY_LEVEL
gdb osgconvd
while in gdb I do
set args cow.osg brian.osg
so I am attempting convert cow.osg to brian.osg
I set my breakpoint such that I can see and check the
DynamicLibrary.cpp opens and closes and with my Notify set to INFO I
can see in this example that cygwin_osgdb_osg.dll gets opened first and
then cygwin_osgdb_rgb.dll. When I hit my breakpoint on the close after
the data has been written to brian.osg I see it is closing in the same
order it opened so it closes cygwin_osgdb_osg.dll first (or would if it
didn't hang on the close) and then it would close cygwin_osgdb_rgb.dll.
Thinking that maybe this should be handle in a LIFO format I modified
the open logic to do an dlList.insert instead of a dlList.push_back and
tried again. Now it does successfully close cygwin_osgdb_rgb.dll but
again when it get to the close for cygwin_osgdb_osg.dll it hangs. I
have traced the hang to the line in dlfcn.cc which is part of Cygwin
and I would think something has not closed that cygwin_osgdb_osg.dll
needs to have closed before it can since some of the others seem to
close properly but I can I find what is left open. GDB dies eventually
terminate on it own and below is the last of the stepping from gdb.
Looking for additional thoughts
bk
Closing DynamicLibrary osgPlugins-2.4.0/cygwin_osgdb_osg.dll
osgDB::DynamicLibrary::~DynamicLibrary (this=0x110cc470)
at /usr/src/OpenSceneGraph/src/osgDB/DynamicLibrary.cpp:69
69 dlclose(_handle);
(gdb) s
0x610b3662 in _sigfe_dlclose ()
at /usr/develop/src/src/src/winsup/cygwin/cygerrno.h:31
31 debug_printf ("%s:%d val %d", fn, ln, val);
(gdb) s
dlclose (handle=0x23c9c8)
at /usr/develop/src/src/src/winsup/cygwin/dlfcn.cc:141
141 {
(gdb) s
Breakpoint 7, dlclose (handle=0x610b2c98)
at /usr/develop/src/src/src/winsup/cygwin/dlfcn.cc:142
142 int ret = -1;
(gdb) s
143 if (handle == GetModuleHandle (NULL) || FreeLibrary
((HMODULE) handle)
)
(gdb) print handle
$7 = (void *) 0x89a0000
(gdb) s
1175829803 [main] osgconvd 3268 sig_send: wait for sig_complete event
failed, si
gnal 6, rc 258, Win32 error 0
Program exited with code 03000.
(gdb)
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org