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 114783 - Exceptions thrown when modifying re-opened project
Summary: Exceptions thrown when modifying re-opened project
Status: VERIFIED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: PC All
: P1 blocker (vote)
Assignee: _ sandipchitale
URL:
Keywords:
: 113803 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-05 15:46 UTC by Mark Dey
Modified: 2007-10-24 01:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception stack trace (3.32 KB, application/octet-stream)
2007-09-05 15:48 UTC, Mark Dey
Details
Log file (154.25 KB, application/octet-stream)
2007-09-05 23:04 UTC, Mark Dey
Details
Stacktrace with the instrumented jar file (4.72 KB, application/octet-stream)
2007-09-07 01:38 UTC, Jayashri Visvanathan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Dey 2007-09-05 15:46:19 UTC
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)
Comment 1 Mark Dey 2007-09-05 15:48:18 UTC
Created attachment 48173 [details]
Exception stack trace
Comment 2 Mark Dey 2007-09-05 15:49:58 UTC
Note that project seems to be broken at this point. Closing & reopening project produces designer's red error screen.
Comment 3 _ sandipchitale 2007-09-05 19:06:40 UTC
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.
Comment 4 Mark Dey 2007-09-05 23:01:27 UTC
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.
Comment 5 Mark Dey 2007-09-05 23:04:20 UTC
Created attachment 48203 [details]
Log file
Comment 6 Mark Dey 2007-09-06 21:23:03 UTC
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).
Comment 7 Jayashri Visvanathan 2007-09-06 22:43:11 UTC
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.
Comment 8 Jayashri Visvanathan 2007-09-06 22:57:00 UTC
Actually I am able to reproduce the problem now. 
Comment 9 Jayashri Visvanathan 2007-09-07 01:38:13 UTC
Created attachment 48351 [details]
Stacktrace with the instrumented jar file
Comment 10 _ sandipchitale 2007-09-07 03:15:42 UTC
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.
Comment 11 Petr Blaha 2007-09-07 08:30:56 UTC
The fix was already verified and QE approved to merge the fix in beta1 branch.
Comment 12 _ sandipchitale 2007-09-07 17:23:27 UTC
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.
Comment 13 _ sandipchitale 2007-09-07 18:37:35 UTC
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
Comment 14 _ krystyna 2007-09-09 04:31:56 UTC
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
Comment 15 _ deva 2007-10-24 01:29:39 UTC
*** Issue 113803 has been marked as a duplicate of this issue. ***