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.
Summary: | after updating to 8.0.1 nb, there is no auto-complete class of my project and ctrl + left click does not work. (w8 and ubuntu) | ||
---|---|---|---|
Product: | php | Reporter: | xlk |
Component: | Code | Assignee: | Tomas Mysik <tmysik> |
Status: | VERIFIED INCOMPLETE | ||
Severity: | normal | CC: | alejandromoralesmeza, anebuzelsky, bleck83, darkcida, darwin_te, dirko, giuseppemazzapica, mhh1422, mmirilovic, niteblade, sfritts, shadyyx, tschrock123, tzezula, vriha, vukanac |
Priority: | P1 | ||
Version: | 8.0.2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
all logs from userdir
Patch file |
Description
xlk
2014-09-11 12:04:49 UTC
I reproduced it with following steps: - install NetBeans 8.0 _without_ updates (I customized installation by not installing JavaME, JavaEE, C++ during installation) - open some project in IDE, wait for scanning to finish - update to 8.0.1 - after IDE restart, code completion and go to declaration does not work in the project - if I open another project or create a new one, these projects "new" in NetBeans work well I'm attaching all logs and cache dir Java: 1.7.0_67; Java HotSpot(TM) Client VM 24.65-b04 Runtime: Java(TM) SE Runtime Environment 1.7.0_67-b01 System: Linux version 3.13.0-32-generic running on i386; UTF-8; en_US (nb) User directory: /home/vriha/.netbeans/8.0 Cache directory: /home/vriha/.cache/netbeans/8.0 Created attachment 149147 [details]
all logs from userdir
It could be some issue with index. Originally even code completion for $this did not work. After I modify and save the file, $this started to work. Similarly go to declaration started to work if the target file has been modified and saved.
Cache dir is available at https://drive.google.com/file/d/0B6Sd5ov8j7IUaGtHYkpqeUdFazA/edit?usp=sharing (too big to upload it here) "Workaround" without reinstalling NetBeans is to delete cache dir, its location can be found in NetBeans' About dialog. possible patch candidate One thing which came to my mind... We made some changes in data which are stored to index for 8.0.1 (due to new PHP 5.6 support), so structure of the index is different. Well so we did it and then we changed the index version to version 24 (as its written in JavaDoc...if one makes some incompatible change, index version must be changed so the infrastructure knows that sources indexed with an older version must be reindexed). So far so good. But...what if infrastructure doesn't respect this and doesn't reindex that sources? Then imho features can't work...because index returns different results than PHP editor code expects. I think that someone faced that also in the dev versions (and not just this summer, but with every index structure change)...commits with new index structure (and also with new index version number) were in trunk and if one pulled it then features didn't work. One must delete cachedir. Is it possible? I'm not able to answer that (maybe tzezula?), but afaik everything was done properly on PHP editor side :/ Javascript editor suffer with similar issue almost every update. We have to update the core signatures files to get it work correctly. It can be something different, but it looks suspicious. In javascript case there is problem in lazy boot classpath registration. I think it's the same problem as in JS Editor. The stubs are registered too late. The registration was deferred in NB 7.2 due to performance reasons. I am now trying to reproduce it. I've forgot. If it's the same problem is in JS it's enough to touch the PHP stub files. Tomas is right. For fixing this you have to touch every signature file, not only the zip files, changing time of the zip files it's not enough. I'm not sure if it is the same case. When this happened, I had items from "PHP Platform" in code completion (that's coming from the stubs I assume). Code completion is missing items from my own source files in the project Vlado, good point. It really looks like different issue. (In reply to Vladimir Riha from comment #10) > I'm not sure if it is the same case. When this happened, I had items from > "PHP Platform" in code completion (that's coming from the stubs I assume). > Code completion is missing items from my own source files in the project Good point - PHP signature files are new (in comparison with NB 8.0) since PHP 5.6 support has been added and therefore we needed to regenerate all the signature files. Thanks. BTW just to be clear - this issue is assigned to me but I have no idea what I could do with it so I am just waiting :) Feel free to reassign this issue to you/anyone who could help with it. Thanks. (In reply to Tomas Mysik from comment #12) > Good point - PHP signature files are new (in comparison with NB 8.0) since > PHP 5.6 support has been added and therefore we needed to regenerate all the > signature files. To be precise - some sigfiles can be the _same_ but most of them are new (newly generated for PHP 5.6). *** Bug 247044 has been marked as a duplicate of this bug. *** Finally I am able to reproduce it. The problem is caused by JavaScript lazy registration of stubs. The parsing.api detects that PHP index version is increased, so it sets *allFiles* causing all files needs to be reindexed. It starts with phpruntime and during the scan it *wakes up* JavaScript module which registers javascript stubs and cancels the running scan. Unfortunately the php indexer is already updated. Created attachment 149225 [details]
Patch file
The patch workaround the spurious JS Stub cancel.
Vlado, the patch is for NB801. The trunk is quite different so the patch differs. Also there is no way how to verify it in trunk as the PHP index has already version 24. The verification process is a bit complicated. 1st) Apply the patch to release801 2nd) Build the parsing.api. 3rd) Install NB 8.0 4th) Create some test project 5th) Let me know I will help you with the rest :-) Fixed jet-main 4607971b91bb. Fixed in dev. The patch for dev differs from patch for 801 as the code in trunk was changed due to incomplete root handling. Vlada will verify the attached patch for 801. Thank you, I'll do it first thing tomorrow morning. I'll create a custom catalog from release801 with the applied patch and use it for update. *** Bug 247150 has been marked as a duplicate of this bug. *** Verified, thank you Tomas for help. Please transplant to release801. Fixed in release801 e565c04ebfba. Thanks Vlado for testing! *** Bug 247184 has been marked as a duplicate of this bug. *** *** Bug 247119 has been marked as a duplicate of this bug. *** Integrated into 'releases/release801', will be available in build *201409171118* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/e565c04ebfba User: Tomas Zezula <tzezula@netbeans.org> Log: #247026:after updating to 8.0.1 nb, there is no auto-complete class of my project and ctrl + left click does not work. (w8 and ubuntu) *** Bug 247244 has been marked as a duplicate of this bug. *** I've tried upgrade 8.0 (without patch) to 8.0.1patch1 and it works fine. Verified in patch Product Version: NetBeans IDE 8.0.1 (Build 201409180010) Java: 1.8.0_20; Java HotSpot(TM) Client VM 25.20-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_20-b26 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb) *** Bug 247272 has been marked as a duplicate of this bug. *** Integrated into 'main-silver', will be available in build *201409191429* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/4607971b91bb User: Tomas Zezula <tzezula@netbeans.org> Log: #247026:after updating to 8.0.1 nb, there is no auto-complete class of my project and ctrl + left click does not work. (w8 and ubuntu) (In reply to Vladimir Riha from comment #3) > Cache dir is available at > > https://drive.google.com/file/d/0B6Sd5ov8j7IUaGtHYkpqeUdFazA/edit?usp=sharing > > (too big to upload it here) > > "Workaround" without reinstalling NetBeans is to delete cache dir, its > location can be found in NetBeans' About dialog. It worked partially. Some "go to" (ctrl + click) now work, some not, and i don't see a pattern. I probably shouldn't ask this here, but how do we get the build with the correction to this problem? We have to wait until NB upgrades again? There should be another patch coming, not sure when exactly. You'll install it via Help->Check for updates. Or you can try dev daily build from bits.netbeans.org/download/trunk/nightly/latest/ . If you have some issues with Go To declaration, please file a new report and if possible add some steps to reproduce (sample project, step by step instruction...). Thanks Hi guys, I've been having the stated issues with php after 8.0.1 update. Tried the workaround but it didn't work for me so here's another workaround for those still experiencing php based issues. Workaround 2 Uninstall php (guessing it'll work for deactivate as well), restart NB, activate php and everything worked like normal. Note: If you have any php projects open they will be closed during the uninstallation process. (In reply to Vladimir Riha from comment #33) > There should be another patch coming, not sure when exactly. You'll install > it via Help->Check for updates. Or you can try dev daily build from > bits.netbeans.org/download/trunk/nightly/latest/ . > > If you have some issues with Go To declaration, please file a new report and > if possible add some steps to reproduce (sample project, step by step > instruction...). Thanks I've tried every workaround suggested here and still cannot get the go-to feature working after upgrading to 8.0.1. Other members of my team are experiencing the same issue and it has really hindered productivity. I guess you don't realize how convenient a feature this is until you loose it. When can we expect an official patch update? Thanks The patch release depends on other issue which is not resolved yet. But it should be as soon as possible. If deleting cache dir does not work for you, you can try to uninstall NetBeans and install NetBeans 8.0.1 directly from https://netbeans.org/downloads/. Removing the cache, i.e. rm -rf .../.../Caches/NetBeans/8.0 worked for me on Mac. After reboot I waited about 15min for NetBeans to run its background services and voila ... I'm back to using my much loved go-to feature ... thanks for the tip! *** Bug 247807 has been marked as a duplicate of this bug. *** *** Bug 247807 has been marked as a duplicate of this bug. *** I can confirm this is still an issue, even after wiping out the cache and uninstalling/reinstalling.. 7.4 is the last version that doesn't exhibit this issue for me. (In reply to ryanr69 from comment #40) > I can confirm this is still an issue, even after wiping out the cache and > uninstalling/reinstalling.. > > 7.4 is the last version that doesn't exhibit this issue for me. I can confirm this too! This is very annoying. A major feature of netbeans is not working :-( Product Version: NetBeans IDE 8.0.1 (Build 201409082112) Updates: NetBeans IDE wurde auf Version NetBeans 8.0.1 Patch 1.1 aktualisiert Java: 1.8.0_25; Java HotSpot(TM) 64-Bit Server VM 25.25-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_25-b18 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb) The same issue happened with me, but in a different way. Everything was working well two days ago. Today, $this-> shows the correct autocomplete menu, but the 2nd level autocomplete stopped working even the tooltip shows the correct class hint! For example: $this->session still shows the correct class hint (\app\core\Session), but $this->session-> shows nothing except the general autocomplete menu. Tried to write: $x = $this->session; /* @var $x \app\core\Session */ and then $x-> the autocomplete now shows \app\core\Session methods and properties as expected. I am not sure if there was an update in the IDE, the extensions and plugins, or the JVM in the last day. I have tried to remove the cache folder and rebuild it but without avail. Not working in C/C++ module. Product Version: NetBeans IDE 8.0.2 (Build 201411181905) Java: 1.7.0_65; OpenJDK 64-Bit Server VM 24.65-b04 Runtime: OpenJDK Runtime Environment 1.7.0_65-b32 System: Linux version 3.13.0-40-generic running on amd64; UTF-8; en_CA (nb) User directory: /home/darwin/.netbeans/8.0.2 Cache directory: /home/darwin/.cache/netbeans/8.0.2 The C/C++ issue is not related to PHP, please file a new one to CND [1]. Thank you [1] https://netbeans.org/bugzilla/enter_bug.cgi?product=cnd So may I ask... There are a lot of duplicate bugs on this, and this seems to be a consolidated thread. What is the real issue, or is it not identified? Is there someone working on this? When is the slated fix (and is there a beta we can try)? This is a hugely important feature to me and I am pondering switching to eclipse or something else, which I really don't want to do.. My source tree is massive and I am still using 7.4 until this is fixed. This issue (PHP) happened only when updating from 8.0 to 8.0.1 and it was already fixed in 8.0.1 patch1. All the duplicated issues are related to this particular problem. You can install 8.0.2 (currently latest) and it won't affect you. If something is not working then please file a new bug, provide as detailed steps to reproduce as possible, attach IDE log (http://wiki.netbeans.org/FaqLogMessagesFile) and if possible attach sample project to reproduce the problem. I have got it running - finally. But... I found solution in: Options / PHP / General. 1.) Under "Command Line" I added the path to my local PHP5-Interpreter: C:\wamp\php5\php.exe 2.) Then I added the complete project folder to the Global Include Path After doing that the functions "auto-complete", "go to declaration" and "Ctrl + MouseHover over function-names showing PHP-Doc-Data" were restored. BUT: The global Include-Path (Setting 2.) above) was in prior Versions of Netbeans located per project and not in global options. This causes inconveniences now: I have two projects witch are almost equal (a Life-Version and its delelopment-branch). To operate with these two projects, I had to set 2.) for each project folder. This causes "go to declaration" (CTRL + Click) showing the same function with differert paths to each project folder. It would be wonderful, if this setting will be moved back into the Project-properties in next version of Netbeans. DirkO |