From: csaba at alum dot mit dot edu Operating system: Win XP Pro PHP version: 5.0.3 PHP Bug Type: Reproducible crash Bug description: com_event_sink => crash when InternetExplorer.Application navigates away
Description: ------------ If I run the code below (essentially lifted from http://www.zend.com/php5/articles/php5-dotnet.php and http://at2.php.net/manual/en/ref.com.php (superzouz entry from 11 Oct 2003)) then I get the started and com_event_sink lines printed and then two identical title has changed lines: title has changed: PHP: Hypertext Preprocessor So far so good. If I now go to the IE window and put google.com<enter> into the location bar, and then have it search for something, I may or may not get additional title has changed messages (sometimes the next one is even the original php title bar. Ie. when I navigate to Google.com, the third title has changed line might still be PHP: Hypertext Preprocessor. But in any case, if I close the window, I will definitely get an error dialog: Title: php.exe - Application Error Text: The instruction at "0x7c911629" referenced memory at "0x00000000". The memory could not be "written". Click on OK to terminate the program Click on CANCEL to debug the program The actual first location varies, but it has always started with "0x7c91 The second one is usually all 0s though occasionally it has low numbers. I have changed the message pump time, and sometimes it seems like this affects how soon I might get an error, but I haven't seen anything definitive yet. The problem does not happen if I comment out the com_event_sink line and the while loop. I am on Win XP Pro SP2 using IE 6 My antivirus definitions are up to date and Norton Antivirus has found a clean machine. If there are other tests that I can do to facilitate tracking this problem down, please let me know. My php.ini file is in the same directory as php.exe (I do not have Apache installed yet and I am running php.exe (from a directory outside where php.exe lives) from a CMD box. Possibly related to http://bugs.php.net/bug.php?id=31040&edit=2 ? Sincerely, Csaba Gabor from Vienna Reproduce code: --------------- <?php class IESink { public $terminated = false; public function TitleChange($text) { echo("title has changed: $text \n"); } public function OnQuit() { $this->terminated = true; echo ("Quitting\n"); } } $ie = new COM("InternetExplorer.Application"); $ie->Visible = true; $ie->Navigate("http://www.php.net/"); $sink = new IESink; print "started\n"; com_event_sink($ie, $sink, "DWebBrowserEvents2"); print "com_event_sink called\n"; while (!$sink->terminated) { com_message_pump(1000); } print "finished!\n"; ?> -- Edit bug report at http://bugs.php.net/?id=31492&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31492&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31492&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31492&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31492&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31492&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31492&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31492&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31492&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31492&r=support Expected behavior: http://bugs.php.net/fix.php?id=31492&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31492&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31492&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31492&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31492&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31492&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31492&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31492&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31492&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31492&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31492&r=mysqlcfg
