ID: 19700 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: GD related Operating System: Darwin v6 (Mac Server v10.2) PHP Version: 4.2.3, 4.3.0-dev New Comment:
Silly Apple... (gdb) p c $1 = 1648905 (gdb) p i $2 = 256 (gdb) Previous Comments: ------------------------------------------------------------------------ [2002-10-05 20:22:42] [EMAIL PROTECTED] In your backtrace there, just after you type, "bt", type: "p c" and then "p i". As far as I can tell, PHP is not calling this function incorrectly. There must be some odd Mac-specific problem here. ------------------------------------------------------------------------ [2002-10-05 20:15:32] [EMAIL PROTECTED] I recompiled PHP with libpng v1.0.15 and v1.2.5. I used "--with-gd=/usr/local" and "--with-gd=php" (so I compiled 4 times total). Same problem every time. While I was at it I compiled a debug build of PHP (libpng v1.2.5 and "--with-gd=php") and I got y'all a backtrace (if it helps much). There were no extra errors in Apache's error_log. Here ya go: Program received signal EXC_BAD_ACCESS, Could not access memory. 0x007c5060 in gdImageCopy (dst=0x19e250, src=0x272a90, dstX=0, dstY=0, srcX=0, srcY=0, w=800, h=600) at /usr/local/php-cvs/php4-200210050600/ext/gd/libgd/gd.c:1757 1757 if (colorMap[c] == (-1)) (gdb) bt #0 0x007c5060 in gdImageCopy (dst=0x19e250, src=0x272a90, dstX=0, dstY=0, srcX=0, srcY=0, w=800, h=600) at /usr/local/php-cvs/php4-200210050600/ext/gd/libgd/gd.c:1757 #1 0x007bd7cc in zif_imagecopy (ht=8, return_value=0x1b2dd8, this_ptr=0x0, return_value_used=0) at /usr/local/php-cvs/php4-200210050600/ext/gd/gd.c:2489 #2 0x00983f28 in execute (op_array=0x19b3d8) at /usr/local/php-cvs/php4-200210050600/Zend/zend_execute.c:1597 #3 0x0096b8dc in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/php-cvs/php4-200210050600/Zend/zend.c:834 #4 0x009218ec in php_execute_script (primary_file=0xbfffec60) at /usr/local/php-cvs/php4-200210050600/main/main.c:1542 #5 0x00989cd0 in apache_php_module_main (r=0x193238, display_source_mode=0) at /usr/local/php-cvs/php4-200210050600/sapi/apache/sapi_apache.c:55 #6 0x0098aefc in send_php (r=0x193238, display_source_mode=0, filename=0x194db8 "/Library/WebServer/Documents/riverdata/scripts/test.php") at /usr/local/php-cvs/php4-200210050600/sapi/apache/mod_php4.c:564 #7 0x0098af7c in send_parsed_php (r=0x193238) at /usr/local/php-cvs/php4-200210050600/sapi/apache/mod_php4.c:579 #8 0x0000c4b4 in ap_invoke_handler () #9 0x000160b4 in process_request_internal () #10 0x00016144 in ap_process_request () #11 0x00005b48 in child_main () #12 0x00005d08 in make_child () #13 0x00005e74 in startup_children () #14 0x00006470 in standalone_main () #15 0x00006ce8 in main () #16 0x00001bb0 in _start () #17 0x00001a30 in start () (gdb) ------------------------------------------------------------------------ [2002-10-05 18:47:01] [EMAIL PROTECTED] Hrm yeah it looks like there isn't an apple supplied libpng... for some reason I thought there was. Okay it'll take me a little while to get that installed and moving. In the meantime, what can YOU do to help us? <g> Try compiling your PHP with debug options on and see if you're getting any warnings or notices in the error logs. Feel free to forward me a copy of your buildlog, as I'd like to remove as many build warnings before 4.3 goes out the door. ------------------------------------------------------------------------ [2002-10-05 16:49:04] [EMAIL PROTECTED] If you want to see my PHP compile output I'll email it to you, but there are way too many warnings to cover in this thread. (I don't know what the normal number of PHP warnings is, I have only compiled it on Darwin.) I didn't know that apple had a custom libpng. I have been using libpng that you can find on the png web site and compiling it myself with the tools provided by Apple. http://www.libpng.org/pub/png/libpng.html http://developer.apple.com/tools/projectbuilder/ heh.. ya, I noticed. The basic functions work well, but any strenuous use of GD is like walking on a minefield. Thx for all of the help. http://144.92.10.251/riverdata/map.html (work in progress) This is what I am currently working on. Click on the map a few times to zoom in and see the stations. There are about 3,800 stations total. Each one measures the rate that water flows through the river that it is located on. It is a work in progress, so there is room for improvement on speed and file size. Eventually this map will be running on quite a verity of data in the department. Everything is rendered dynamically in PHP using a MySQL database. The labels are rendered realtime. They are partly transparent. They have drop shadows. They are clickable. The high-res source image is about 700-800 MBs total, using the GD2 image format (compressed). All of this is using work arounds for the batch of bugs that I have submitted. I am doing a nice test of GD for you guys :-) ------------------------------------------------------------------------ [2002-10-05 15:39:30] [EMAIL PROTECTED] Hrm you shouldn't be getting compiler warnings on OSX any worse than those that are normally found in PHP (unused variables, etc). Are you using an Apple provided libpng? I have to admit I don't think we've done any real testing on GD yet, so you're sailing unknown waters. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/19700 -- Edit this bug report at http://bugs.php.net/?id=19700&edit=1