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.
Product Version: NetBeans IDE Dev (Build 200709040000) Java: 1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Fresh userdir 1. Create new project 2. D&D Button onto designer 3. Save project 4. Close project 5. Re-open project 6. Switch to design view (because of bug 114696) 7. Drag button Exception thrown: java.lang.IllegalStateException: Illegal source modification with dirty model C:\Documents and Settings\dey\My Documents\NetBeansProjects\WebApplication2\web\Page1.jsp at org.netbeans.modules.visualweb.insync.SourceUnit.setSourceDirty(SourceUnit.java:288)
Created attachment 48173 [details] Exception stack trace
Note that project seems to be broken at this point. Closing & reopening project produces designer's red error screen.
We were not able to reproduce this with the given steps. We tested it with branch and trunk builds. Can you tell us more about any other things that you were doing such as undo/redo (we see undo on the stack), any other pages, projects, faces-config files open etc. Also please specify after which step you see the exception. Also attach the log file.
Just reproduced with Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709051200) Java: 1.5.0_11; Java HotSpot(TM) Client VM 1.5.0_11-b03 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\dey\.netbeans\6.0beta1 The only difference is that the exception popup is suppressed. Blinking red stop sign in the lower right, and same exception written to log file.
Created attachment 48203 [details] Log file
I was able to reproduce the problem once on a spare Toshiba Techra M3 (identical to mine but with a fresh OS install + JDK 1.5.0_12 + NB Beta1 Build 200709060000), although the problem is now much harder to reproduce. Interestingly, I see another intermittent problem under the same test scenario where I am unable to save changes to the jsp file when clicking SaveAll. Error dialog sez: "Cannot get exclusive access to .../Page1.jsp (probably opened for reading)". Further info, upgrading to JDK 6 on my machine had no effect (as Sandip suspected).
Product Version: NetBeans IDE 6.0 Beta 1 (Build 200709060000) Java: 1.5.0_06; Java HotSpot(TM) Client VM 1.5.0_06-b05 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\jayashri\.netbeans\6.0beta1 I can't reproduce this on Toshiba Tecra M4. I'll keep trying and will report back if I can reproduce.
Actually I am able to reproduce the problem now.
Created attachment 48351 [details] Stacktrace with the instrumented jar file
The root cause turned out to be a duplicate registration of document listener on styled document. It surfaced because of the recent change elsewhere that results in opening of the JSP tab after project reopen. It turns out that the issue occurs very relatively more often on single processor systems. A jar with potential fix has been sent to Mark, Jayashri, Krys and Petr Blaha.
The fix was already verified and QE approved to merge the fix in beta1 branch.
Test jar was verified by QE. Based on OK from Petr Blaha checking in the fix on release60_beta1 branch. Fixed in release60_beta1. Checking in src/org/netbeans/modules/visualweb/insync/SourceUnit.java; /cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/SourceUnit.java,v <-- SourceUnit.java new revision: 1.6.2.1; previous revision: 1.6 done Will fix in trunk too.
Fixed in trunk: Checking in SourceUnit.java; /cvs/visualweb/insync/src/org/netbeans/modules/visualweb/insync/SourceUnit.java,v <-- SourceUnit.java new revision: 1.7; previous revision: 1.6 done
Verified on a single processor (Toshiba Satellite Pro) NetBeans IDE 6.0 Beta 1 (Build 200709081200) Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04
*** Issue 113803 has been marked as a duplicate of this issue. ***