#25664 [NEW]: COM objects written in Delphi crash PHP
| From: | blomster at algonet dot se | Date: | Thu, 25 Sep 2003 23:07:22 +0000 |
| Subject: | #25664 [NEW]: COM objects written in Delphi crash PHP | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-48117@lists.php.net to get a copy of this message | ||
From: blomster at algonet dot se
Operating system: Win NT 4
PHP version: 4.3.3
PHP Bug Type: COM related
Bug description: COM objects written in Delphi crash PHP
Description:
------------
To me it seems all COM objects written in Delphi 5 crashes PHP - fully
reproducible. I don't know about Delphi 6 or 7. These objects work in
VBScript, Javascript, Perl, Word/Excel VBA macros, and more.
Applies to PHP 4.3.3 but also to PHP 5 downloaded 24 sept 2003.
An example, which I have not written myself:
http://www.undu.com/Articles/000928g.html
I can compile that source and mail the dll to anybody willing to test. I
have more examples, including my own Delphi COM object.
I recognize the description in bug #25586 - this has also happened to me
and I believe it's related to what I describe here. That was Delphi 6.
A bizarre workaround was found for my own COM object: If I override
Delphi's own GetTypeInfo, and always return HRESULT -1, then PHP continues
by calling other methods and does not crash, but then I instead get a
memory leak. I have not understood how the crash and the leak are related,
if at all.
Thanks for any assistance & best regards
Jens Blomster
Uppsala, Sweden
Reproduce code:
---------------
From the above-mentioned message board COM example:
$instance = new COM("msgboard.MessageBoard");
$i = $instance->CreateMessage("hej","hopp","i baljan");
Expected result:
----------------
The message created in the COM object, just like it does in VBScript.
Actual result:
--------------
A PHP crash.
--
Edit bug report at http://bugs.php.net/?id=25664&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25664&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25664&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25664&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25664&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25664&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25664&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25664&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25664&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25664&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25664&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25664&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25664&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25664&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25664&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25664&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25664&r=float