doxygen icon indicating copy to clipboard operation
doxygen copied to clipboard

non-const getGroupDef() called on aliased member

Open jvdevel opened this issue 7 years ago • 7 comments

After upgrading to 1.8.16, I get lots of traces with:

.
.
.
Creating members for template instances..
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
error: non-const getGroupDef() called on aliased member. Please report as a bug.
.
.
.

I have not been able to create a simple test case to reproduce it (it happens in a large project), but I can debug it. Unfortunately, I don't know the doxygen internals, so I cannot help fixing it, but I can provide a call stack if it helps:

function file(line)
MemberDefAliasImpl::getGroupDef(MemberDefAliasImpl * const this) doxygen\src\memberdef.cpp:749
MemberGroup::insertMember(MemberGroup * const this, MemberDef * md) doxygen\src\membergroup.cpp:95
addMembersToMemberGroup(MemberList * ml, MemberGroupSDict ** ppMemberGroupSDict, const Definition * context) doxygen\src\util.cpp:6322
NamespaceDefImpl::addMembersToMemberGroup(NamespaceDefImpl * const this) doxygen\src\namespacedef.cpp:448
addMembersToMemberGroup() doxygen\src\doxygen.cpp:8402
parseInput() doxygen\src\doxygen.cpp:11559
main(int argc, char ** argv) doxygen\src\main.cpp:37

jvdevel avatar Aug 21 '19 16:08 jvdevel

One small question is the project proprietary (I think so) of public. In the later case please give the link.

albert-github avatar Aug 21 '19 16:08 albert-github

Is a propietary project, but I managed to generate a small fragment that raises the error:

namespace ns
{
    inline namespace traits
    {
        /// \name traits
        /// \{

        /// \brief meta enum identification trait
        template<typename T> using is_meta_enum = ns::_Private::_Is_meta_enum<T>;

        /// \brief meta enun identification boolean
        template<typename T> constexpr bool is_meta_enum_v = is_meta_enum<T>::value;

        /// \}
    }
}

It is very strange, because it happens only if a combination of things happen at the same time:

  • It happens with two namespace levels,
  • and the nested one is inline,
  • and it contains a group (\{),
  • and it contains at least two documented elements.

jvdevel avatar Aug 22 '19 11:08 jvdevel

The referenced commit should address this issue. Note that the warning can be produced in other situation as well, especially when using inline namespaces. So please let me know if you see more issues and try to isolate them in a small example that can be shared.

doxygen avatar Aug 25 '19 14:08 doxygen

Validated: no longer happens.

Thanks!

jvdevel avatar Aug 25 '19 20:08 jvdevel

So, should I close the issue?

jvdevel avatar Aug 26 '19 16:08 jvdevel

Please don't close the issue as this will be done at the moment of a release

albert-github avatar Aug 26 '19 16:08 albert-github

This issue was previously marked 'fixed but not released', which means it should be fixed in doxygen version 1.8.17. 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 avatar Dec 28 '19 10:12 doxygen