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.

Bug 223526 - Code completion stops working for unsaved edits - perhaps related to "Missing READ-LOCK when accessing TokenHierarchy" log entry
Summary: Code completion stops working for unsaved edits - perhaps related to "Missing...
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-08 15:56 UTC by Ujigami_Guy
Modified: 2012-12-10 13:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (622.68 KB, text/plain)
2012-12-08 15:56 UTC, Ujigami_Guy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ujigami_Guy 2012-12-08 15:56:10 UTC
After making changes to a couple of php files, code completion stops working for unsaved edits. Saving the files and using "Scan for External Changes" allows code completion to "see" the edits and work correctly. Subsequent unsaved edits have the same problem.

Netbeans setting "Enable auto-scanning of sources" *is* checked.

This may be related to other bugs marked with "Missing READ-LOCK when accessing TokenHierarchy". Hopefully the attached log file will help.

Product Version = NetBeans IDE 7.3 Beta 2 (Build 201211062253)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_09
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.5-b02

Last entry in log file (attached) shows:
INFO [org.netbeans.spi.lexer.MutableTextInput]: !!WARNING!! Missing READ-LOCK when accessing TokenHierarchy: input-source:org.netbeans.modules.csl.core.GsfDocument@3b5e6a8b, mimeType='text/x-php5',


** Suggestion to improve Netbeans: add a timestamp to the entries in the log file so I can help determine which entries may be pertinent (i.e. just happened)


Hope this helps.
Comment 1 Ujigami_Guy 2012-12-08 15:56:15 UTC
Created attachment 129082 [details]
IDE log
Comment 2 Ujigami_Guy 2012-12-08 16:54:40 UTC
It appears code completion works for unsaved edits pertaining to local function variables, but class properties and methods do not appear.

e.g. 
class Test {
   public $savedProperty = '';  // property saved to disk
   public $unsavedProperty = ''; // new edit that has not been saved to disk

   function test()
   {
       $unsavedLocalVar = '';
       [edit insertion point]
   }
}

Typing "$un" shows "$unsavedLocalVar" in the code completion popup list.

Typing "$this->" shows $savedProperty but does *not* show $unsavedProperty in the code completion popup list.
Comment 3 Ujigami_Guy 2012-12-10 04:55:56 UTC
I just went back to NetBeans IDE 7.1.1 (Build 201203012225) ... it works properly. Too bad since 7.2 added many nice features and 7.3 looks promising.

Please let me know if I can check anything to help track down this problem.
Comment 4 Ondrej Brejla 2012-12-10 08:45:44 UTC
Sorry, I tried it in todays 7.3 dev and it works properly for me. If I add a field, don't save the file and invoke CC after $this-> the field is suggested. Sorry.

You can try fresh instal of the latest dev build (fresh I mean without any import of old settings...clean userdir).

Product Version: NetBeans IDE Dev (Build 20121210-bdb4c521e003)
Java: 1.6.0_26; Java HotSpot(TM) Client VM 20.1-b02
Runtime: Java(TM) SE Runtime Environment 1.6.0_26-b03
System: Linux version 3.5.0-19-generic running on i386; UTF-8; cs_CZ (nb)
Comment 5 Ujigami_Guy 2012-12-10 12:29:46 UTC
It works for me too ... for a while. And then it stops working unless I save the edits and force a "Scan". Marking this "Resolved - works for you" doesn't help improve Netbeans when the problem clearly exists *for me*. Please let me know what I can check to help fix the Netbeans bug.

Did you check your IDE Log to see if you have any "Missing READ-LOCK when accessing TokenHierarchy" entries? This may be an indicator of the underlying problem.

Before filing this bug, I deleted my userdir and cache to ensure it wasn't a problem. I have done this with each nightly since reporting this problem and I will report back if one of them fixes the issue.

BTW, how can I download Build 20121210? http://bits.netbeans.org/download/trunk/nightly/latest/ shows "NetBeans IDE Build 201212090001 Download" for me right now.
Comment 6 Ondrej Brejla 2012-12-10 13:04:49 UTC
Since I'm not able to reproduce that and there are no exact steps to reproduce that, then I'm not able to do anything with that. Then it's "works for me". When we discover steps how to reproduce, then we can try to fix it. It may be caused by wrong setup of your sestem or whatever. But now, I never got the same issue in my ide, even if I work with it for minutes. My mates work with dev build for a whole day, and noone faced that issue either. So try to describe exact steps, so we can fix it.

> Did you check your IDE Log to see...

There is no such exception in the dev build. It has been fixed in HTML.

> BTW, how can I download Build 20121210?

It will be there tomorrow. Today I builded my own IDE from sources.
Comment 7 Martin Kanak 2012-12-10 13:28:37 UTC
Code completion works for me too. I didn't find any problem with that after 30 minutes of testing code completion.

Product Version: NetBeans IDE Dev (Build 201212100001)
Java: 1.7.0_10-ea; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b17
System: Linux version 3.2.0-34-generic running on amd64; UTF-8; en_US (nb)
Comment 8 Ondrej Brejla 2012-12-10 13:32:58 UTC
Thanks for great evaluation Martine.
Comment 9 Ujigami_Guy 2012-12-10 13:42:05 UTC
Sorry. I didn't mean to upset anybody. I truly appreciate the great IDE and I only want to help. The Java skills of the Netbeans developers is truly amazing. Perhaps someday I'll feel a little more confident to download and compile Netbeans source code myself. Until then, I have to rely on others' expertise and the generousity of the community.
Comment 10 Ondrej Brejla 2012-12-10 13:45:13 UTC
(In reply to comment #9)
> Sorry. I didn't mean to upset anybody. I truly appreciate the great IDE and I

You didn't :) We would like to help everybody, but here we can't. But thanks for your work and interest!