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 121165 - java.lang.IllegalStateException: The model is not initialized or is broken.
Summary: java.lang.IllegalStateException: The model is not initialized or is broken.
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: XDM (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Samaresh Panda
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-05 11:12 UTC by m_potociar
Modified: 2008-08-01 17:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 2719


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m_potociar 2007-11-05 11:12:08 UTC
I am assigning this exception a P1 priority as it occurs with every input action (even a mouse click) in the file which
renders the WSDL editing impossible.


Build: NetBeans IDE Dev (Build 200708040000)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05
OS: Linux, 2.6.20-15-generic, i386
User comments: 
STACKTRACE: (first 10 lines)
java.lang.IllegalStateException: The model is not initialized or is broken.
        at org.netbeans.modules.xml.xdm.XDMModel.checkStableOrParsingState(XDMModel.java:961)
        at org.netbeans.modules.xml.xdm.XDMModel.getDocument(XDMModel.java:803)
        at org.netbeans.modules.xml.xdm.xam.XDMAccess.getContainingElement(XDMAccess.java:367)
        at org.netbeans.modules.xml.xdm.xam.XDMAccess.getContainingElement(XDMAccess.java:57)
        at org.netbeans.modules.xml.xam.dom.AbstractDocumentModel.findComponent(AbstractDocumentModel.java:465)
        at
org.netbeans.modules.xml.schema.multiview.SchemaSourceMultiViewElement.findNode(SchemaSourceMultiViewElement.java:399)
        at
org.netbeans.modules.xml.schema.multiview.SchemaSourceMultiViewElement.access$200(SchemaSourceMultiViewElement.java:65)
        at
org.netbeans.modules.xml.schema.multiview.SchemaSourceMultiViewElement$4.run(SchemaSourceMultiViewElement.java:345)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
        at
org.netbeans.modules.xml.schema.multiview.SchemaSourceMultiViewElement.selectElementsAtOffset(SchemaSourceMultiViewElement.java:381)
Comment 1 Sonali Kochar 2007-11-05 14:47:43 UTC
Can you provide the steps to reproduce this issue? thx
Comment 2 Nam Nguyen 2007-11-05 17:08:01 UTC
Somehow domain model state is not reflected fast enough by background task when timer in SchemaSourceMultiViewElement
expired and run.

The safest fix is to catch exception at XDMAccess.getContainingElement and return null for xam to handle.
Fix checked in trunk.

/cvs/xml/xdm/src/org/netbeans/modules/xml/xdm/xam/XDMAccess.java,v  <--  XDMAccess.java
new revision: 1.13; previous revision: 1.12
Comment 3 tonybeckham 2008-08-01 17:58:42 UTC
Fix Verified

Product Version: NetBeans IDE Dev (Build 200808010201)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.4 running on i386; MacRoman; en_US (nb)