Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #10289 Hangs at "Converting tutorials"
Submitted: 2007-03-06 21:12 UTC
From: ashnazg Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.3.1)
PHP Version: 5.2.1 OS: WinXP Pro
Roadmaps: 1.3.2    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 20 - 19 = ?

 
 [2007-03-06 21:12 UTC] ashnazg (Chuck Burgess)
Description: ------------ I noticed while running PhpDoc against itself (CVS HEAD), that when using PHP v5.2.1 it consistently hangs at the "Converting tutorials/extended docs" stage. It still eats all my CPU and continues to consume RAM, up to the memory_limit before dying. I verified this happens using PhpDoc v1.3.1 against PHP v5.2.1 also. Further, I verified this does NOT happen with PHP v5.2.0 nor any earlier PHP versions I try (5.1.6, 4.4.6). Something about PHP v5.2.1 doesn't like PhpDoc's tutorials... or perhaps it's something about the first task it attempts ("Converting Top-level Class-level tutorial Converter.cls").

Comments

 [2007-03-06 21:43 UTC] ashnazg (Chuck Burgess)
I'm using the PHP v5.2.1 zipfile that I downloaded from php.net (http://www.php.net/get/php-5.2.1-Win32.zip/from/a/mirror), so I didn't compile it myself. The one thing I have noticed about this zipfile from php.net compared to previous ones I gotten from there is that memory_limit can be modified... which tells me that "--enable-memory-limit" was compiled in, which in and of itself seems odd to me. Perhaps it's that list of compile options that will ultimately explain this bug.
 [2007-03-08 15:50 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-08 18:57 UTC] ashnazg (Chuck Burgess)
Dario, are you using PHP v5.2.1 also? Did you compile it yourself or did you get the binary from php.net?
 [2007-03-12 12:39 UTC] ashnazg (Chuck Burgess)
I pulled in the PHP v5.2.1 source and compiled it myself, just a vanilla compile (./configure, make, make install, no extra options). The only thing extra I did do was patch two files to get it to compile on WinXP/Cygwin (PHP bug 40488 http://bugs.php.net/bug.php?id=40488). So, this bug occurs with both the provided Windows binary at php.net as well as a vanilla self-compile from source.
 [2007-03-12 13:40 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-16 15:16 UTC] ashnazg (Chuck Burgess)
Looks like it's getting into an endless loop inside ParserElements.inc in parserTutorial->isChildOf() for the parserTutorial object $name=phpDocumentor.quickstart.pkg. This endless loop does _not_ occur using PHP v5.2.0, so I assume that means perhaps a command that is used in isChildOf() was changed from 5.2.0 to 5.2.1...
 [2007-03-16 19:10 UTC] ashnazg (Chuck Burgess)
Speaking of the memory_limit being compiled in or not... I see that item #4 of PHP v5.2.0's "features" is: - memory-limit is always enabled (--enable-memory-limit removed) (http://www.php.net/ChangeLog-5.php#5.2.1) Looks like they've made that option permanently "compiled in".
 [2007-03-16 20:49 UTC] ashnazg (Chuck Burgess)
I have the problem isolated to the FOREACH loop in the Converter->_processTutorials() method (Converter.inc), the one that calls parserTutorial->isChildOf() (ParserElements.inc), but I don't have a clue why it's doing what it's doing. The $parents array has seven objects in it, and once the FOREACH reaches its last iteration (i = 6), suddenly i=3, and it then runs 3..6 again, jumps back to 3 again, and away we go. Why would a loop this simple work in 5.2.0 but not in 5.2.1?
 [2007-03-16 21:14 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-16 21:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-16 21:37 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-16 22:00 UTC] ashnazg (Chuck Burgess)
In the PhpDoc code, there is an outermost foreach iterating through an array of objects. In the loop, it's calling an object's member function. That member function has its own outer foreach and inner foreach, and it will choose to do a premature return from inside the inner foreach. That MIGHT mean there are two foreach's not reaching their end nor continue/breaking out. Josh, if you're still at your box, try wrapping one more foreach around the the one that is returning a true in Greg's script.
 [2007-03-16 22:03 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-19 17:52 UTC] ashnazg (Chuck Burgess)
I spent a while this morning trying to perfect Greg's example to trigger the problem, with no success. I dug around the PHP buglist and found this PHP #40608. It sounds exactly light what's happening, and it was closed due to no feedback. I've reopened it, adding what info I can from my experience of the problem.
 [2007-03-19 18:26 UTC] ashnazg (Chuck Burgess)
PHP developer tony2001@php.net indicates the example code on PHP bug 40608 works perfectly on several Linux/Unix variants, but doesn't mention Windows. I'm not too sure they're willing to pursue testing it on Windows...
 [2007-03-19 19:07 UTC] ashnazg (Chuck Burgess)
The example code on PHP bug 40608 is working properly on the PHP v5.2 snapshot from today (php5.2-win32-200703191630.zip). So, the PHP issue seems to be corrected already. I'm testing PhpDocumentor against that PHP snapshot now to ensure this issue is cleared up...
 [2007-03-19 19:12 UTC] ashnazg (Chuck Burgess)
IT WORKS! Woohoo! So, guys, what's the proper way to warn the PhpDoc users to avoid PHP v5.2.1?
 [2007-03-19 19:14 UTC] ashnazg (Chuck Burgess)
Also, what's the proper way to close this bug, since the problem is a PHP bug but will still wreak havoc on PhpDoc for the unwary who run it on PHP v5.2.1?
 [2007-03-20 01:38 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-20 14:02 UTC] ashnazg (Chuck Burgess)
In my testing of this, the problem only manifests itself when the source code includes tutorials to be processed. Will that "exclude" tag effectively enforce "no 5.2.1 at all", or is there a less strict way to say "works in 5.2.1 but do not use with tutorials due to infinite loop PHP bug"?
 [2007-03-20 14:04 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-03-20 16:52 UTC] ashnazg (Chuck Burgess)
See if this patchset is to your liking... I've made a generic error code for recognized PHP bug conditions, and a standalone function to check for a known version/bug condition. This is set up in the Errors and Setup patches. I simply call this function from the start of the parserTutorial::isChildOf() method, to check for this specific bug.
 [2007-03-29 19:11 UTC] ashnazg (Chuck Burgess)
Updated the constant value of the error code in Errors-patch to "80"... I'm already using "79" in another waiting-to-be-accepted patch.
 [2007-04-02 20:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-04-02 20:57 UTC] ashnazg (Chuck Burgess)
If you're running PhpDocumentor against a medium/large codebase, then you don't want to use the PDF converter (see release notes for every release since 1.2.2... look for "speaking of speed"). That converter code seems to be inefficient enough to get noticeably worse as your codebase size increases.
 [2007-04-09 17:54 UTC] ashnazg (Chuck Burgess)
This fix has been committed to the CVS Head as well as the v.1.3.2 release branch.