This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 127196 [details] unrecognized types when editing code, back to work after reparsing project It is common that NB 7.2 has problems with bigger project (> 100 files + MinGW includes + wxWidgets includes) and code parser fails to find include files, functions or types - see the picture. It happens during code editing, and in most cases it back to work after a while. When its not, running command "Code Assistance->C++ Reparse Project" will help. But sometimes the only way is to restart NB. Maybe there are some parser settings that could help with this?
Product Version = NetBeans IDE 7.2 (Build 201207171143) Operating System = Windows XP version 5.1 running on x86 Same on Win7 x64 Java; VM; Vendor = 1.6.0_31 Runtime = Java HotSpot(TM) Client VM 20.6-b01
The reason here is certainly not the project size. We have test projects with thousands of files. The information provided isn't enough to diagnose the issue. The bad thing is that some of the includes are not found. All the rest is secondary. There could be a few reasons for that. So we need to know: 1) the way how the project was created 2) the include search path (hovering over a highlighted include directive hold the Ctrl key to see that). Check if it is correct and put this information here if possible 3) Try to [backup and] remove your userdir and check if problem persists 4) Please try 7.3 Beta or nightly builds because a few similar issues were fixed after 7.2 release time. Please let us know about your findings.
Probably You are right - the number of files doesn't matter. Now working on smaller embedded project and again parser lost some of include files (main structure is recognized, but it's field defined in another header file is not). Now it happed during debugging session. At this moment i did the automatic update. Latest builds? The behavior I described is present since I'm using NB6.8 Now the includes: Code Assistance C:\CodeSourceryG++Lite\lib\gcc\arm-none-eabi\4.5.2\include C:\CodeSourceryG++Lite\lib\gcc\arm-none-eabi\4.5.2\include-fixed C:\CodeSourceryG++Lite\arm-none-eabi\include C:\CodeSourceryG++Lite\arm-none-eabi\include\c++\4.5.2 C:\CodeSourceryG++Lite\arm-none-eabi\include\c++\4.5.2\arm-none-eabi C:\CodeSourceryG++Lite\arm-none-eabi\include\c++\4.5.2\backward C:\CodeSourceryG++Lite\lib\gcc\arm-none-eabi\4.5.2\include C:\CodeSourceryG++Lite\lib\gcc\arm-none-eabi\4.5.2\include-fixed C:\CodeSourceryG++Lite\arm-none-eabi\include Hovering Ctrl+Alt over include file name: (all are black, not red, so the paths are correct) --- File D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\common\trace.h From project _projname_ Analyzed user include paths: D:\Dokumenty\Projekty\_projname_\gui\src D:\Dokumenty\Projekty\_projname_\gui\src\newlib D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\common D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\platform D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\egol\controls D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\egol\drawer D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\egol\gl D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\egol\project D:\Dokumenty\Projekty\_projname_\gui\src\egol\include\egol\system D:\Dokumenty\Projekty\_projname_\gui\src\egol\platform D:\Dokumenty\Projekty\_projname_\gui\src\csp D:\Dokumenty\Projekty\_projname_\gui\src\csp\cmsis D:\Dokumenty\Projekty\_projname_\gui\src\csp\mcu D:\Dokumenty\Projekty\_projname_\gui\src\etius D:\Dokumenty\Projekty\_projname_\gui\src\bsp_grinn Analyzed system include paths: C:\CodeSourceryG++Lite\arm-none-eabi\include\c++\4.5.2 C:\CodeSourceryG++Lite\arm-none-eabi\include\c++\4.5.2\arm-none-eabi C:\CodeSourceryG++Lite\arm-none-eabi\include\c++\4.5.2\backward C:\CodeSourceryG++Lite\lib\gcc\arm-none-eabi\4.5.2\include C:\CodeSourceryG++Lite\lib\gcc\arm-none-eabi\4.5.2\include-fixed C:\CodeSourceryG++Lite\arm-none-eabi\include Ctrl+Alt+Click to open include hierarchy --- The unresolved identifier is from 'src' path. Yesterday the editor highlighted some of the include directives, but today did not. I can click and navigate through the includes, but not the unresolved fields. However, I can navigate from file where the structure with 'unresolved' field is defined. So the problem is local to some opened file, not the whole project. Now, running "Reparse project" fix everything. For an hour, or for a couple of minutes. BTW i'm wondering why this command was removed from the MPLAB X? You are asking the way the project was created - the first one from the creator, C++ Application. The next one is modification of previous. I was looking into the project file for some invalid definitions or include paths, but it's clear - everything is like expected when looking at the project tree files, includes and so on.
Again! I'm debugging the code, and editor highlighted all the include directives in current file. But now the paths are: --- Unresolved directive #include "gol_frame.h" Analyzed system include paths: C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++ C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\mingw32 C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\backward C:\MinGW\lib\gcc\mingw32\4.6.1\include C:\MinGW\include C:\MinGW\lib\gcc\mingw32\4.6.1\include-fixed Ctrl+Alt+Click to open include hierarchy --- What I'm seeing is the parser looks for different toolchain than expected! And none of project specific includes are visible here.
Can you please try 7.2 or 7.3 beta. Lots of fixes in this are were done since 6.8! The issue is most likely fixed there. Please confirm.
No no no, I'm using 7.2 - take a look at the second comment :) My intention was to say this issue is not a new one. I'll try 7.3 beta as you suggest.
Misinterpreted user's comment on version. Managed project, include paths get screwed for some reason.
Created attachment 127369 [details] local definer variable unresolved
Created attachment 127370 [details] unresolved include file
BTW i cannot download 7.3beta - the file server hangs time after time, after downloaded 43MB :( http://dlc.sun.com.edgesuite.net/netbeans/7.3/beta/bundles/netbeans-7.3beta-cpp-windows.exe
(In reply to comment #10) > BTW i cannot download 7.3beta - the file server hangs time after time, after > downloaded 43MB :( > http://dlc.sun.com.edgesuite.net/netbeans/7.3/beta/bundles/netbeans-7.3beta-cpp-windows.exe Download finished. Doesn't matter anymore.
(In reply to comment #9) > Created attachment 127370 [details] > unresolved include file What is a properties of file callbasks.cpp? I'm interesting of include paths and macros. What is output of command: #wx-config --cxxflags
The properties all global to all file projects, no exception. It's not specific file dependent. It's not project dependent (MinGW+wx or SourceryG++ for ARM). It's not compiler dependent. It's not additional includes and library (like wx) dependent. Parser sometimes go mad, although the project compiles and build correctly with 0 warnings. Currently I'm testing 7.3b, who knows, maybe the problem is already fixed...
Please, provide compile line of file callbasks.cpp (from build log)
7.2 CLEAN SUCCESSFUL (total time: 313ms) mkdir -p build/Dbg_Designer/MinGW-Windows/designer rm -f build/Dbg_Designer/MinGW-Windows/designer/callbacks.o.d g++.exe -O0 -g2 -Wall -Wshadow -Winit-self -Wredundant-decls -Wunreachable-code -Wno-ctor-dtor-privacy -gstabs -Winline -c -g -DCHECK_MEMORY_OVERWRITE -DEGOL_HMI=1 -DHAVE_W32API_H -DNDEBUG -DNOPCH -DWINVER=0x0500 -D__WXMSW__ -I/C/wxWidgets/include/ -I/C/wxWidgets/lib/gcc_lib/msw -I/C/wxWidgets/additions/include -Ivfs/src -Ivfs/src/elm_fat -Ivfs/src/elm_fat/option -Inewlib -Idesigner -Iinclude/common -Iinclude/egol/controls -Iinclude/egol/drawer -Iinclude/egol/gl -Iinclude/egol/project -Iinclude/egol/system -Iinclude/egol/hmi -Iinclude/platform -Iegol/expat-2.0.1/lib -Iegol/project -Iegol/drawer/basic -Iplatform/generic -Iplatform/win32 -Idesigner/ctb/include -Iinclude/lua -MMD -MP -MF build/Dbg_Designer/MinGW-Windows/designer/callbacks.o.d -o build/Dbg_Designer/MinGW-Windows/designer/callbacks.o designer/callbacks.cpp BUILD SUCCESSFUL (total time: 12s) ----------- 7.3b CLEAN SUCCESSFUL (total time: 359ms) mkdir -p build/Dbg_Designer/MinGW-Windows/designer rm -f build/Dbg_Designer/MinGW-Windows/designer/callbacks.o.d g++.exe -O0 -g2 -Wall -Wshadow -Winit-self -Wredundant-decls -Wunreachable-code -Wno-ctor-dtor-privacy -gstabs -Winline -c -g -DCHECK_MEMORY_OVERWRITE -DEGOL_HMI=1 -DHAVE_W32API_H -DNDEBUG -DNOPCH -DWINVER=0x0500 -D__WXMSW__ -I/C/wxWidgets/include/ -I/C/wxWidgets/lib/gcc_lib/msw -I/C/wxWidgets/additions/include -Ivfs/src -Ivfs/src/elm_fat -Ivfs/src/elm_fat/option -Inewlib -Idesigner -Iinclude/common -Iinclude/egol/controls -Iinclude/egol/drawer -Iinclude/egol/gl -Iinclude/egol/project -Iinclude/egol/system -Iinclude/egol/hmi -Iinclude/platform -Iegol/expat-2.0.1/lib -Iegol/project -Iegol/drawer/basic -Iplatform/generic -Iplatform/win32 -Idesigner/ctb/include -Iinclude/lua -O0 -g2 -Wall -Wshadow -Winit-self -Wredundant-decls -Wunreachable-code -Wno-ctor-dtor-privacy -gstabs -Winline -MMD -MP -MF build/Dbg_Designer/MinGW-Windows/designer/callbacks.o.d -o build/Dbg_Designer/MinGW-Windows/designer/callbacks.o designer/callbacks.cpp BUILD SUCCESSFUL (total time: 11s) I see some differences between these two versions (some arguments are repeated in 7.3)
Created attachment 127398 [details] project config
(In reply to comment #16) > Created attachment 127398 [details] > project config I do not understand what is a file. Please attach nbproject/configurations.xml
(In reply to comment #17) > (In reply to comment #16) > > Created attachment 127398 [details] > > project config > I do not understand what is a file. > Please attach nbproject/configurations.xml It is configurations.xml! Click on [details] and you will see xml data.
In 7.3b the problem still exists. After delete unused #include, parser was started and many of local variables has been marked as unresolved
Moreover, now the breakpoints are not working. My executable was 48MB, now it's 28MB (linker commandline differs from previous (comment15) - some debugger data is missing?)
Created attachment 127619 [details] Dump of CodeAssistant c++ code model diagnostics
The first dump was created when parser error occurred, the second is after command "reparse project" You can compare these files, maybe you find something useful. BTW the dumps are from NB7.2
(In reply to comment #22) > The first dump was created when parser error occurred, the second is after > command "reparse project" > You can compare these files, maybe you find something useful. > BTW the dumps are from NB7.2 Thanks for dump. To understand what is happened we need "Cache of xRef for file" (last check box of C/C++ diagnostics)
Created attachment 127654 [details] enum attribute error Meanwhile, I'v found something interesting. The attributes for struct and union are recognized correct (may be specified before '{' or just after '}', but for enum only one position is accepted (after closing bracket) The macro is defined as follows: #ifdef __GNUC__ #define ATTR_PACKED __attribute__ ((packed)) #else ... #endif I will prepare new, extended dump as soon as possible.
Created attachment 127681 [details] Dump of CodeAssistant c++ code model diagnostics + xRef
Integrated into 'main-golden', will be available in build *201211140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/1a9468fa0627 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing Bug #221537 Parser: "cannot open include file" or "type not recognized" in bigger projects - make references cache keys a token based
Integrated into 'main-golden', will be available in build *201211150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/f224d6467a38 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing Bug #221537 Parser: "cannot open include file" or "type not recognized" in bigger projects - fix concurrent modification exception
Created attachment 127913 [details] Parser is not recognizing structure initializator with unions NB7.3beta2 The initialization of structure containing other structures and unions is incorrect. Snapshot, source file and code model diagnostic dump attached.
Integrated into 'main-golden', will be available in build *201211200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2a68a9e9dc75 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixing Bug #221537 Parser: "cannot open include file" or "type not recognized" in bigger projects - do not put references of document base file
Latest nightly build: - main issue - fixed - comment #24 - not fixed - comment #28 - not fixed
(In reply to comment #30) > Latest nightly build: > - main issue - fixed > - comment #24 - not fixed see separate bug #222800 > - comment #28 - not fixed Please provide compilable example and file a separate bug.
*** Bug 223603 has been marked as a duplicate of this bug. ***