Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ enums being defined in multiple files after b265433 (multi-thread input processing) #7979

Closed
swt2c opened this issue Aug 26, 2020 · 6 comments

Comments

@swt2c
Copy link

swt2c commented Aug 26, 2020

Describe the bug
After upgrading to 1.8.20, I observed a problem where enums are being defined in multiple files (in addition to the one where they are actually defined). I bisected this behavior to b265433. This is the behaviour with b265433:

event_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>
filename_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>
headercol_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>
index.xml:    <member refid="interface_2wx_2listctrl_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
index.xml:    <member refid="event_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
index.xml:    <member refid="filename_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
index.xml:    <member refid="headercol_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
index.xml:    <member refid="webkit_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
index.xml:    <member refid="toplevel_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
index.xml:    <member refid="regex_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
index.xml:    <member refid="utils_8h_1adf764cbdea00d65edcd07bb9953ad2b7ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
interface_2wx_2listctrl_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>
regex_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>
toplevel_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>
utils_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>
webkit_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>

Expected behavior
This is the behaviour before b265433:

index.xml:    <member refid="webkit_8h_1aac34dfe6c6b73b43a4656c9dce041034ae1379fdf0911b272f03e8dc06c88b463" kind="enumvalue"><name>wxWEBKIT_NAV_LINK_CLICKED</name></member>
webkit_8h.xml:          <name>wxWEBKIT_NAV_LINK_CLICKED</name>

The enum value wxWEBKIT_NAV_LINK_CLICKED is only defined in webkit.h, so it should only show up in that XML file.

Version
Running on Fedora Linux 32. Compiled doxygen myself to bisect.

@swt2c
Copy link
Author

swt2c commented Aug 26, 2020

I should clarify that these are unnamed enums, e.g.,:

enum {
    wxWEBKIT_NAV_LINK_CLICKED = 1,
    wxWEBKIT_NAV_BACK_NEXT = 2,
    wxWEBKIT_NAV_FORM_SUBMITTED = 4,
    wxWEBKIT_NAV_RELOAD = 8,
    wxWEBKIT_NAV_FORM_RESUBMITTED = 16,
    wxWEBKIT_NAV_OTHER = 32

};

It appears to be that in b265433 and beyond that all unnamed enum values (from multiple declariations) are being combined into a single unnamed enum during the parsing.

@albert-github
Copy link
Collaborator

I tried to reproduce this and after a number of tries I was successful (anonymous things are always tricky), in future:

please attach a, small, self contained example (source+configuration file in a tar or zip) that allows us to reproduce the problem? Please don't add external links as they might not be persistent.

It looks like the anonymous enums are all put on one heap.
The output of the 1.8.18 version:
ok_1_8_18

The output of the 1.8.20 (and also of the current master63dc5b9b1b3e8fb875304a954e4df934b249034b of August 26, 2020) version:
err_1_8_20

The project I used: example.tar.gz

@swt2c
Copy link
Author

swt2c commented Aug 27, 2020

Thanks @albert-github - I was working on a SCCCE, but hadn't been successful in creating one yet. Thank you!

doxygen added a commit that referenced this issue Aug 28, 2020
@doxygen doxygen added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 28, 2020
@doxygen
Copy link
Owner

doxygen commented Aug 28, 2020

Please verify if the commit (9d9d085 ) fixes the problem. Don't close the bug report yet.

@swt2c
Copy link
Author

swt2c commented Aug 28, 2020

I can confirm this fixes the issue. 👍 Thanks a lot for the quick fix!

insooth pushed a commit to insooth/doxygen that referenced this issue Sep 16, 2020
insooth pushed a commit to UmlautSoftwareDevelopmentAccount/doxygen that referenced this issue Sep 16, 2020
insooth added a commit to UmlautSoftwareDevelopmentAccount/doxygen that referenced this issue Sep 17, 2020
… after b265433 (multi-thread input processing)"

This reverts commit 683b24e.
@doxygen
Copy link
Owner

doxygen commented Dec 27, 2020

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.0.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Dec 27, 2020
@doxygen doxygen closed this as completed Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants