deep c integration - problem with includes

91 views
Skip to first unread message

Simeon

unread,
Feb 18, 2019, 9:54:38 AM2/18/19
to YAKINDU User
Hello,

I'm using YAKINDU Statechart Tools Professional Edition version 3.5.0 and im encountering a problem with the deep c integration.

This is not reliably reproducable and very inconsistent in its occurance

I'm including a bunch of header files with every transitively dependant header. I am now importing the headers containing the functions I use in my statechart - no errors so far.

Now I sometimes encounter the problem of being able to use some, but not all the functions from particular headers.

- I can see all functions in the "Includes"-Part of the project explorer.
- The content assist shows only the functions I can actually use.

As said already, this is highly inconsistent. I had a bunch of projects all error free and when i rebuilt them a few days later, the errors were back.
It seems to affect mostly the same headers.

Error messages are:

-Access to feature '' has no effect.    [***].sct    /[***]/[***]    line: 1 /[***]    Statechart Check (Fast)     

-Could not find declaration of  '[***]'   [***].sct    /[***]/[***]    line: 1 /[***]/[***]/[***].sct    Statechart Check (Fast)

I attached an image showing the project explorer and content assist.

Any ideas to solve this are much appreciated.

Thanks and greetings,
Simeon
includeproblem.png

Rene Beckmann

unread,
Feb 19, 2019, 2:57:03 AM2/19/19
to YAKINDU User
Hey Simeon,

thank you for the report. This is a very strange issue indeed.
Is there any difference between those functions that you can use and those that you can't? For example, does the function getU_functionB maybe have a parameter with a type from another header (a typedef)?
If you run into the situation where you can only use a subset of the functions in the header, do those working functions come strictly before the non-working functions in the header file? Is there any construct between them that might be an issue, like an #ifdef?
Under what circumstances does the issue go away? Do you have to restart the tool, reopen the header, or change it? 
It would be ideal if you could provide a minimum working example where you have the issue. If your project is something you can't share, you could try to rebuild it structurally (change all names etc) and try to achieve the same behaviour.

Regards,
René

Simeon

unread,
Feb 19, 2019, 8:34:48 AM2/19/19
to YAKINDU User
Hello René,

so it has nothing to do with the order of the functions in the header. #ifdef and other constructs also seem to work fine.

I seem to get less errors by reducing the number of headers I import (even though i thougth Yakindu doesnt support transitive imports?).

I now only have one type of error left and as you suggested, its got something to do with typedefs (i think).

In my included headers are some typedefs(enums) and those seem to get imported, i can see them in the Project Explorer, i can see the functions using them correctly in the Project Explorer.
I can also use the enums in my Statechart (content assist also working) but when i try to use functions that make use of them, i'm getting 2 types of errors.

1.
used- (state-"entry/"): someFunction(someEnum)
error: Incompatible types [someEnum]__type and UnsupportedType.    [...].sct    / [...]/ [...](sct)    line: 1 / [...]/ [...]/ [...].sct    Statechart Check (Fast)

2.
used- (transition guard): someFunctionGetsEnum() == someEnum.someEnumerator
error:
Comparison operator '==' may only be applied on compatible types, not on UnsupportedType and [someEnum]__type.    [...].sct    / [...]/ [...](sct)    line: 1 / [...]/ [...]/ [...].sct    Statechart Check (Fast)

Image shows the Project Explorer, Content Assist and Problems.

I'm still trying to reproduce it on a smaller scale, so i can send you an example project.

Thanks,
Simeon
includeproblem2.png
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Thomas Kutz

unread,
Feb 28, 2019, 5:55:41 AM2/28/19
to YAKINDU User
Hey Simeon,

we have released version 3.5.2 which contains some fixes for the C domain. It might be that yours is also fixed, so please give it a try and let us know if the issue still persists.

Best regards,
Thomas
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Simeon

unread,
Feb 28, 2019, 7:15:29 AM2/28/19
to YAKINDU User
Hello Thomas,

I could finally reproduce the problem (today, after patching). After all that time i'm not even sure if all of this isn't just intended behaviour.

I'm currently unable to attach a file to this message, i will try again later.

Everything works as long as the headers are part of the project. But if you try to include them via "Paths and Symbols -> Includes", errors occur:

Is this working as intended?

Regards,
Simeon

Thomas Kutz

unread,
Mar 4, 2019, 10:03:10 AM3/4/19
to YAKINDU User
No this is not working as intended. Looks like a bug for me, but we will need to have a deeper look into it.

Thanks for reporting this!

Robin Herrmann

unread,
Mar 5, 2019, 8:16:05 AM3/5/19
to YAKINDU User
Hey Simeon,

I spend some time to figure out what's going wrong.
This is not really a bug or something caused by SCT. We are using CDT to parse the headers. If the headers are stored on the filesystem (and not in a C Project) CDT creates a Problem Binding, which we cannot resolve. The project still can be build, but you should recognize that links in your header "func.h" for "MyEnum" will not work.

A simple workaround is using:
#include <header.h>

instead of :
#include "header.h"

This worked for me. Could you please try this?

For further reading see:

Greetings,
Robin


Am Donnerstag, 28. Februar 2019 13:15:29 UTC+1 schrieb Simeon:
Reply all
Reply to author
Forward
0 new messages