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 153365 - Automatic brace and quote insertion stops working
Summary: Automatic brace and quote insertion stops working
Status: RESOLVED DUPLICATE of bug 155805
Alias: None
Product: editor
Classification: Unclassified
Component: Completion & Templates (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-18 09:38 UTC by oskarhagberg
Modified: 2009-08-18 17:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log after problem occurs (43.66 KB, text/plain)
2009-01-05 03:02 UTC, oskarhagberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description oskarhagberg 2008-11-18 09:38:04 UTC
1. Fresh install of Netbeans 6.5 RC1 or RC2
2. typing if( will auto complete to if(), typing " will auto complete to "", ' to '', { to { ... } etc..
3. Exit Netbeans and start several times ( >5 )
4. Auto insert of above patterns stops working.

Note:
Also noticed that after a while ctrl + '/' no longer comments selected rows.

Is the editor settings file being corrupt over time?
Comment 1 Jiri Prox 2008-11-18 12:29:57 UTC
Can you please check setting that they were not changed? 
The first feature is 'Insert closing bracket automatically' in the Options -> Editor -> General, 
the second is in the keymap , category Other, action Toggle comment.

Can you also try starting IDE with fresh userdir?
Thanks
Comment 2 Jiri Prox 2008-11-19 10:32:19 UTC
From reporter: 

Settings in Tools -> Options are always correct. E.g. toggle is set to trigger on ctrl + slash.

Switching to fresh user also did not help. At first start up everything worked fine, but already at second start up
(with a log of, log in in between) it started acting up. This time show code completion tip popup at ctrl + space also
stopped working.

I should say I have the same problems on a separate system running Vista. What the systems have in common is that they
at one stage has had another version of Netbeans installed. I have tried full uninstall + manual clean up of .netbeans
and similar folders in user directory, but with no help.
Comment 3 oskarhagberg 2008-11-21 02:34:17 UTC
Just made a fresh install of 6.5 final and problem persists.
Comment 4 chrishsu 2008-11-24 06:43:37 UTC
I also has some problem of this.
Comment 5 Miloslav Metelka 2008-11-25 14:58:21 UTC
This looks really strange to me. Do you see any syntax coloring e.g. keywords highlighted and e.g. parsing errors if you
type something wrong?
Comment 6 oskarhagberg 2008-11-25 15:58:19 UTC
So by default with a fresh install of Netbeans typing for example "if(" will generate "if()" and the caret placed
between '(' and ')'. With 6.5 this is also true until you have quit/started Netbeans X number of times.

There are no special syntax highlight or parsing errors, the feature simply stops working. 

Other features like ctrl + / for commenting a line might also stop working. 

This issue has now been confirmed on 3 separate systems. 2 XP and 1 Vista.
Comment 7 oskarhagberg 2008-11-25 16:00:23 UTC
Sorry, misunderstood your question.
Yes, keyword highlighting and syntax error highlight still works.
Comment 8 Max Sauer 2008-11-28 10:34:25 UTC
- Could you please attach your messages.log file, located in var/log folder in your userdir (after the IDE becomes corrupted)? 
- Also, could you please try starting IDE with '--userdir testUserdir' switch few times subsequently? 
- Is this issue triggered by the Windows login/logoff?

Thank you very much for the provided information, without it, it would be very difficult to track this one down.
Comment 9 oskarhagberg 2008-11-28 10:43:33 UTC
I will try to collect this information.
But it will have to wait a while until i have time to try and recreate the issue (have reverted back to 6.1 for now)

Interesting that this bug has not been found earlier, since it occurred on two of my desktops (one XP, one Vista) as
well as my coworkers (XP).

Is there a way to clean a system from all knowledge of Netbeans? Simple uninstall does not delete all items created by
netbeans and manually deleting all .netbeans .nb etc folders from user does not resolve this issue. 
Comment 10 oskarhagberg 2008-12-26 06:31:08 UTC
How to attach files to issue?

some of the messages.log after 6.5 got corrupted again:

WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.profiler uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.visualweb.palette uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.db uses org.openide.options which is deprecated: 
Use org.openide.util.NbPreferences instead.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.j2ee.persistence uses 
org.netbeans.modules.editor.deprecated.pre61completion which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.j2ee.common uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.mobility.snippets uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.visualweb.insync uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.visualweb.designer.jsf uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.web.core uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.visualweb.project.jsfloader uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.j2ee.ejbjarproject uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.j2ee.ejbcore uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.web.refactoring uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.web.struts uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.mobility.svgcore uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.mobility.editor uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.mobility.project.bridge.impl uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.core.modules]: the module org.netbeans.modules.j2ee.websphere6 uses 
org.netbeans.modules.editor.deprecated.pre61settings which is deprecated.
WARNING [org.netbeans.modules.mercurial]: Could not load the file C:\Documents and Settings\Oskar\Mercurial.ini. 
Falling back on hg defaults.
SEVERE [org.netbeans.modules.mercurial]: execEnv():  execEnv(): IOException java.io.IOException: Cannot run program 
"hg": CreateProcess error=2, The system cannot find the file specified

Comment 11 Max Sauer 2009-01-02 14:35:16 UTC
- Files can be attached via 'Create a new attachment link' in the 'Attachments' section above. 
- Please try the --userdir switch.
- Removing .netbeans and deleting the installation should clear your computer from netbeans. There may be an extra file used by installer on *unix 
systems AFAIK.

The warning in your last comment has probably nothing to do with this. One more question -- does it happen for all filetypes (*.java, *.jsp..) and project 
types (ie. j2se project, WebApp project)? 
 Thanks.

Comment 12 oskarhagberg 2009-01-05 03:02:51 UTC
Created attachment 75440 [details]
messages.log after problem occurs
Comment 13 Vitezslav Stejskal 2009-01-05 12:48:59 UTC
Umm, the log file shows nothing. Is the IDE still broken? Perhaps the interesting things were in the log created at the
time when the IDE got broken, but there is nothing apparent in the log file from recent sessions. Anyway, it could help
if you zipped-up your userdir (or at least config/Editors subfolder) and attached it here (or if it's too big send it to
vstejskal@netbeans.org). We'll have a look if the settings are corrupt. Thanks
Comment 14 oskarhagberg 2009-01-06 02:25:59 UTC
The attached log is directly after the IDE gets broken.
Deleting the user dir solves the problem, but it is a bit inconvenient to keep doing that :)

The testUserdir switch only generates empty log files.

I only use Netbeans for java, mostly J2ME, but it happens in J2ME, J2SE, and WebApp projects. 

This morning it happened again, but messages.log looks like before.

Compressed userdir is ~8 MB so I will email it.
Comment 15 oskarhagberg 2009-02-04 04:08:13 UTC
Any progress?

Today, fresh install of Windows 7, latest netbeans 6.5 from download page, install, restart NB a couple of times. Auto 
complete stops working, ctrl+/ stops working, etc.

BR
/Oskar
Comment 16 pribyl 2009-04-16 14:25:26 UTC
oskarhagberg, is this reproducible for you in some later NB version? (6.5.1, 6.7M3 or some dev builds )

I just tried this with latest dev build and it worked even after 10th IDE restart. So I installed 6.5 and still no
'success'.

What I did:
1, Opened IDE (with clean userdir) and created new sample Java project
2, Typed "if(" into the main method -> the closing bracket was added automatically
3, Commented the line with "if(()" using Ctrl+/
4, Restarted the IDE
5, Repeated steps 2-4 approx. ten times

Should I try different approach? This does not seem to do the trick.
 
Comment 17 Jiri Prox 2009-08-18 16:56:07 UTC
Finally I was able to reproduce it in 6.5, the key is that the file from mobility must be opened when starting IDE.
AFAIK this was already fixed as another issue, I'll look for the issue number
Comment 18 Jiri Prox 2009-08-18 17:30:26 UTC

*** This issue has been marked as a duplicate of 155805 ***