New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger "String is null" error when hitting breakpoint #3265

Closed
shiffman opened this Issue May 11, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@shiffman
Member

shiffman commented May 11, 2015

I'm reporting a series of errors regarding the debugger from some recent testing. This first one may be tied to the pane which is ultimately going away, but filing just in case.

When the debugger hits a breakpoint, I get the following error in the console:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: String is null
    at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2916)
    at processing.app.EditorStatus.paintComponent(EditorStatus.java:209)
    at javax.swing.JComponent.paint(JComponent.java:1056)
    at javax.swing.JComponent.paintChildren(JComponent.java:889)
    at javax.swing.JComponent.paint(JComponent.java:1065)
    at javax.swing.JComponent.paintChildren(JComponent.java:889)
    at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1047)
    at javax.swing.JComponent.paint(JComponent.java:1065)
    at javax.swing.JComponent.paintToOffscreen(JComponent.java:5219)

This simple example produces it:

float x = 0;

void setup() {
  size(200, 200);
}

void draw() {
  background(0);
  ellipse(x, 100, 50, 50);
  x = x + 5;
  if (x > width) {
    x = 0;    // ***** breakpoint here ****** // 
  }
}

benfry added a commit that referenced this issue May 11, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 11, 2015

Member

Hm, that's odd... I wonder if the debugger is clearing the status area by setting it null.

I've added a workaround to get rid of the error as well as a check for that condition since I can't reproduce it. Can you post the stack trace here if you get a stack trace about statusNotice(null) in your further testing?

Member

benfry commented May 11, 2015

Hm, that's odd... I wonder if the debugger is clearing the status area by setting it null.

I've added a workaround to get rid of the error as well as a check for that condition since I can't reproduce it. Can you post the stack trace here if you get a stack trace about statusNotice(null) in your further testing?

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman May 12, 2015

Member

Yup, here it is:

java.lang.Exception: This code called statusNotice(null)
    at processing.app.Editor.statusNotice(Editor.java:2858)
    at processing.mode.java.JavaEditor.statusHalted(JavaEditor.java:2394)
    at processing.mode.java.Debugger.vmBreakPointEvent(Debugger.java:635)
    at processing.mode.java.Debugger.vmEvent(Debugger.java:549)
    at processing.mode.java.pdex.VMEventReader.run(VMEventReader.java:59)
Member

shiffman commented May 12, 2015

Yup, here it is:

java.lang.Exception: This code called statusNotice(null)
    at processing.app.Editor.statusNotice(Editor.java:2858)
    at processing.mode.java.JavaEditor.statusHalted(JavaEditor.java:2394)
    at processing.mode.java.Debugger.vmBreakPointEvent(Debugger.java:635)
    at processing.mode.java.Debugger.vmEvent(Debugger.java:549)
    at processing.mode.java.pdex.VMEventReader.run(VMEventReader.java:59)
@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman May 12, 2015

Member

Also get the same error on step with vmStepEvent instead of vmBreakPointEvent

java.lang.Exception: This code called statusNotice(null)
    at processing.app.Editor.statusNotice(Editor.java:2858)
    at processing.mode.java.JavaEditor.statusHalted(JavaEditor.java:2394)
    at processing.mode.java.Debugger.vmStepEvent(Debugger.java:659)
    at processing.mode.java.Debugger.vmEvent(Debugger.java:552)
    at processing.mode.java.pdex.VMEventReader.run(VMEventReader.java:59)
Member

shiffman commented May 12, 2015

Also get the same error on step with vmStepEvent instead of vmBreakPointEvent

java.lang.Exception: This code called statusNotice(null)
    at processing.app.Editor.statusNotice(Editor.java:2858)
    at processing.mode.java.JavaEditor.statusHalted(JavaEditor.java:2394)
    at processing.mode.java.Debugger.vmStepEvent(Debugger.java:659)
    at processing.mode.java.Debugger.vmEvent(Debugger.java:552)
    at processing.mode.java.pdex.VMEventReader.run(VMEventReader.java:59)
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 12, 2015

Member

This turned out to be a missing language string, of all things. Give it a try now.

Member

benfry commented May 12, 2015

This turned out to be a missing language string, of all things. Give it a try now.

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman May 12, 2015

Member

Sorry if this is overloading stack traces, but I'm observing the three following errors (the last one I believe is likely related to when I had an error in the code and not the debugger? So I can try to reproduce that as a separate issue if necessary.)

java.lang.Exception: setting notice to Debugger halted.
    at processing.app.Editor.statusNotice(Editor.java:2886)
    at processing.mode.java.JavaEditor.statusHalted(JavaEditor.java:2394)
    at processing.mode.java.Debugger.vmStepEvent(Debugger.java:659)
    at processing.mode.java.Debugger.vmEvent(Debugger.java:552)
    at processing.mode.java.pdex.VMEventReader.run(VMEventReader.java:59)
java.lang.Exception: setting notice to Debugger busy...
    at processing.app.Editor.statusNotice(Editor.java:2886)
    at processing.mode.java.JavaEditor.statusBusy(JavaEditor.java:2389)
    at processing.mode.java.Debugger.step(Debugger.java:297)
    at processing.mode.java.Debugger.stepOver(Debugger.java:304)
    at processing.mode.java.DebugTray$2.actionPerformed(DebugTray.java:150)
    at processing.app.EditorButton.mouseClicked(EditorButton.java:148)
    at java.awt.Component.processMouseEvent(Component.java:6528)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4542)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.ToolTipManager.initiateToolTip(ToolTipManager.java:478)
    at javax.swing.ToolTipManager.mouseEntered(ToolTipManager.java:435)
    at processing.mode.java.pdex.JavaTextArea$MouseHandler.mouseEntered(JavaTextArea.java:749)
    at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:300)
    at java.awt.Component.processMouseEvent(Component.java:6534)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4686)
    at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4665)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4514)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Member

shiffman commented May 12, 2015

Sorry if this is overloading stack traces, but I'm observing the three following errors (the last one I believe is likely related to when I had an error in the code and not the debugger? So I can try to reproduce that as a separate issue if necessary.)

java.lang.Exception: setting notice to Debugger halted.
    at processing.app.Editor.statusNotice(Editor.java:2886)
    at processing.mode.java.JavaEditor.statusHalted(JavaEditor.java:2394)
    at processing.mode.java.Debugger.vmStepEvent(Debugger.java:659)
    at processing.mode.java.Debugger.vmEvent(Debugger.java:552)
    at processing.mode.java.pdex.VMEventReader.run(VMEventReader.java:59)
java.lang.Exception: setting notice to Debugger busy...
    at processing.app.Editor.statusNotice(Editor.java:2886)
    at processing.mode.java.JavaEditor.statusBusy(JavaEditor.java:2389)
    at processing.mode.java.Debugger.step(Debugger.java:297)
    at processing.mode.java.Debugger.stepOver(Debugger.java:304)
    at processing.mode.java.DebugTray$2.actionPerformed(DebugTray.java:150)
    at processing.app.EditorButton.mouseClicked(EditorButton.java:148)
    at java.awt.Component.processMouseEvent(Component.java:6528)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4542)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.ToolTipManager.initiateToolTip(ToolTipManager.java:478)
    at javax.swing.ToolTipManager.mouseEntered(ToolTipManager.java:435)
    at processing.mode.java.pdex.JavaTextArea$MouseHandler.mouseEntered(JavaTextArea.java:749)
    at java.awt.AWTEventMulticaster.mouseEntered(AWTEventMulticaster.java:300)
    at java.awt.Component.processMouseEvent(Component.java:6534)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6290)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4881)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.retargetMouseEnterExit(Container.java:4686)
    at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:4665)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4514)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4703)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:731)
    at java.awt.EventQueue$4.run(EventQueue.java:729)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 12, 2015

Member

Oops, I hadn't pushed the "setting notice to" fix.

This other guy is a new one that's happening somewhere in @Manindra29's mouse handling code. So, another one to file...

Member

benfry commented May 12, 2015

Oops, I hadn't pushed the "setting notice to" fix.

This other guy is a new one that's happening somewhere in @Manindra29's mouse handling code. So, another one to file...

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 16, 2015

Member

Closing this original issue as fixed, new issue filed here: #3286

Member

benfry commented May 16, 2015

Closing this original issue as fixed, new issue filed here: #3286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment