We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

xdebug crash on new FactoryDefault


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.


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?


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.


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


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.


should I report this as a bug?


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


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


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

See the screenshots:

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


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)