Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=3537742
By: yop83

Ok, it's been nearly a year and a half since this post, but I'm having similar
problems with libPng 1.2.8 on Visual Studio 2003 (on Windows XP SP2).

At first, I used the binary pack from GNUWIN32 and got the same crash (albeit,
on png_read_png(), wich calls png_read_info() anyway).

Then, to see where the bug came from, I downloaded the sources and compiled
them as a Debug DLL (compiled it using the included VC7.1 solution file). I
copied the *.lib and .*dll file to my local project folder (and I'm linking
against libpng13d.lib and zlib1d.lib).

Everything compiles perfectly but then, the Access violation I get is INSIDE
png_read_info(). It's in :
png_read_info()
->png_read_data()
 ->(*(png_ptr->read_data_fn))(png_ptr, data, length); //line 31 of pngrio.c
  ->fread(data, (png_size_t)1, length, (png_FILE_p)png_ptr->io_ptr); // line
54 of pngrio.c
    ->_lock_str(stream); // line 75 of fread.c
     ->EnterCriticalSection( &(((_FILEX *)pf)->lock) ); // line 235 of _file.c

And then, it pops up the error, while stalling on the first line of "_CRTIMP
void * __cdecl malloc(        size_t nSize)" (line 135 of dbgheap.c). That first
instruction is a malloc:
" void *res = _nh_malloc_dbg(nSize, _newmode, _NORMAL_BLOCK, NULL, 0);"

At the time of debugging:
nSize = 108260096
_nwmode = 0
res = 0x00000001

This is the exact error message I get:
"Unhandled exception at 0x7c928fea in myApp.exe: 0xC0000005: Access violation
writing location 0x00000010."

I'm pretty sure there is a simple fix for that. I've seen other people saying
"just add all of libpng and zlib's source code in your project folder and 
compile"...
But I don't want to include all this code, I would really prefer to use the
.dll.

In any case, if any one has any comments/ideas, even if you tell me that the
solution is to include the whole libpng tree in my project, don't hesitate...

Thanks!
--Yop83

My specs:
Pentium III 733
512 mb of ram
Nvidia GFX 5200
Windows XP SP2 PRO french
Visual Studio.Net 2003
libPNG 1.2.8
zlib 1.2.3

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=74807


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
GnuWin32-Users mailing list
GnuWin32-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnuwin32-users

Reply via email to