We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

xdebug crash on new FactoryDefault

Hi,

Debugging crashes exactly on "$di = new \Phalcon\DI\FactoryDefault();" other statements like "new \Phalcon\Loader()" are working. When i'm not using the debugger the application also works without a problem. The apache instance reset on a xdebug crash... (resulting in a debugger connection lost)

Someone experiencing the same problem? Maybe it's an xdebug thing or phalcon.. i'm not known to the internals of both.

thnx

I'm using an xampp installation (yes windows) x86 TS php 5.4.7 xdebug 2.2.1 (tried older version also) phalcon 1.0.0 (tried 0.9.1 also)

using phpstorm 6 (and other debug clients to be sure)

@Lewishop can you please download the latest DLLs (we just updated the 1.0.0 stable on the site) and let us know if the issue persists?



10.2k

Just downloaded the latest version and the issue still persists. The debugger knows the "step over" completed but I think crashes on retrieving stack/variables info.



10.2k

$di = new Phalcon\DI(); seems to be the core issue (all of the FactoryDefault services are working)



10.2k

When a DI extended class like: class TestDI extends \Phalcon\DI\FactoryDefault { function construct() { parent::construct(); }} is used everything seem to work just fine.. maybe something is wrong with the internal definition of DI.



10.2k

should I report this as a bug?



98.9k

I wasn't able to reproduce your problem, I'm using XAMPP 1.8.1/PHP 5.4.7/Phalcon 1.0.0, Xdebug 2.2.1 I'm debugging with Notepad++:

I also recored the session if you want to see it https://vimeo.com/62879525



10.2k

@Phalcon Please open tab "local context" and refresh, and a crash occurs The other debuggers I used loaded the local context on each step



98.9k

Ok, I'm getting the problem now, the backtrace tell me that problem is happening in php_xdebug.dll

See the screenshots:

https://test.phalcon.io/backtrace.jpg https://test.phalcon.io/backtrace2.jpg https://test.phalcon.io/backtrace3.jpg



10.2k

Yes i know, .. it crashes only on reading(?) of a created Phalcon\DI, which is a native object, but when inherited by a php object:

class TestDI extends \Phalcon\DI\FactoryDefault { function construct() { parent::construct(); }}

no problem anymore.

So, maybe there is a problem with the definition (PHALCON_INIT_CLASS) or __construct of the native Phalcon\DI, which xdebug can't handle (or is not expecting)