#37984 [NEW]: CLI sometimes crashes on Shell.Application

From: Date: Sat, 01 Jul 2006 19:57:31 +0000
Subject: #37984 [NEW]: CLI sometimes crashes on Shell.Application
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-99028@lists.php.net to get a copy of this message
From: csaba at alum dot mit dot edu Operating system: Win XP Pro PHP version: 5CVS-2006-07-01 (snap) PHP Bug Type: COM related Bug description: CLI sometimes crashes on Shell.Application Description: ------------ Sorry I cannot reliably reproduce this but... php-win.exe often errors, giving me one of those "would you like to report this to Microsoft dialogs" on account of the $ox=new COM("Shell.Application"); line. This happens in version 5.1.1 (from about Dec. 2005) and today's 5.2 Note that it only happens: 1. with php-win.exe 2. in the php-win -a form and not the -r form 3. when the Shell.Application line is present 4. when the execScript line is present The last two lines and the opener="me" line are not required for the bug to be shown. They are there so that when you go to the new IE, you can make it go away by pressing any key. Also, despite the bug, the new IE appears and the execScript functionality is present. // to see the bug, have DOSKEY active, and // call the file below (named inc.php) a few // times from a (wrapped) command line with: // echo ^^^<?php include('inc.php');ieStuff("<strong>Whoever</strong>"); ?^^^> | php-win -a // or // echo ^^^<?php ieStuff("<strong>Whoever</strong>"); ?^^^> | php-win -d auto_prepend_file=inc.php -a Reproduce code: --------------- <?php function ieStuff($html) { // Without this line, the bug does not happen $ox = new COM("Shell.Application"); // new instance of IE $ie = new COM("InternetExplorer.Application"); // next line creates a DOM $ie->Navigate2("about:blank"); // allow for settling while ($ie->ReadyState!=4) usleep(10000); $ie->Visible = true; // next line allows self.close() $ie->Document->ParentWindow->opener="me"; // escape handler definition $ie->document->parentWindow->execScript( "document.onkeypress=function(){window.close();}"); // proof of access to IE $ie->document->body->innerHTML = $html; // so escape handler listens $ie->document->body->focus(); } ?> Expected result: ---------------- I don't expect to see any CLI error message Actual result: -------------- Every so often, sometimes consistently every time, I get a CLI error dialog box on account of the Shell.Application line, which is not even used (in the example). The more windows you have open (IE and otherwise), the more likely the bug is to show itself. Under 25 windows open, and it doesn't fail much. Also, the problem tends to surface more readily if you go do your thing and then come back to the Cmd window 10 or 20 minutes later and then try it again. Sorry, I can't be more specific. I'm probably as unhappy reporting on an intermittent bug as you are reading about it. Csaba Gabor from Vienna -- Edit bug report at http://bugs.php.net/?id=37984&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37984&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37984&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37984&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37984&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37984&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37984&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37984&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37984&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37984&r=support Expected behavior: http://bugs.php.net/fix.php?id=37984&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37984&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37984&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37984&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37984&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37984&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37984&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37984&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37984&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37984&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37984&r=mysqlcfg

« previous php.bugs (#99028) next »