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 34435 - IllegalStateException editing jsp
Summary: IllegalStateException editing jsp
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 3.x
Hardware: All Linux
: P3 blocker with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 36172 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-17 18:05 UTC by lmeadors
Modified: 2004-02-03 13:07 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
my ide log from the error (378.64 KB, text/plain)
2003-06-17 18:07 UTC, lmeadors
Details
My ide.log file. (291.48 KB, text/plain)
2003-06-27 17:07 UTC, inertia
Details
A file that causes this on my install (4.15 KB, text/plain)
2003-06-27 17:59 UTC, lmeadors
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lmeadors 2003-06-17 18:05:46 UTC
When editing a jsp, I get an IllegalStateException.

I have only seen it happen when editing one with
javascript in it.
Comment 1 lmeadors 2003-06-17 18:07:06 UTC
Created attachment 10705 [details]
my ide log from the error
Comment 2 Miloslav Metelka 2003-06-27 16:50:41 UTC
Does it happen consistently? If so could you please provide us with
the problematic file that could allow us to reproduce the problem?

There seems to be something wrong with the state infos of the jsp
syntax but it will need a thorough investigation first.
Comment 3 inertia 2003-06-27 17:06:36 UTC
This happens semi-consistently for me.  When I first open NetBeans, and open a bunch 
of JSPs, any try to edit.  Usually it happens when I try to edit near the top of the file, not 
the bottom.  (ide.log attached)

When I close the problem file and open it again, the problem goes away.  Here's the 
stack trace I get when it happended just now:

java.lang.IllegalStateException: javax.swing.text.BadLocationException: Invalid offset=-
10
	at 
org.netbeans.editor.LineRootElement.getTokenSafeOffset(LineRootElement.java:491)
	at 
org.netbeans.editor.BaseDocument.getTokenSafeOffset(BaseDocument.java:1234)
	at org.netbeans.editor.DrawEngine.initInfo(DrawEngine.java:237)
	at org.netbeans.editor.DrawEngine.draw(DrawEngine.java:1051)
	at org.netbeans.editor.LeafView.viewToModel(LeafView.java:381)
	at org.netbeans.editor.BaseTextUI$RootView.viewToModel(BaseTextUI.java:676)
	at org.netbeans.editor.BaseTextUI.viewToModel(BaseTextUI.java:376)
	at org.netbeans.editor.BaseCaret.mousePressed(BaseCaret.java:962)
	at org.netbeans.editor.ext.ExtCaret.mousePressed(ExtCaret.java:356)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:218)
	at java.awt.Component.processMouseEvent(Component.java:5090)
	at java.awt.Component.processEvent(Component.java:4890)
	at java.awt.Container.processEvent(Container.java:1566)
	at java.awt.Component.dispatchEventImpl(Component.java:3598)
	at java.awt.Container.dispatchEventImpl(Container.java:1623)
	at java.awt.Component.dispatchEvent(Component.java:3439)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3162)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
	at java.awt.Container.dispatchEventImpl(Container.java:1609)
	at java.awt.Window.dispatchEventImpl(Window.java:1585)
	at java.awt.Component.dispatchEvent(Component.java:3439)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
	at 
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:23
0)
	at 
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Comment 4 inertia 2003-06-27 17:07:42 UTC
Created attachment 10829 [details]
My ide.log file.
Comment 5 lmeadors 2003-06-27 17:59:38 UTC
Created attachment 10830 [details]
A file that causes this on my install
Comment 6 Petr Pisl 2003-09-18 12:57:30 UTC
*** Issue 36172 has been marked as a duplicate of this issue. ***
Comment 7 lmeadors 2003-09-18 18:40:35 UTC
I may have a configuration that works better:
> Tools
 > Options...
  > Building
   > Also Compile Error Page = False
   > Also Compile Inc. and Forw. = False

This seems to make the problem go away (I have not seen it for weeks).
Comment 8 capSS 2003-10-06 11:19:06 UTC
I can not reproduce it with both TRUE
Comment 9 Petr Pisl 2004-02-03 12:30:53 UTC
This bug is not relevant to maintrunk, so I put Targer Milestone 3.5
Comment 10 Petr Pisl 2004-02-03 13:07:15 UTC
I'm sorry for the last comment. In maintrunk I'm not able to reproduce
it -> I'm closing this bug as worksforme