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 596872 - Fortran: Backslashes in literals are always treated as special chars
Fortran: Backslashes in literals are always treated as special chars
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: general
1.6.1
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
: 602952 630580 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-09-30 13:15 UTC by arthur
Modified: 2018-07-30 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Minimal test file with literal backslashes that cause crash. (156 bytes, text/plain)
2010-12-24 08:37 UTC, arthur
  Details
Doxyfile for use with backslash.f90 (63.84 KB, application/octet-stream)
2010-12-24 08:38 UTC, arthur
  Details
Potential patch (837 bytes, patch)
2010-12-24 12:45 UTC, Daniel Franke
none Details | Review
Another test case that causes Doxygen to crash (20.68 KB, application/x-compressed-tar)
2011-02-25 16:34 UTC, Richard Ash
  Details

Description arthur 2009-09-30 13:15:26 UTC
In Fortran code one may write a literal 'foo\bar' and the \ will be considered a literal backslash (at least with command line option -fno-backslash, with -fbackslash it *is* considered a metacharacter).

The doxygen parser crashes on this, by stating an error at line n+1 (where n is nr of lines in file).
For example:
********************************************************************
Error in file D:/dam_ar/MultiGridClass.f90 line: 2675, state: 20
********************************************************************
R6025
- pure virtual function call
(the file has 2674 lines)

A command-line option for the fortran-mode of doxygen could solve this.
Comment 1 Daniel Franke 2010-12-23 21:58:46 UTC
Please attach a fully self-contained testcase, i.e. a fortran file with which doxygen shows above error plus the corresponding doxyfile.

This ...

program x
  print *, 'foo\bar \n'
end program

... does not show any problems.
Comment 2 arthur 2010-12-24 08:37:14 UTC
Created attachment 176987 [details]
Minimal test file with literal backslashes that cause crash.
Comment 3 arthur 2010-12-24 08:38:59 UTC
Created attachment 176988 [details]
Doxyfile for use with backslash.f90

Nothing special about this Doxyfile, so just for completeness.
Comment 4 Daniel Franke 2010-12-24 12:37:38 UTC
*** Bug 602952 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Franke 2010-12-24 12:38:31 UTC
*** Bug 630580 has been marked as a duplicate of this bug. ***
Comment 6 Daniel Franke 2010-12-24 12:45:24 UTC
Created attachment 177013 [details] [review]
Potential patch

This patch solves the issue, but the rules it removes where probably introduced with a reason. Needs to be carefully checked for regressions.
Comment 7 Richard Ash 2011-02-25 16:32:59 UTC
I've hit this same bug independently, applied the patch onto 1.7.3 release, and it builds the documentation for my mixed set of C, C++ and Fortran packages without crashing, which is good. I haven't yet had time to check the docs for any other changes introduced by the patch.
Comment 8 Richard Ash 2011-02-25 16:34:36 UTC
Created attachment 181928 [details]
Another test case that causes Doxygen to crash

This is another test case which is different but triggers the same bug (I believe, it is certainly fixed by the same patch).

This is an issue regardless of whether the Preprocessor is enabled or not, it crashes with both settings.
Comment 9 Soeren Huettemann 2011-09-15 10:40:43 UTC
Any progress on this issue?
Bug 623296 and Bug 596872 prevent us from using Doxygen with our Fortran Projects.
I really would like to use Doxygen. I am willing to test bug fixes.
Comment 10 albert 2018-06-27 14:44:15 UTC
The issue in this bug report the use of the backslash.

This has ben solved by my proposed patch on github (pull request 773, https://github.com/doxygen/doxygen/pull/773).  

The mentioned bug_623296 (by Soeren Huettemann, I taken the liberty to add him on the CC list of that issue) is a different problem and will be investigated with that bug report.
Comment 11 André Klapper 2018-07-30 10:53:43 UTC
As discussed in https://github.com/doxygen/doxygen/pull/734 , Doxygen has moved its issue tracking to 

   https://github.com/doxygen/doxygen/issues

All Doxygen tickets in GNOME Bugzilla have been migrated to Github. You can subscribe and participate in the new ticket in Github. You can find the corresponding Github ticket by searching for its Bugzilla ID (number) in Github.

Hence I am closing this GNOME Bugzilla ticket.
Please use the corresponding ticket in Github instead. Thanks a lot!