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.
When editing a jsp, I get an IllegalStateException. I have only seen it happen when editing one with javascript in it.
Created attachment 10705 [details] my ide log from the error
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.
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)
Created attachment 10829 [details] My ide.log file.
Created attachment 10830 [details] A file that causes this on my install
*** Issue 36172 has been marked as a duplicate of this issue. ***
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).
I can not reproduce it with both TRUE
This bug is not relevant to maintrunk, so I put Targer Milestone 3.5
I'm sorry for the last comment. In maintrunk I'm not able to reproduce it -> I'm closing this bug as worksforme