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 641851 - Wrong line numbers in warnings involving C++ files
Wrong line numbers in warnings involving C++ files
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: build
1.8.3.1
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
[moved_to_github]
: 694690 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-02-08 17:41 UTC by Heinz Ozwirk
Modified: 2018-07-30 10:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Doxyfile used with the code above (71.20 KB, text/plain)
2011-02-08 17:41 UTC, Heinz Ozwirk
Details
My Testcase with Output (83.56 KB, application/x-zip-compressed)
2013-02-24 16:31 UTC, Kevin McBride
Details
Testcase from Bug 694690 (90.00 KB, application/x-tar)
2013-02-25 22:43 UTC, Kevin McBride
Details

Description Heinz Ozwirk 2011-02-08 17:41:29 UTC
Created attachment 180399 [details]
Doxyfile used with the code above

The line numbers reported in warning messages do not refer to the faulty line, but often to the first line of a comment block. For the following code, Doxygen reports warnings on lines 1, 16 and 10 (in that order).

/// 
/// @file		main.cpp
/// @author		heinz@ozwirk
/// @date		27.01.2011 File created
///

#include "stdafx.h"
#include "DoxyTest.h"

///
/// @parm This is not the main function.
///
void foo()
{}

/**
 *	@paran This is the main function.
 */
int _tmain()
{}

D:/Source/DoxyTest/main.cpp(1) : warning: Found unknown command `\ozwirk'
D:/Source/DoxyTest/main.cpp(16) : warning: Found unknown command `\paran'
D:/Source/DoxyTest/main.cpp(10) : warning: Found unknown command `\parm'
Comment 1 Philipp 2012-07-20 08:41:41 UTC
The same (or related) problem happens in Markdown files. The following .md file (between the ---):

-------------------------------------------------------------------------------------------------
Demonstrates wrong line problem         {#WrongLine}
===============================


# Introduction                          {#WrongLine_Introduction}

Some introduction

More important stuff

# The details                           {#WrongLine_TheDetails}

As described in the \ref DemoWrongLine_Introduction, blah blah blah.

And some more blah blah.
-------------------------------------------------------------------------------------------------

will report:

WrongLine.md(7): warning : unable to resolve reference to `DemoWrongLine_Introduction' for \ref command

(7) being the reported line number. The problem is actually on line 13.
Comment 2 Philipp 2012-08-15 13:16:24 UTC
While this is not much of a problem for unresolved references (can be found with 'search' in text editor), it is quite painful to find the cause of e.g. the following warning in a rather long markdown file:

 warning : Unexpected subsubsection command found inside section!
Comment 3 Philipp Moeller 2012-10-11 09:13:28 UTC
I can confirm this on svn r833 and on the 1.8.2 release.
Comment 4 james.q.arnold 2013-02-24 15:13:18 UTC
When this happens for me, the line number reported in the warning
message is lower than the line where the problem occurs.  I suspect
some input lines are being discarded without updating a line number
counter.  Perhaps a clue.

As a related (?) issue, I had a @ref command without the definition.
Got the following:

    page-main.dox:2151: warning: unable to resolve reference to `bsidx_qs_valid' for \ref command

The file page-main.dox had only 430 lines.  It was not really
C code, used no #include files, etc.  I don't know where the
line 2151 came from.
Comment 5 Kevin McBride 2013-02-24 16:31:41 UTC
Created attachment 237284 [details]
My Testcase with Output
Comment 6 Kevin McBride 2013-02-24 16:34:37 UTC
On 1.8.3.1, this bug does not reproduce.  I am closing this bug as "resolved - fixed".  If my attachment fails to work for you, or the bug otherwise reproduces itself with the latest version of doxygen, attach a testcase in a tar or zip and reopen this bug.
Comment 7 Philipp Moeller 2013-02-24 17:01:21 UTC
The issue persists when using Markdown as outlined in my post above. The original issue seems to be fixed. I don't know if I should open a new bug or reopen this one.
Comment 8 Dimitri van Heesch 2013-02-24 17:48:42 UTC
Hi Philipp, please open a new bug report and attach a self-contained example (i.e. a zip containg both the source code and a configuration file) so that I can easily reproduce the problem. Please don't paste the example in the bug report text.
Comment 9 Philipp Moeller 2013-02-24 18:16:34 UTC
The new bug-report is here https://bugzilla.gnome.org/show_bug.cgi?id=694610
Comment 10 Kevin McBride 2013-02-25 22:43:41 UTC
Created attachment 237395 [details]
Testcase from Bug 694690
Comment 11 Kevin McBride 2013-02-25 22:46:40 UTC
*** Bug 694690 has been marked as a duplicate of this bug. ***
Comment 12 Kevin McBride 2013-02-25 22:47:52 UTC
Per bug 694690 and attachment in comment #10, I am reopening this bug.
Comment 13 André Klapper 2018-07-30 10:08:30 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!