View Issue Details

IDProjectCategoryView StatusLast Update
0001122XdebugUncategorizedpublic2015-03-09 09:38
Reporterhugoboos Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSOS XOS Version10.10.2
Product Version2.3.1 
Fixed in Version2.3.2 
Summary0001122: Segmentation fault with PHPUnit code coverage
Description

Hi,

We getting segmentation fault errors when running PHPUnit with code coverage enabled.

Steps To Reproduce

The following app is used: https://gist.github.com/hugoboos/d471df324ff678c11f0a

The output:

$ vendor/bin/phpunit
PHPUnit 4.4.5 by Sebastian Bergmann.

Configuration read from /Users/hugoboos/Projects/Silex Xdebug/phpunit.xml

[1] 75447 segmentation fault vendor/bin/phpunit

When you don't register the MonologServiceProvider, extend $app['monolog'] or register the error handler, everything is fine.

Additional Information

Error occurs with version 2.3.0 and 2.3.1.
Not with 2.2.7.

TagsNo tags attached.
Operating System
PHP Version5.6.5-5.6.9

Activities

derick

2015-03-03 09:30

administrator   ~0003028

When I run the following:

mkdir /tmp/7
cd /tmp/7

vim composer.json
(put the code from the gist in it)

mkdir src
mkdir tests

vim tests/Test.php
(put the code the test in the gist in it, but added "<?php" as first line)

vim src/app.php
(put the code form the gist in it)

php ~/composer.phar install
vendor/bin/phpunit .
(I had to add the dot?)

The output now is:
Fatal error: Class 'Monolog\TestCase' not found in /tmp/7/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php on line 18

Call Stack:
0.0003 267376 1. {main}() /tmp/7/vendor/phpunit/phpunit/phpunit:0
0.0085 729688 2. PHPUnit_TextUI_Command::main() /tmp/7/vendor/phpunit/phpunit/phpunit:36
0.0085 730672 3. PHPUnit_TextUI_Command->run() /tmp/7/vendor/phpunit/phpunit/src/TextUI/Command.php:103
0.0152 1090872 4. PHPUnit_Runner_BaseTestRunner->getTest() /tmp/7/vendor/phpunit/phpunit/src/TextUI/Command.php:125
0.3379 1609440 5. PHPUnit_Framework_TestSuite->addTestFiles() /tmp/7/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php:62
0.4158 4210864 6. PHPUnit_Framework_TestSuite->addTestFile() /tmp/7/vendor/phpunit/phpunit/src/Framework/TestSuite.php:400
0.4160 4297000 7. PHPUnit_Util_Fileloader::checkAndLoad() /tmp/7/vendor/phpunit/phpunit/src/Framework/TestSuite.php:328
0.4160 4297288 8. PHPUnit_Util_Fileloader::load() /tmp/7/vendor/phpunit/phpunit/src/Util/Fileloader.php:42
0.4164 4310440 9. include_once('/tmp/7/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php') /tmp/7/vendor/phpunit/phpunit/src/Util/Fileloader.php:58

What am I missing?

But before you explain, can you please try the xdebug_2_3 branch from github? I did fix a crash already.

derick

2015-03-03 09:31

administrator   ~0003029

Also, when I run:

vendor/bin/phpunit tests

I get:

E

Time: 80 ms, Memory: 5.75Mb

There was 1 error:

1) Test::testHealthPage
InvalidArgumentException: Identifier "monolog.logfile" is not defined.

hugoboos

2015-03-03 19:26

reporter   ~0003031

Sorry, I forgot to add some files.

I'll try first the branch on GitHub and come back to you.

hugoboos

2015-03-03 19:47

reporter   ~0003032

It's working with the xdebug_2_3 branch. No segmentation fault anymore.

Still want my test code?
I can create a package with everything in it, if you want.

derick

2015-03-09 09:38

administrator   ~0003043

Thanks, but no thanks. I'll make a release in the next few days.

Issue History

Date Modified Username Field Change
2015-03-03 08:57 hugoboos New Issue
2015-03-03 09:30 derick Note Added: 0003028
2015-03-03 09:30 derick Assigned To => derick
2015-03-03 09:30 derick Status new => feedback
2015-03-03 09:31 derick Note Added: 0003029
2015-03-03 19:26 hugoboos Note Added: 0003031
2015-03-03 19:26 hugoboos Status feedback => assigned
2015-03-03 19:47 hugoboos Note Added: 0003032
2015-03-09 09:38 derick Note Added: 0003043
2015-03-09 09:38 derick Status assigned => resolved
2015-03-09 09:38 derick Fixed in Version => 2.3.2
2015-03-09 09:38 derick Resolution open => fixed
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized