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 195425 - NbPreferences wrong synch causing FileAlreadyLockedException: Preferences/org/netbeans/modules/uihandler.properties
Summary: NbPreferences wrong synch causing FileAlreadyLockedException: Preferences/org...
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Options&Settings (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-13 17:42 UTC by Chiana
Modified: 2011-04-02 08:49 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 176659


Attachments
stacktrace (1.77 KB, text/plain)
2011-02-13 17:42 UTC, Chiana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2011-02-13 17:42:32 UTC
This bug was originally marked as duplicate of bug 157128, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.0 Beta 2 (Build 201102111519)
VM: Java HotSpot(TM) 64-Bit Server VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
OS: Windows 7

User Comments:
GUEST: Just opened Netbeans again after having shut it down.

denis.polkovnikov@gmail.com: I am edit code in code customizer and try to complite my expression by pressing Ctrl+Space and...
It was in variable declaration

GUEST: Opening NetBeans for first time today

fzamboj: run ide

GUEST: I just open the IDE and the exception occured

tmysik: IDE started

GUEST: Connected to my database. MySQL database...it was connecting...then error popped up.

Chiana: Got this when trying to open 4 (four) IDe sessions, possibly related to issue #195403

GUEST: - Opening the program, nothing fancy

ravindranathakila: While building project on maven. The build was working fine till now. Used IDE maven, not external.

GUEST: the error result at the openning of the ide.

ravindranathakila: While editing a document which I have dragged and dropped into the ide. Not a project file, just a txt. I was editing and saving this for some time now and this sudden behaviour is strange.

GUEST: I was trying to add a new action object in a netbeans platform module.

xantiva: Just open Netbeans

GUEST: Creating a new project

GUEST: I just tried to open a file on my ruby project.

GUEST: using FileZilla

powell.385: I simply started the program.  It was working fine for a while and I do not believe I made any changes.  I did "hide" some files in my windows system, but I believe the program worked fine for a while after making that change.

Thanks,

Doug

davidacampbell: Just started netbeans

mithun_gonsalvez: Just editing Code.

GUEST: Just started up the application

bartdeslagmulder: copy / pasting some code

GUEST: Tried to start memory profiling for a NetBeans suite project

GUEST: Opening a project file

GUEST: trying to upload two individual files selected with control key.  File Upload dialog shown, then the error happened immediately.

GUEST: netbeans starting

kaaloo: Appeared right after launching nb.

GUEST: opened ide

GUEST: Opening the IDE

GUEST: viewing a php5 file

eliangela: I tryied  to save my project

GUEST: I was viewing files list of other PC's in my LAN, with windows explorer

mithun_gonsalvez: Closed a running application.
Started typing some code.

GUEST: Start Profiler

GUEST: starting up netbeans

tnleeuw: Just opened the IDE first time after upgrading from previous nightly.

vlad_konov: try to call "ctrl+Z" action

rballen2: occured at launch




Stacktrace: 
org.openide.filesystems.FileAlreadyLockedException: Preferences/org/netbeans/modules/uihandler.properties
   at org.openide.filesystems.StreamPool$2.write(StreamPool.java:154)
   at java.io.FilterOutputStream.write(FilterOutputStream.java:60)
   at java.io.FilterOutputStream.write(FilterOutputStream.java:108)
   at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
   at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
   at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
Comment 1 Chiana 2011-02-13 17:42:36 UTC
Created attachment 105962 [details]
stacktrace
Comment 2 Exceptions Reporter 2011-03-16 00:22:07 UTC
This bug already has 200 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=176659
Comment 3 Yulia Novozhilova 2011-03-16 11:39:20 UTC
Looks like the problem is in core.startup module. Redirecting to Platform/other.
Comment 4 Antonin Nebuzelsky 2011-03-16 12:09:56 UTC
> Looks like the problem is in core.startup module.
> Redirecting to Platform/other.

org.netbeans.core.startup.preferences.NbPreferences
-> options&settings is the right BZ component

See related issue 178439 and issue 157128 considered fixed a year ago. Obviously the synchronization is not resolved completely.

Jirko, you were working on the previous issues. Please, have a look at this one.
Comment 5 Jiri Rechtacek 2011-03-16 13:44:00 UTC
Best to add more logging to investigate who is holding the lock e.g. maybe a unclosed output stream somewhere.
Comment 6 Jiri Rechtacek 2011-03-21 16:01:58 UTC
dwuysan, I cannot reproduce this problem on my configuration however I saw you reported it several times, I would like ask to run your IDE with switch -J-Dorg.openide.filesystems.annotateUnclosedStreams=true then once it appears again attach your messages.log again. It might help to locate a cause of this problem. Thank you in advance.
Comment 7 Jiri Rechtacek 2011-04-01 15:09:59 UTC
core-main/rev/75da7d40737c - added more logging to investigate who holds a unclosed stream caused this problem
Comment 8 Quality Engineering 2011-04-02 08:49:46 UTC
Integrated into 'main-golden', will be available in build *201104020400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/75da7d40737c
User: Jiri Rechtacek <jrechtacek@netbeans.org>
Log: #195425: more logging to catch NbPreferences wrong synch causing FileAlreadyLockedException: Preferences/org/netbeans/modules/uihandler.properties