netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Code completion in PHP causes IDE to lock up

Open OS4 opened this issue 3 years ago • 6 comments

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

OS4 avatar Jul 14 '22 09:07 OS4

Also happens when netbeans_jdkhome is set to use Oracle's Java 12

OS4 avatar Jul 14 '22 09:07 OS4

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?

OS4 avatar Jul 14 '22 09:07 OS4

@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.

neilcsmith-net avatar Jul 14 '22 10:07 neilcsmith-net

@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.

mbien avatar Jul 14 '22 10:07 mbien

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 avatar Jul 29 '22 10:07 mko-callpage

@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.

neilcsmith-net avatar Aug 10 '22 09:08 neilcsmith-net

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.

mko-callpage avatar Aug 16 '22 07:08 mko-callpage

@OS4 Can we also close this?

junichi11 avatar Jan 18 '24 14:01 junichi11

Closing. Please feel free to reopen it.

junichi11 avatar Feb 14 '24 05:02 junichi11