[xdebug-dev] Bug 0000313: sending an expression which cannot be evaluated at the time causes the script to stop executing

From: <noreply[@]lists.xdebug.org>
Date: Sun, 11 Nov 2007 17:45:19 +0100

The following bug has been RESOLVED.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000313
======================================================================
Reporter: d_kelsey
Handler: derick
======================================================================
Project: Xdebug
Bug ID: 313
Category: Usage problems
Reproducibility: always
Severity: major
Priority: normal
Status: resolved
Operating System: Windows XP
PHP Version: 5.2.1
Xdebug Version: 2.0.0
Resolution: not fixable
======================================================================
Date Submitted: 2007-10-02 15:59 CEST
Last Modified: 2007-11-11 17:45 CET
======================================================================
Summary: sending an expression which cannot be evaluated at the time causes the script to stop executing
Description:
Within a debug environment, a user may set up an expression to watch. This
expression may or may not be valid at the time when xdebug is in break
state and the eval is sent.
The expression to evaluate was
$myObj->myMethod();
but in the script being executed, myObj var doesn't exist, neither does
the any class defining the myMethod method.

What I would have expected from xdebug when the eval was sent was an error
saying unable to evaluate, instead I get a stop status instead.
======================================================================

----------------------------------------------------------------------
 nix - 2007-10-17 16:58 CEST
----------------------------------------------------------------------
I have noticed the same problem as described.
But I want to say that this doesn't have permanent error.
F.e. evaluation of incorrect expression "i" doesn't lead to described
behavior. All works fine and property with no value is returned as
result.
But f.e. invalid expression "Thread.currentThread()" reproduce described
situation.

Please note that last response has strange form. It is unexpected ( stops

execution and debugging of script ) and also it doesn't have "command"
argument
that could be pointed to command name original request.

----------------------------------------------------------------------
 derick - 2007-10-28 17:32 CET
----------------------------------------------------------------------
I can reproduce this, but I don't see a way on how to fix this. The problem
is that evals that don't work cause PHP simply to abort - nothing I can do
about that. I did address the not having a command/transaction_id
attribute in the response in CVS though.

----------------------------------------------------------------------
 derick - 2007-10-29 19:49 CET
----------------------------------------------------------------------
Dave writes:
That is not good that php terminates the current script. I am wondering
why it does though. I can write php eval code which tries to do something

similar and notice that the raise parse errors but it doesn't terminate
the script.

----------------------------------------------------------------------
 derick - 2007-11-11 17:45 CET
----------------------------------------------------------------------
Okay, I checked, and it's not something that I can't avoid. THere are two
cases where eval() might bail out:

1. parse errors

PHP handles this correctly and let you continue with the script, see:

<?php
eval("g87^sfrsaf" );

echo "ALIVE\n";
?>

2. calls to unknown functions methods

PHP will abort the script, see:

<?php
eval( "foobar();" );

echo "ALIVE\n";
?>

Xdebug's eval() behaves the same here.

Bug History
Date Modified Username Field Change
======================================================================
2007-10-02 15:59d_kelsey New Bug
2007-10-02 15:59d_kelsey Bug Monitored: d_kelsey
2007-10-17 16:58nix Bugnote Added: 0000743
2007-10-28 17:32derick Bugnote Added: 0000775
2007-10-28 17:32derick Assigned To => derick
2007-10-28 17:32derick Resolution open => not fixable
2007-10-28 17:32derick Status new => resolved
2007-10-29 19:49derick Bugnote Added: 0000783
2007-10-29 19:49derick Resolution not fixable => reopened
2007-10-29 19:49derick Status resolved => feedback
2007-11-11 17:45derick Bugnote Added: 0000808
2007-11-11 17:45derick Resolution reopened => not fixable
2007-11-11 17:45derick Status feedback => resolved
======================================================================
Received on Sun Nov 11 2007 - 17:45:20 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST