Archive for the ‘fail’ Category

Doctrine 1.2.3 Segmentation fault

Samstag, Oktober 9th, 2010

Today we learned, that – with the stars properly aligned – doing the right mistakes in using Doctrine can actually make PHP cause a Segmentation fault.

So far I have not been able to reproduce the problem in an Apache environment; but running PHPUnit from the CLI, the issue could be reproduced consistently.

The root of the evil is using Doctrine’s Behaviour/Templates in an ill-advised way. In this particular situation, a model had a behaviour defined and, at the same time, a custom column definition for columns also specified by the behaviour.

Doctrine does a lot of internal magic — possibility for behaviour parameter validation is unfortunate, though. When creating your own behaviours for example, throwing exceptions to notify the programmer using the behaviour that some of the passed parameters are invalid, Doctrine catches and „swallows“ these so they never can be seen and considered… So far, looking at e.g. unit tests for the build-in behaviours I have not figured out how to do this „right“.

Anyhow, a Segmentation fault should hardly be the result of any configuration mistake. I will try to create a test case in a fresh environment (other that the fair size project this happened in), and take a closer look on how to reliably reproduce the issue and use a debugger to confirm the reason really can be found inside Doctrine’s code or if some other 3rd party software (XDebug, …) has any influence.

Samstag, Januar 9th, 2010
Globetrotter floor signage Globetrotter floor signage

Globetrotter Cologne, Germany

Running on Windows (if it does „run“). Interesting concept: One machine producing one floor’s signage, which is then shown on all floors. Unfortunately, in this case this made for four blue screens.

Montag, Juni 15th, 2009
Teller machine EuroCash teller machine

Frankfurt Airport (FRA), Germany

Mind the minature error dialog. These things are actually running Windows, it seems.

Montag, Juni 15th, 2009
Aerobus ticket machine Aerobus (airport bus shuttle) ticket machine

Barcelona Airport (BCN), Spain

Montag, Juni 15th, 2009
Telefonica internet terminal Telefonica pay phone/internet terminal

Barcelona Airport (BCN), Spain