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 110076 - Deadlock after closing/opening IDE with page flow editor open in view
Summary: Deadlock after closing/opening IDE with page flow editor open in view
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-17 23:10 UTC by _ krystyna
Modified: 2007-07-26 22:25 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (23.44 KB, application/octet-stream)
2007-07-17 23:11 UTC, _ krystyna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ krystyna 2007-07-17 23:10:09 UTC
NB 6 standard installer 0716120000
XP
JDK1.6.0_01, 1.6.0_02

1. create a two page ee5 project and add at least one button to each page
2. open faces-config.xml from either file system or context menu
3. press save all
4. close IDE
5. restart IDE with the same userdir
>IDE opens to faces-config in view as expected but the message under each page icon says "Loading".. 
>switching to Page1 or Page2 tabs shows the .jsps "loading, please wait"...
thread dump shows deadlock (full stack attached)

To recover close the .xml file in multiview and restart IDE.
Comment 1 _ krystyna 2007-07-17 23:11:04 UTC
Created attachment 45263 [details]
thread dump
Comment 2 _ sandipchitale 2007-07-18 23:42:47 UTC
There seems to be a problem with calling the getInstance() from PageFlowEditor code while the startModeling() has been 
called by the designer. We need to improve the startModeling() API.
Comment 3 _ sandipchitale 2007-07-26 00:40:00 UTC
The deadlock was caused by (the classic reverse sequence calls to
locking) call to the synchronized ModelSet.getInstance()  method,
which in turn called the JavaSource.runUserAction() on one thread and
call to the JavaSource.runUserAction() before calling the
ModelSet.getInstance() method on the other thread. Both the
JavaSource.runUserAction() calls were trying to aquire the same
ReentrantLock instance on two separate thread. Fixed by adjusting the
sequence of calls to be the same i.e. call ModelSet.getInstance()
first. Also fixed the creation of multiple threads for each
startModeling() call by maintaining a project to runable static
map. Thirdly the FacesModelSet.startModeling() method returns the
FacesModelSet if one is already available, else a null
is returned. The designer/jsf and dataconnectivity modules need to be
cleaned + recompiled to pick up the FacesModelSet.startModeling()
method signature change.

Checking in ModelSet.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/ModelSet.java,v  <--  ModelSet.java
new revision: 1.15; previous revision: 1.14
done
Checking in models/FacesModelSet.java;
/cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/models/FacesModelSet.java,v  <--  FacesModelSet.java
new revision: 1.15; previous revision: 1.14
done
Comment 4 _ krystyna 2007-07-26 22:25:06 UTC
Verified fixed : NetBeans IDE Dev (Build 070726) Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System: 
Windows XP version 5.1 running on x86; Cp1252; en_US (nb)