IndexOutOfBoundsException when clicking on Run menu

Hi,

The following error ocurs if:

there's a class opened in the editor;
the first line is not blank (import or package, for example);
the caret is positioned in this line;
you click on Run menu.

Regards,

Franklin.

---

Error message: update failed for AnAction with ID=ToggleLineBreakpoint
java.lang.IndexOutOfBoundsException: Wrong offset: -1
at com.intellij.openapi.editor.ex.util.d.a(d.java:28)
at com.intellij.openapi.editor.impl.q.a(q.java:60)
at com.intellij.openapi.editor.impl.k.getLineNumber(k.java:209)
at com.intellij.debugger.ui.a.q$2.a(q$2.java:11)
at com.intellij.debugger.c.a.a(a.java:111)
at com.intellij.debugger.ui.a.q.b(q.java:31)
at com.intellij.debugger.actions.bj.update(bj.java:9)
at com.intellij.openapi.actionSystem.impl.e.a(e.java:67)
at com.intellij.openapi.actionSystem.impl.e.a(e.java:43)
at com.intellij.openapi.actionSystem.impl.h.f(h.java:34)
at com.intellij.openapi.actionSystem.impl.h.access$400(h.java:44)
at com.intellij.openapi.actionSystem.impl.h$c_.menuSelected(h$c_.java:8)
at javax.swing.JMenu.fireMenuSelected(JMenu.java:1097)
at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1190)
at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:362)
at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:228)
at javax.swing.JMenu.setSelected(JMenu.java:286)
at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1257)
at com.intellij.openapi.actionSystem.impl.h.menuSelectionChanged(h.java:79)
at javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:83)
at javax.swing.plaf.basic.BasicMenuUI$MouseInputHandler.mousePressed(BasicMenuUI.java:330)
at java.awt.Component.processMouseEvent(Component.java:5097)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:11)
at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:139)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:125)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Please sign in to leave a comment.