After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 567346 - commented class inside of conditional statement (PHP)
commented class inside of conditional statement (PHP)
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.5.8
Other All
: Normal blocker
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 600635 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-01-11 10:13 UTC by Jitka Koukalova
Modified: 2009-12-30 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jitka Koukalova 2009-01-11 10:13:18 UTC
Please describe the problem:
When documented class is defined inside of conditional statement, doxygen freezes when parsing this source file. This bug is probably related to bug #549674.

Steps to reproduce:
1. svn co https://svn.cakephp.org/repo/branches/1.2.x.x
2. try to generate documentation with doxygen 1.5.8


Actual results:
Following files are causing doxygen freeze (no coredump) when parsing them (links points to line numbers with conditional statements - when these if() conditions are removed, docs are generated properly):
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/behaviors/translate.php#L499
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/tests/cases/libs/error.test.php#L99
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/tests/cases/libs/model/datasources/dbo/dbo_adodb.test.php#L156
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/tests/cases/libs/controller/component.test.php#L29
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/tests/cases/libs/controller/controller.test.php#L36


Expected results:


Does this happen every time?
Happens every time.

Other information:
Comment 1 Jitka Koukalova 2009-01-11 10:28:34 UTC
I forgot to mention environment: FreeBSD 6.2-RELEASE
Comment 2 Jitka Koukalova 2009-01-12 10:14:59 UTC
I tried to downgrade doxygen port and this bug exists also in versions 1.5.7.1, 1.5.7, 1.5.6_1 and 1.5.6. Doxygen version 1.5.5 works ok.
Comment 3 Dimitri van Heesch 2009-10-11 10:02:59 UTC
Confirmed. 

You can work around the issue by putting

   // stop parsing if we don't make progress
   if (parseMore && position==inputPosition) parseMore=FALSE;

before

   if (parseMore) position=inputPosition; else position=0;

in function parseCommentBlock() in commentscan.l

The exact reason why the comment parser gets stuck is not yet clear to me.
Comment 4 Dimitri van Heesch 2009-11-10 19:51:45 UTC
*** Bug 600635 has been marked as a duplicate of this bug. ***
Comment 5 Dimitri van Heesch 2009-12-30 13:38:32 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.6.2. Please verify if this is indeed the case and reopen the
bug if you think it is not fixed (include any additional information that you
think can be relevant).