[osg-users] osgdb-png plugin crash (release only)

2008-06-02 Thread Jean-Sébastien Guay

Hello all,

I am getting a crash while reading a PNG file (on the 
osgDB::readImageFile() line) in release mode only. This is on Windows 
Vista, VC++2005, OSG from SVN (recompiled this morning).


In debug mode, I get no crash, and the image is read correctly. Also, 
both the debug and release versions of osgviewer (compiled against the 
same OSG libs, and using the same libpng13.dll as far as I can tell) 
both load up the image and don't crash. So I'm baffled...


I tried recompiling my app cleanly, no change. I also tried renaming the 
PNG DLLs (libpng13.dll and libpng13d.dll) adding .bk to see if those 
were really the libs it was picking up, and it seems so.


The stack trace I get (although a bit limited, since it's in release) is:

libpng13.dll!675af092() 
 	[Frames below may be incorrect and/or missing, no symbols loaded 
for libpng13.dll]	

osgdb_png.dll!013f1b99()
	msvcp80.dll!std::basic_filebufchar,std::char_traitschar 
::open(const char * _Filename=0x, int _Mode=1243480, int 
_Prot=20914645)  Line 185 + 0x5 bytes	C++

osgdb_png.dll!013f2f4b()
osg37-osgDB.dll!00294227()  
osg37-osgDB.dll!0028d0b4()  
osg37-osgDB.dll!0029b33b()  
ntdll.dll!77c92447()
ntdll.dll!77c9214c()
 	msvcp80.dll!std::_Allocatechar(unsigned int _Count=35, char * 
__formal=0x)  Line 44 + 0x6 bytes	C++


msvcp80.dll!std::basic_stringchar,std::char_traitschar,std::allocatorchar 
::_Copy(unsigned int _Newsize=30, unsigned int _Oldlen=31)  Line 2036	C++

msvcr80.dll!malloc(unsigned int size=1243388)  Line 163 + 0x63 bytes
C
osg37-osgDB.dll!0029bcb3()  
osg37-osg.dll!1008ef44()
 	msvcr80.dll!memcpy_s(void * dst=0x03a95808, unsigned int 
sizeInBytes=47, const void * src=0x0023, unsigned int count=47) 
Line 67 + 0xc bytes	C
 	msvcp80.dll!std::char_traitschar::_Copy_s(char * 
_First1=0x61702f73, unsigned int _Size_in_bytes=1667855474, const char * 
_First2=0x6554656c, unsigned int _Count=1920300152)  Line 576	C++

65637275()  

Not very useful... I know...

Can anyone suggest some avenues for investigation I might have overlooked?

Thanks in advance,

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgdb-png plugin crash (release only)

2008-06-02 Thread Jean-Sébastien Guay

Hi again,

Of course, the minute after I pressed the send button, I found the 
source of the problem, and this was the assertion that was false:


I also tried renaming the 
PNG DLLs (libpng13.dll and libpng13d.dll) adding .bk to see if those 
were really the libs it was picking up, and it seems so.


The stock osgviewer was getting the libpng13.dll in its own bin 
directory, but my application was getting one that ships with GTK for 
Windows, and which is probably a slightly different version. This of 
course is caused by the fact that the Windows puts the directory from 
which an executable runs first in the search order for DLLs.


Sorry for the noise.

J-S
--
__
Jean-Sebastien Guay[EMAIL PROTECTED]
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org