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.
Product Version: NetBeans IDE Dev (Build 201510030002) Java: 1.8.0_51; Java HotSpot(TM) 64-Bit Server VM 25.51-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16 --------- This bug is related to the C++ project. I am using the remote server to compile the source, hosted on the FreeBSD. I've downloaded latest dev version as the 8.1 Beta code-completion is broken. It seems like the dev version code assistance for C(++) projects is broken. Everything was working fine until I made some changes to the project files in my C++ project and re-opened the IDE. Now I can't really reproduce those steps as the basic functions are not working. Code Assistance -> Reparse Project is executing without the problem but nothing happends then all of the symptoms below still exist. --------- Symptoms: * All identifiers (methods/variables) are marked as error, * Navigation through the source isn't working, * No exceptions are being thrown, * Code-completion is working, but it seem to show only the global variables, --------- What have I tried (nothing helped): * Removing the cache from the: C:\Users\<username>\AppData\Local\NetBeans\Cache\dev, * Changing the netbeans_jdkhome in netbeans.conf to the other version
do you have anything interesting in your message.log? http://wiki.netbeans.org/FaqLogMessagesFile
Created attachment 156504 [details] Messages logs
There are few exceptions logged, this may be interesting: --------- Tons of exceptions: Caused by: java.lang.AssertionError: filename from getStatValue() refers to wrong file --------- I have attached a messages.log file as it seems like there are more bad things going on.
Looks serious enough. Needs investigation
Pompex, could you, please, try to reproduce the issue with smaller test case and provide steps/project for me to analyse? Also I've committed more debug info. It would be very helpful if you can download dev bits with my changes from http://deadlock.netbeans.org/job/cnd-main/2928/ It would be in BuildArtifacts as NetBeans-dev-cnd-main-292****.zip Thanks for your help! Vladimir.
I have spent like 2 hours on testing cases and such as I am still coding with this Netbeans version. I have collected few more observations which can help here: * I have been coding among 4 project files for a while now (my project has more than 260 files [cpp/headers]) while reporting this so I was basing on my observations from these 4. However, I found out that everything is working just fine for almost all of the project files (sometimes the Navigator simply hangs at "Please wait..." for all files), * It's not random (fortunately!). I mean that described symptoms doesn't occur for random project files. It's rather static and the problem symtomps are related to the same single files. * I am able to make it work (though it doesn't work everytime). Looks like it's strongly related to the remote server connection; The following steps can bring it back to life: 1) Remove Netbeans cache folder (important), 2) When IDE boot up, it's very important to immadiately reconnect to the remote server (I have observed it must be done just before the C++ project parsing starts), 3) Sometimes closing & re-opening the file tab helps, [..] * ^ when it's finally working, adding a new function to the file header/cpp file results in the same symtomps I described in the bug description, but this time just for this certain function (reparsing doesn't help so far). Also, the function is not being shown in the code auto-completion window, --------- Hope that can help a bit. I will post more informations from the hudson build soon.
Created attachment 156505 [details] Hudson build messages.log
Added messages.log from the hudson build.
After a slight rewiew of the messages.log file, it looks like there are some path issues. --------- The exception: Caused by: java.lang.AssertionError: filename [string size=75+'0'] E:\dev\Projects\svn\CFPOML_DB\source/../../libsql/../libcore/stdafx.h from getStatValue() refers to wrong file: and the file it points to definately doesn't exists and the path is wrong. E:\dev\Projects\svn\CFPOML_DB\source/../../libsql/../libcore/stdafx.h libthecore is at the: E:\dev\Projects\svn\libthecore\stdafx.h same to the other static project libraries. (libcore/libsql and those beggining with "lib" are the static project libraries in Netbeans).
Thanks for the helpful information and log file. Looks like show-stopper for 8.1. Some comments. E:\dev\Projects\svn\CFPOML_DB\source/../../libsql/../libcore/stdafx.h (when collapse ..) becomes E:\dev\Projects\svn\libcore/stdafx.h which is OK as path and similar to E:\dev\Projects\svn\libcore\stdafx.h We have to resolve UniqueID consistency on Windows. Vladimir, please, have a look
According to my #6 comment: --------- Quote --------- * ^ when it's finally working, adding a new function to the file header/cpp file results in the same symtomps I described in the bug description, but this time just for this certain function (reparsing doesn't help so far). Also, the function is not being shown in the code auto-completion window," --------- /Quote --------- This is what it looks like when I'm adding a new function in the header file (`void SetOfflineShop[..]` is the new function): http://i.imgur.com/Y6nDNi5.png Reparsing can fix the colors only, otherwise everything is still messed up as I said in my comment. Let me know if you need more informations regarding this.
Integrated into 'main-silver', will be available in build *201510060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/370f3478d1fb User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixing #255678 - Code assistance is broken (binaries) - more info in assert
Unfortunately, it doesn't work in the 201510060002 build either with the same symptoms as before. Let me know if I can help you more somehow.
The below change set should fix AssertionError: filename ... from getStatValue() refers to wrong file http://hg.netbeans.org/cnd-main/rev/12a1d27974ff
Integrated into 'main-silver', will be available in build *201510070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/12a1d27974ff User: Vladimir Kvashin <vkvashin@netbeans.org> Log: corrected getStat() on Windows (fixing #255678 - Code assistance is broken on Windows)
It's a lot better now, navigator is now working correctly. Unfortunately there are some new issues: * All of my C++ project are having include directives issues (wasn't happening before) - reparsing can't fix this issue - it's hapenning for the external includes like the stl libraries, * There are several unresolved identifiers left (might be an issue related to the above - includes) for functions/methods/typedefs, I have wrote a test function: ---------- void TestFunction() { const int16_t testInteger = 1234; std::vector<int32_t> testVec; testVec.push_back(1); testVec.push_back(3); testVec.push_back(3); testVec.push_back(3); testVec.push_back(7); // Look for 3 for (auto it = testVec.begin(); it != testVec.end(); it++) { if (*it == 3) { std::cout << "Yay I am 3...\n"; } } // C++11 functions const char* convertMe = "1337"; printf("Integer: %d\n", std::stoi(convertMe)); printf("Long: %d\n", std::stoll(convertMe)); printf("long long: %d\n", std::stoll(convertMe)); } ---------- This is the result: http://i.imgur.com/2Xz8RJV.png
fix double project dispose: http://hg.netbeans.org/cnd-main/rev/219c0f39236e
Integrated into 'main-silver', will be available in build *201510090002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6a353a951d9f User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixing #255678 - Code assistance is broken on Windows - we cleared snapshot after reparse phase, so while file is being parsed user can see only partial model of file
Any progress on fixing the unresolved identifiers? (comment #16)
(In reply to pompex from comment #19) > Any progress on fixing the unresolved identifiers? (comment #16) This should be fixed be recent commits. You can get this fixes in 8.1 RC2 that is to be out shortly (tomorrow, I guess). So I'm closing the bug. If new issues appear, could you please file a separate bug with the specific description.
Transplanted to release81: http://hg.netbeans.org/releases/rev/e959f34522f1 [fixing fixing #255678 - Code assistance is broken on Windows] http://hg.netbeans.org/releases/rev/be4eb235e55a [fixing #255678 - Code assistance is broken on Windows] http://hg.netbeans.org/releases/rev/516218ee9fac [fixing #255678 - Code assistance is broken on Windows] http://hg.netbeans.org/releases/rev/6a755d59df93 [corrected getStat() on Windows (fixing #255678 - Code assistance is broken on Windows)] http://hg.netbeans.org/releases/rev/93ec79d4ba94 [fixing #255678 - Code assistance is broken on Windows]
Verified in NetBeans IDE 8.1 (Build 201510222201) If someone see problems with code assistance on Windows, new separate bug should be filed.