Bug 18293 - deleting a file that you have selected text in causes gui to hang
deleting a file that you have selected text in causes gui to hang
Status: CLOSED FIXED
Product: utilities
Classification: Unclassified
Component: Properties
3.x
PC Linux
: P1 (vote)
: 3.x
Assigned To: issues@editor
issues@editor
:
: 18236 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-12-03 14:18 UTC by andy
Modified: 2003-07-01 14:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Full thread dumps of the deadlock. (21.74 KB, text/plain)
2001-12-03 14:42 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andy 2001-12-03 14:18:30 UTC
I created a file hssflog.properties in my main project directory.  Pasted text
from log4j samples into it.  Saved it.  Did other stuff. Realized I needed it in
my home directory, selected the text in it, did a copy, selected it in the
explorer, right moused it, clicked delete.  Netbeans hung in grey-screen mode. 
No exception, nothing.  (NB-3.3b6)
Comment 1 Jan Lahoda 2001-12-03 14:39:31 UTC
Hi,
   I reproduced the deadlock. I have build 200112022330, JDK1.4b88. I
tryied it on properties file and on java file and the deadlock wass
reproducible only on properties file. Steps used by me:
1. Created new (properties) file
2. Pasted some text into it
3. Saved it
4. Selected, copied some text from it (part of above pasted text).
5. Pasted into external editor
6. Tryied to delete the properties file.
7. Deadlock occured, two full thread dumps are attached.

Reassigning to properties, as I did reproduce it only on properties
(and from thread dump it looks like some properties problem). Making
P1 - it is deadlock and the circumstaces are quite common.
Comment 2 Jan Lahoda 2001-12-03 14:42:07 UTC
Created attachment 3670 [details]
Full thread dumps of the deadlock.
Comment 3 Jan Lahoda 2001-12-03 14:50:49 UTC
It is even more simple:
1. Create new properties file
2. Open it in editing mode (close the table) - this ought to be
between steps 1 and 2 in above steps, sorry.
3. Delete the properties file.
Comment 4 Martin Roskanin 2001-12-03 15:19:43 UTC
fixed in [maintrunk]

/cvs/properties/src/org/netbeans/modules/properties/PropertiesDataObje
ct.java,v  <--  PropertiesDataObject.java
new revision: 1.43; previous revision: 1.42
Comment 5 Martin Roskanin 2001-12-03 16:47:03 UTC
fixed in [release33]

/cvs/properties/src/org/netbeans/modules/properties/PropertiesDataObje
ct.java,v  <--  PropertiesDataObject.java
new revision: 1.42.2.1; previous revision: 1.42
Comment 6 Martin Roskanin 2001-12-04 09:54:14 UTC
DIFF:
=====

Index: PropertiesDataObject.java
===================================================================
RCS file: 
/cvs/properties/src/org/netbeans/modules/properties/PropertiesDataObje
ct.java,v
retrieving revision 1.42.2.1
retrieving revision 1.42
diff -r1.42.2.1 -r1.42
60,62d59
<     /** Lock used for synchronization of <code>openSupport</code> 
instance creation */
<     private final transient Object OPEN_SUPPORT_LOCK = new Object();
< 
178,184c175,177
<     public PropertiesOpen getOpenSupport() {
<         synchronized(OPEN_SUPPORT_LOCK) {
<             if(openSupport == null) {
<                 openSupport = new PropertiesOpen(this);
<             }
< 
<             return openSupport;
---
>     public synchronized PropertiesOpen getOpenSupport() {
>         if(openSupport == null) {
>             openSupport = new PropertiesOpen(this);
185a179,180
>                 
>         return openSupport;
Comment 7 Martin Roskanin 2001-12-04 09:56:46 UTC
oooops, I have provided wrong diff.

The right one:

Index: PropertiesDataObject.java
===================================================================
RCS file: 
/cvs/properties/src/org/netbeans/modules/properties/PropertiesDataObje
ct.java,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -r1.42 -r1.42.2.1
59a60,62
>     /** Lock used for synchronization of <code>openSupport</code> 
instance creation */
>     private final transient Object OPEN_SUPPORT_LOCK = new Object();
> 
175,177c178,184
<     public synchronized PropertiesOpen getOpenSupport() {
<         if(openSupport == null) {
<             openSupport = new PropertiesOpen(this);
---
>     public PropertiesOpen getOpenSupport() {
>         synchronized(OPEN_SUPPORT_LOCK) {
>             if(openSupport == null) {
>                 openSupport = new PropertiesOpen(this);
>             }
> 
>             return openSupport;
179,180d185
<                 
<         return openSupport;
Comment 8 Lukas Hasik 2001-12-04 15:08:16 UTC
20011204-1123

verified, this deadlock shouldn't appear anymore. 

The same steps caused another deadlock(new) see issue #18335
Comment 9 Martin Roskanin 2001-12-04 17:26:42 UTC
fix has been integrated to [release330]

/cvs/properties/src/org/netbeans/modules/properties/PropertiesDataObje
ct.java,v  <--  PropertiesDataObject.java
new revision: 1.42.4.1; previous revision: 1.42
Comment 10 phamernik 2001-12-18 13:51:22 UTC
*** Issue 18236 has been marked as a duplicate of this issue. ***
Comment 11 Quality Engineering 2003-07-01 14:20:40 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo