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 780174 - found ASSERT: "0" in e:\doxygen\src\docparser.cpp (5793) todo:6: warning: Unexpected tag
found ASSERT: "0" in e:\doxygen\src\docparser.cpp (5793) todo:6: warning: Une...
Status: RESOLVED DUPLICATE of bug 746419
Product: doxygen
Classification: Other
Component: general
1.8.13
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2017-03-17 00:57 UTC by Michael Fontanini
Modified: 2018-05-16 17:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Demo C# console app demonstrating issue. (154.59 KB, application/x-zip-compressed)
2017-04-29 01:43 UTC, Michael Fontanini
Details

Description Michael Fontanini 2017-03-17 00:57:23 UTC
When you run Doxygen on your project, if you scroll up to the top of the error messages about members that aren't documented and such, you see this error:

found ASSERT: "0" in e:\doxygen\src\docparser.cpp (5793) todo:6: warning: Unexpected tag 


This error has been present for at least the last several versions of Doxygen and given that its right there staring you in the face, its odd it hasn't been fixed yet.

If this error refers to a messed up tag in one of my files, it is utterly useless as it doesn't tell you which file its in or where in that file it is. So if it is trying to tell me there is a messed up tag in one of my files, this is rather pitiful error message design. lol

Additionally, this error message appears to have the file path inappropriately hard-coded into it, as there is no drive E in my computer... Thus it makes no sense that Doxygen would be referencing that non-existent drive when its files are in fact installed on drive C!
Comment 1 albert 2017-03-17 18:32:59 UTC
This must be a special case as I don't see the message when I run my codes.

I think that that it are 2 separate messages:
- found ASSERT: "0" in e:\doxygen\src\docparser.cpp (5793)
- todo:6: warning: Unexpected tag 

the first one is from the file docparser.cpp (where the build took place on the e: drive and this is added by the compiler):
    default:
      // we should not get here!
      ASSERT(0);
      break;

The "Unexpected tag" I trace back (as there are a number of occurrences with some more text behind it. Didn't all of the text enter the bug message?   or are it special HTML characters?

Can you please attach a self-contained example (source+config file in a tar or zip) that allows us to reproduce the problem?
Comment 2 Michael Fontanini 2017-03-19 02:25:12 UTC
Ok so I've been messing with this more. I fixed all of the undocumented items just to clean up the Doxygen output and get that done. I also did some other experimentation. I ran Doxygen on each subfolder individually. No individual folder causes this error. It only happens when I have it scanning all of the subfolders.

Now that the undocumented member warnings are fixed, there are no errors except this one, which oddly appears after the line "finished..." So do you want me to just send the whole Visual Studio project? I also want to pass on  to you that I tried using a new default Doxygen configuration, and the error still appears when compiling docs for all subfolders. Here's what the error looks like. It's the same as before, except an extra "found" line appeared after the error. The second occurrence of the error also has a different number after "todo"


Generating graph info page...
Generating directory documentation...
Generating index page...
Generating page index...
Generating module index...
Generating namespace index...
Generating namespace member index...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating member index...
Generating file index...
Generating file member index...
Generating example index...
finalizing index lists...
writing tag file...
lookup cache used 1450/65536 hits=6645 misses=1593
finished...
ASSERT: "0" in e:\doxygen\src\docparser.cpp (5793)
todo:4: warning: Unexpected tag 
found ASSERT: "0" in e:\doxygen\src\docparser.cpp (5793) todo:6: warning: Unexpected tag 
found
*** Doxygen has finished
Comment 3 albert 2017-03-19 09:14:27 UTC
From the fact that the parts "Unexpected tag" and "found" are on different lines it looks like there is a strange character in one of the input files.

You wrote "So do you want me to just send the whole Visual Studio project?", I don't fancy plowing through a Visual Studio project.
Please first try to run it outside Visual Studio i.e. on the command line.
You could reduced the code, but looks like you tried already and were not successful, or install the doxygen source code. compile it and put some print statements in it to see exactly what happens.

Otherwise you attach a self-contained example (source+config file in a tar or zip) that allows us to reproduce the problem?
Comment 4 Michael Fontanini 2017-03-21 06:03:42 UTC
Found the culprit. I did the reverse of my previous test. I removed folders from the project one at a time and rescanned with Doxygen. This time after removing several folders the error went away. So this means Doxygen is sending mixed messages for some reason. With this new test, I found that two folders would cause the error. As I said in previous post, each folder scanned error free but only when scanned by itself. When scanned as part of the whole project, the error comes up. 

So then I went one level deeper. I removed one of the offending folders to isolate just one of them. With only one offending folder still present in the project folder, I started removing files from the offending folder one at a time until the error went away again. I was able to isolate one file in each of the two offending folders in this way.

After a bit of messing around in the first of the two offending files, I found the cause. The culprit is Doxygen's todo command. It seems that if you place a todo command inside a summary block, its fine. But if you place a todo command inside a remarks block, then this error happens, but only when the entire project is scanned. I assume its something that's happening when doxygen is building the documentation since there is technically no error in the source files. Moving the offending todo command into the summary block makes the error go away. So I did that in both offending files and no error now.

If this is a bug and not an intended behavior in Doxygen, I hope this new information can help you guys fix it.
Comment 5 Michael Fontanini 2017-04-28 04:04:10 UTC
I encountered this issue again today. I know now specifically what is going on. The problem is that Doxygen's \todo command has an unnecessary restriction for some reason. It seems it requires that there be a blank line above and below it in the comments or it will throw an unexpected tag error.

If you include {}s around the text of the todo, then you don't have to have a blank line above the \todo command, it seems. The same is not true for having a blank line below the \todo command. This strange restriction is not even mentioned in the Doxygen documentation for the \todo command. That's a pretty important detail to just leave out.
Comment 6 albert 2017-04-28 17:10:13 UTC
Please attach a self-contained example (source+config file in a tar or zip) that allows us to reproduce the problem.
Comment 7 Michael Fontanini 2017-04-29 01:43:23 UTC
Created attachment 350700 [details]
Demo C# console app demonstrating issue.
Comment 8 Michael Fontanini 2017-04-29 01:43:48 UTC
Hey guys. I made a tiny test C# project (just a console app) using the same Doxygen config I am using with my project where I encountered the error. At first, I had trouble recreating the problem but I got it to come out again. It seems its not because of whether or not there is a blank line above and/or below the \todo tag, but rather it’s a bug in how Doxygen compiles the documentation it seems. The number beside “todo” in the error message obviously isn’t referencing a line in the source file which is a big hint. Here is the full error that appears at the very end of the Doxygen output:

ASSERT: "0" in e:\doxygen\src\docparser.cpp (5793)
todo:4: warning: Unexpected tag 
found
*** Doxygen has finished

So I tried a few things and this project demonstrates the cause. If you have two classes in the same namespace that both have a \todo tag, then the error happens. So it seems to be a bug in how Doxygen is compiling the documentation. The project has two source files, with an empty class in each and some comments to create the error condition in Doxygen. There is a CSS file too but I don’t think it matters. I added it in just to make sure that wasn’t causing the issue but the error didn’t happen after that. I just left it in rather than fix the Doxygen config so it doesn’t complain about the CSS file not being there. It’s a super short text file anyway.

This error also happens if you put two classes in the same file and give both of them a \todo tag in their comment blocks. If you put a blank line both above and below the \todo tag in both classes, then the error will go away. It doesn’t make sense that \todo tags in two separate classes should affect each other, but that does indeed cause the error. This is consistent with the offending code in my other project, too. There, I have two classes in the same folder/namespace that both have a \todo tag, and it was right after adding those \todo tags that the error appeared for me yesterday. 

The .Doxyfile is in the main folder with the Visual Studio solution (.Sln) file.

I hope this information and the demo project is helpful for you. Doxygen is an awesome tool.
Comment 9 albert 2017-05-18 16:52:19 UTC
Can you please attach a (small) self-contained example (source+config file in a tar or zip) that allows us to reproduce the problem?

Furthermore also specify the doxygen function you used.
Comment 10 albert 2017-05-18 16:53:24 UTC
Sorry posted text in wrong issue.
Comment 11 albert 2017-05-28 17:12:46 UTC
Had a look at it, the assert is due to the, internal, setting of _setscope.

The second \todo causes the reported error error.
Moving the \todo out of the <summary> tag solves the problem. I think it is by design that the \todo is not supported inside the <summary>, compare it with a \brief tag.
In case we have a \todo tag in a \brief tag than this \brief tag will end at the \todo.

The error message could be clearer.
Comment 12 albert 2018-05-16 17:31:37 UTC
I've just pushed a proposed patch to github (pull request 728, https://github.com/doxygen/doxygen/pull/728).

*** This bug has been marked as a duplicate of bug 746419 ***