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 134243 - Throwable: Can't unlock file Windows2Local/Modes/.nbattrs, it's lock was not found or it wasn't locked.
Summary: Throwable: Can't unlock file Windows2Local/Modes/.nbattrs, it's lock was not ...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Skrivanek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-30 11:49 UTC by alanbur
Modified: 2008-12-22 14:51 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 11110


Attachments
stacktrace (2.56 KB, text/plain)
2008-04-30 11:49 UTC, alanbur
Details
pbadams Modes directory ZIP (18.65 KB, application/x-compressed)
2008-05-22 09:25 UTC, pbadams
Details
stacktrace (2.58 KB, text/plain)
2008-05-27 11:08 UTC, Petr Dvorak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alanbur 2008-04-30 11:49:11 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: SunOS, 5.11, x86

User Comments: 
Opening a JSP file
Comment 1 alanbur 2008-04-30 11:49:20 UTC
Created attachment 60862 [details]
stacktrace
Comment 2 Jiri Skrivanek 2008-05-05 08:32:32 UTC
Is it random? If not, could attach zipped Userdir/config/Windows2Local/Modes?
Comment 3 Exceptions Reporter 2008-05-18 11:23:59 UTC
This issue has already 50 duplicates 
Comment 4 Lukas Hasik 2008-05-22 08:57:48 UTC
I added people that reported this exception to CC of this issue.
Could you attach zipped Userdir/config/Windows2Local/Modes to this bug? Thank you for report.
Comment 5 pbadams 2008-05-22 09:25:32 UTC
Created attachment 61741 [details]
pbadams Modes directory ZIP
Comment 6 Jiri Skrivanek 2008-05-22 11:11:51 UTC
Thank you for the attachment. But I am still not able to reproduce the problem. Please, could you write down detailed
step-by-step description what you did before exception appeared? And also zipped Userdir/config/Windows2Local/Modes at
the time of exception would be helpful. Also please, make sure you use the latest 6.1 build.
Comment 7 pbadams 2008-05-23 06:29:38 UTC
I've not encountered this problem for a while and am unable to reproduce at this time. I have been using a project located on a USB Memory stick, otherwise 
this is a regular Netbeans installation. 

If I encounter the exception again I will attempt to script the actions required to reproduce and upload a ZIP of my Modes folder.

Regards, Paul.
Comment 8 Petr Dvorak 2008-05-27 11:08:34 UTC
Created attachment 61971 [details]
stacktrace
Comment 9 Jiri Skrivanek 2008-05-29 09:45:51 UTC
Thanks to joshis I found out what happens. If the IDE is run with root privilegies, files under
Userdir/config/Windows2Local/Modes are created or modified with root ownership. Then if the IDE is run with user
privilegies, the files cannot be changed and exception is thrown. I changed the code to not throw such confusing exception.

http://hg.netbeans.org/core-main/rev/4a4c820908fe
Comment 10 Lukas Hasik 2008-05-29 09:54:12 UTC
joshis, could you verify it when a build with the fix will be available? Thank you.

I'm marking as 61 patch2 candidate
Comment 11 Quality Engineering 2008-06-03 04:19:01 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #234 build
Changeset: http://hg.netbeans.org/main/rev/4a4c820908fe
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #134243 - If there is problem to lock file while saving attributes, IOException is thrown up and then unlock is not run. Previously unlock throw a very cofusing exception.
Comment 12 Petr Dvorak 2008-06-04 12:37:30 UTC
Verified

The exception is not thrown in build 200806040005.
Comment 13 pgebauer 2008-06-09 20:52:56 UTC
The fix has been ported into the release61_fixes branch:

http://hg.netbeans.org/release61_fixes/cddd270eb53c
Comment 14 pgebauer 2008-07-08 16:09:01 UTC
The fix has been rolled back from the release61_fixes branch because of problem with its delivery via AUC.
Comment 15 Exceptions Reporter 2008-11-09 17:26:43 UTC
Reopening - reproduced in NetBeans IDE 6.1 (Build 080905)
http://statistics.netbeans.org/exceptions/detail.do?id=137693
Comment 16 Jindrich Sedek 2008-11-10 12:55:51 UTC
incorrectly reopen by exc_reporter
Comment 17 Jindrich Sedek 2008-11-10 12:56:59 UTC
incorrectly reopen by exc_reporter