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: | [67cat] Code-Completion/Hint processing erases editor text | ||
---|---|---|---|
Product: | editor | Reporter: | esmithbss <esmithbss> |
Component: | Completion & Templates | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | dstrupl, emononen, mmirilovic, mslama, pjiricka |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Screen Shot of dialog window after 20 second wait for the dialog to refresh
Screenshot showing GUI just prior to text replacement |
Description
esmithbss
2009-03-23 19:22:37 UTC
This appears to be similar to my earlier bug that was closed as worksforme: http://www.netbeans.org/issues/show_bug.cgi?id=151784 The difference is that in the earlier bug, the text was replaced with the wrong information. In this bug, the text is completely erased. Reassigning to Ruby. I've looked at the difference between how the pop-up behaves in Ruby projects and Java Projects. Apparently, the dialog in Java either works faster and vanishes once the method is "recognized". The Ruby side doesn't parse/populate as fast or vanish when you have typed beyond what the system recognizes. I'm probably not able to type fast enough to reproduce this:) I'll keep trying still. There seems to be a speed issue with the code-completion dialog under ruby. See my additional report http://www.netbeans.org/issues/show_bug.cgi?id=160975 for another issue with speed and synchronization using this component. Created attachment 79495 [details]
Screen Shot of dialog window after 20 second wait for the dialog to refresh
To reproduce the state from associated screen capture: 1) Start from a clean file. 2) Begin Typing the line "ActionC" 3) Bring up the completion dialog 4) Type "::Base" 5) Type ".reset" *** At this point, the dialog on my machine is out of sync with my typing and no longer refreshes. 6) Continue typing "_session" 7) Hit the Enter key. I'm sorry but I still can't reproduce this (not even with your steps). Can you reproduce this completely from scratch (with a new project)? It seems to be that the bug must be in GsfCompletionProvider as it takes care of filtering the results; please evaluate the issue. I wasn't able to reproduce (hence the incomplete keyword), but the reporter confirmed via email that this happens to him all the time on different hardware configurations. I'm removing the incomplete keyword to get the bug evaluated by the editor team. For me this wasn't reproducible. If this is a speed issue, could you please use Profile Me! and attach here the profiler snapshot? Also please generate several threaddumps in fast succession and attach them here. There is a wiki page describing how to do both threaddumps and Profile Me! http://wiki.netbeans.org/GenerateThreadDump Thanks Marek, these are yours now ... Are you able to reproduce with latest trunk dev build? With Java project (java source)? Or only with Ruby? Can you attach project where it is reproducible? I tried to create sample Ruby project and tried to simulate your use case (in Depot Application I opened Models cart.rb, started to edit in def add_product(product) ActionController::Base.reset but when I type re code completion disappears.) There is also big difference in behavior when code completion dialog is invoked in auto mode or explicitly. From your steps it looks like it is invoked explicitly. Is it right? Someone commented that the code-completion box is tied to the typing events. In essence, when the code completion dialogs are displayed, they are key aware. Something I noticed in a test just now, is that the Ruby code completion dialogs (and possibly others) are not tied to all of the relevant events. Most specifically, all mouse clicks. To reproduce what I just experienced: In a Ruby On Rails application, do some typing and allow the system to bring up the code-completion dialogs. Now move the mouse cursor to the tab of the file you are currently editing and click the left mouse button. The dialogs should close, but they don't. Click on the pull down list of currently open files. The dialogs don't close. This may signify a missing lose_focus handler somewhere which is exactly the missing behavior that (afaik) causes the dialogs to process keystrokes when they are no longer relevant. Created attachment 83549 [details]
Screenshot showing GUI just prior to text replacement
I just added another screenshot showing the behavior just prior to encountering this error. What is happening is the system is taking an excessive (10 to 30+ seconds) time to load the code-completion dialogs. While it is populating the dialog I am able to continue typing (whether it shows on the screen or not) and as I type, I go beyond what is valid for the code-completion dialog box to process (as can be seen by the garbage displayed here. If, after I type all of the text and the code-completion dialog box appears, I hit the Enter key, everything I have typed since the code-completion dialog started populating is replaced by the highlighted entry in the code-completion dialog. Any other key after the code-completion dialog appears results in only the dialogs being closed. Typically, the long delays are caused when I manually invoke the code-completion dialog; however, the screenshot from Jun 14th was generated by hitting the period ('.') key following the Event identifier. (In this case, Event is a model in my project). *** Issue 171563 has been marked as a duplicate of this issue. *** Dusan pls can you look at this? Infrastructure part fixed in jet-main. 'Please wait' should be displayed when code completion refresh is slow. http://hg.netbeans.org/jet-main/rev/53b2f7536657 However, the main problem here is the code completion refresh is slow in Ruby editor. It seems that (under some circumstances) the Ruby completion refuses to filter results (obtained on initial code completion invocation) when user starts typing again. Finally, I'm able to reproduce the issue now. Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/4cc85ed698a9 Integrated into 'main-golden', will be available in build *200909181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4cc85ed698a9 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #160940: Code-Completion/Hint processing erases editor text - fixed. |