-
Notifications
You must be signed in to change notification settings - Fork 362
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
idlc fails assert and aborts on delete_const_expr #1911
Comments
Ok, I should have looked closer at the error messages right before this happened:
So it looks like the problem is and IDL message being included multiple times. Adding include C-style include guards fixed the issue. Would it be worth adding a section to the documentation about what preprocessor directives are used and can be useful? Just because I had |
That's good! It is not good that it crashes, so I would like the crash to be fixed. Unfortunately I haven't managed to reproduce it quickly by doing some obvious permutations of multiple definitions for a very simple type. I probably should try it with a ROS message or two, but perhaps you have some further insight as to what triggers it.
It uses a pretty standard-compliant C99 preprocessor, so anything that is supported by a C99 preprocessor should work. It predefines But yes, it would be good for the documentation to point this out!
I suppose on our side everyone assumed that everyone knew that IDL doesn't allow redefinitions ... I think it would've been fine if the error message hadn't been obscured by the crash, but recommending the use of include guards in the documentation would no doubt be a good addition. |
I should be able to come up with a simple reproduction I think |
Here is a reproduction of the bug: https://github.com/fireflyautomatix/repro-cyclonedds-1911 |
Thank you so much! After a bit of digging, I've managed to reduce it to this:
But then I found another few interesting ones ... this also fails:
but this doesn't, and I think that's because while the constant
With that observation, one would think:
should be ok, too, and indeed it is. I need to study this a bit more, but I have at least some idea now ... |
Version: Reproducible on both master and 0.10.3
I have built
idlc
in debug mode and in release mode.I am using the cmake function
idlc_generate
to do code generation for a long list of IDL files, some of which include others. I keep getting these aborts, but inconsistently. It doesn't consistently fail on the same messages. I have yet to reproduce it with just a single ad-hoc invocation, even using the exact command that failed when invoked by CMake. So I'm suspecting it has to do with many repeated invocations, although I'm not sure why. I've reproduced it with both a clean output directory and an output directory with generated files already in it.I'm not familiar with how this part of the code works, but I'd be happy to grab more info or relevant variable states, since I can reproduce it in debug mode. I wish I could make a minimal reproducible example but I don't know what is triggering it.
The commands that
idlc_generate
is running look like this (I am usingcolcon
to invoke CMake).Stacktrace:
The text was updated successfully, but these errors were encountered: