Bug 2641

Summary: [Juno] Display issue in eclipse with clutter/gtk template project
Product: [Yocto Project Subprojects] Eclipse Plugin Reporter: Hongna Xu <hongnax.xu>
Component: eclipse-pluginAssignee: Jessica <jessica.zhang>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: Low CC: alexandru.c.georgescu, ioanax.grigoropol, jiajun.xu, lianhao.lu, yp.ep.watcher, yp.watcher
Version: unspecified   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
debug perspective
none
the Problems tab none

Description Hongna Xu 2012-06-21 09:35:52 UTC
Created attachment 602 [details]
debug perspective

with branch JunoTCF:6d43a541648f54bb80eea451b78174339243f9d6 test on Eclipse Classic Juno 4.2RC3 64bit version, the project c/c++ gtk/clutter based on Yocto ADT project could be remoted and run on remote target, but i debug it when swich to debug persperctive, semantic errors come up in clutter.c or gtk.c fil, also in Problems tab.
Comment 1 Hongna Xu 2012-06-21 09:37:18 UTC
Created attachment 603 [details]
the Problems tab
Comment 2 Hongna Xu 2012-06-28 06:10:40 UTC
Hi jessica, lianhao
From my deep testing, i found that it is just the display issue in eclipse, if you open the clutter.c/gtk.c immediately after create the project(my project name is clutter/gtk), it always shows semantic errors, but it could be built/compiled/run/debug. just like jeesica said, if you reopen the project, it would build pass cause we don't open the .c file in the perspective and we can't see the errors. 
   There maybe some linkage break or something other reasons.
Comment 3 Lianhao Lu 2012-06-28 08:53:01 UTC
Hongna, 

after a successful build, when there is still parsing error in the editor, could you try modify the *.c file(i.e. adding some space in C statement) and trigger to rebuild to see if this problem goes?
Comment 4 Hongna Xu 2012-06-28 09:11:51 UTC
(In reply to comment #3)
> Hongna, 
> 
> after a successful build, when there is still parsing error in the editor,
> could you try modify the *.c file(i.e. adding some space in C statement) and
> trigger to rebuild to see if this problem goes?

Lianhao, as you expect, after modify the *.c file, the errors are gone.
Comment 5 Jessica 2012-06-29 22:58:06 UTC
the bug is also reported as an upstream issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=351549.  I'm also lowering its priority since seems there's work around
Comment 6 Lianhao Lu 2012-07-03 00:38:49 UTC
My guessing is that after the build, the CDT parsing model is NOT completed refreshed, that's why we see some parsing errors are gone(i.e. can't find included header files etc.), ans some parsing errors are still there(i.e. undefined clutter structure, etc.) until we modify the source file to trigger a reparse again.
Comment 7 Jessica 2012-07-03 01:31:52 UTC
Yeah, after exploring the CDT core part most of time last week, I found there're couple things got involved when dealing with parsing and persistent storage. There're pdom, gnu persistent template, buildmanager, ccodeparser, etc.  The issue is caused by the synching between these different components during different stage.  That's why when the project 1st created from the template, the customized sysroot was included in the includes list.  But toward the end of project finalization, the gnu template includes override the discovered includes, thus we saw the behavior of only /usr/... dirs are listed under includes, which is a known issue that we reported.  Also, there's a mapping for all the types.  This explains why we saw right after the project is created, the clutter header file is reported can't be found togegher with all the clutter related types defined in the clutter header files.  When we run the build, the buildmanager will use the build setting and its own parser, which is able to find all the depended headers for clutter program and updated the includes with the correct clutter header dirs.  But unfortunately this didn't trigger update the typedef map thus we still see those type def not found errors after the build.  Only when we manually change something in the code after the build, which at this time all the correct includes are found, CDT finally is able to look up all the typedefs and build correct map for them.
Comment 8 Ioana Grigoropol 2013-04-03 08:46:40 UTC
While investigating  bug 3942, I have found that the semantic errors appears due to the fact that the project was indexed by the C plugin without the headers(the messages in the console: 1 sources, 0 headers) ...

The project can be easily cleaned of errors by invoking from the right-click menu of the project the entry "Index->Rebuild" or by simply editing(modify & save) the file in order to trigger a new indexing of the files.
Comment 9 Ioana Grigoropol 2013-04-04 10:43:49 UTC
*** Bug 3942 has been marked as a duplicate of this bug. ***
Comment 10 Jessica 2013-11-15 00:09:02 UTC
This is really an upstream bug
Comment 11 Armin Kuster 2019-05-23 15:06:52 UTC
closing