Code completion in PHP causes IDE to lock up
Apache NetBeans version
Apache NetBeans 14
What happened
Launch a PHP project and make IDE crash
How to reproduce
In PHP code start typing an in-built, e.g. isset(). After a couple of characters the code completion box appears. Press return to attempt code completion. What has just been typed disappears Start typing the in-built again. After a couple of characters the code completion box appears. Press return to attempt code completion. This time the IDE locks solid.
Did this work correctly in an earlier version?
Apache NetBeans 13
Operating System
Ubuntu 22.04 for 64bit Intel
JDK
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.22.04.1)
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Occurs every time
Are you willing to submit a pull request?
Yes
Code of Conduct
Yes
Also happens when netbeans_jdkhome is set to use Oracle's Java 12
Code completion is working fine in NetBeans-dev-dev-e79c82fa249f13621ca080812f4f5be5509ce60e-release.zip
The two versions are unpacked to the same directory, however, they must be picking up different configs as they launch with subtly different options and a different set of projects. The issue may lie in the different config options.
Is there a way of getting the dev version to launch using the v14 config and project data?
@mbien if this is fixed with dev, is this also fixed by #4165 ?
Is there a way of getting the dev version to launch using the v14 config and project data?
Use Tools / Options / Import. If you're picking up some options / projects already, it suggests you've used a dev build before? In which case, I would consider deleting the dev userdir and cachedir, doing a clean start, then importing.
@mbien if this is fixed with dev, is this also fixed by #4165 ?
@neilcsmith-net probably not. #4165 won't make completion windows appear even if there are more items available (after a successful completion) unless it is specifically requested in the completion template token. Thats all. It changes nothing regarding threading. Completion is invoked the same way via SwingUtilites.invokeLater().
So the bug might be still there (assuming there is a bug) just hidden. E.g if you press ctrl+space fast enough you could replicate the old behavior and potentially trigger the same issue.
Is there a way of getting the dev version to launch using the v14 config and project data?
You can use --userdir /home/os4/.netbeans/14 or take a look at ~/.netbeans and copy the files to the dev directory.
@mko-callpage using the 14 userdir is probably a bad idea if you want to keep the 14 install working correctly. Just use the import options mentioned above.
If only the import would include things like the toolbars, panel placement and probably a bunch of other things I don't remember right now. Generally speaking I prefer just re-using the old config. Surprisingly never had an issue so far.
@OS4 Can we also close this?
Closing. Please feel free to reopen it.