processing / processing/processing4

`Cannot invoke "processing.app.SketchCode.isModified()" because "this.current" is null`

Open
#719 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Created by: catem-code

java. lang. NullPointerException: Cannot invoke "processing.app.SketchCode.isModified ()" because

"this.current" is null

at processing.app. Sketch. setModified (Sketch. java: 760) at processing. mode. java. JavaEditor. (JavaEditor. java: 119) at processing. mode. java. JavaMode. createEditor (JavaMode. java: 44) at processing. app. Base. handleOpenInternal (Base. java: 1613) at processing. app. Base. handleOpen (Base. java: 1482) at processing. app. Base. handleOpenPrompt (Base. java: 1178) at processing.app.u. Editor. lambda$buildFileMenus4 (Editor.¡ava:662) at java. desktop/javax. swing. AbstractButton. fireActionPerformed (AbstractButton. java: 1972) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313) at java.desktop/javax.swing. DefaultButtonModel.fireActionPerformed(DevaultButtonModel.ava:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.AbstractButton.doClick(AbstractButton.java:374) at java.desktop/javax.swing.pilaf.basic.Bas ricMenuItemUI.doClick(BasicMenuItemUI.java:1028) at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1072) at java.desktop/java.awt. Component. processMouseEvent (Component. java: 6626) at java. desktop/javax. swing. JComponent. processMouseEvent (JComponent. java: 3389) at java.desktop/java.awt. Component. processEvent (Component. java: 6391) java.desktop/java.awt.Container.processEvent(Container. java:2266)

at java.desktop/java awt. Component. dispatchEventImpl (Component java: 5001)

java.desktop/java.

awt. Container.dispatchEventImpl (Container java: 2324)

at java.desktop/java. awt. Component. dispatchEvent (Component. java: 4833) at java. desktop/java.awt. LightweightDispatcher.retargetMouseEvent(Container.java: 4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt

LightweightDispatcher _dispatchEvent (Container: java: 4516)

at java.desktop/java

Container. dispatchEventImpl(Container java:2310)

at java.desktop/java

Ewindow

• dispatchEventIm pl (window. java:2780)

java.desktop/java.aw

(Component

L.ja va: 4833)

at java.desktop/java

chEventImpl(EventQueue.java: 773

CHET

java.desktop/java at java.desktop/java.awt at java.base/java.securit

a: 399

at java.base/java, security. ProtectionDomainsJavase at java.base/java. security. ProtectionDomainsJav

ege (ProtectionDomain. java: 86)

ege (ProtectionDomain. java: 97)

at java.desktop/java. awt. EventQueue$5 run (EventQueue. java: 7. at java.desktop/java.awt. EventQueue$5. run (EventQueue. java: 742 at java.base/java.secur

Arcasstonrrores

at lava.base java.secur

tectionDomain$J.

ProtectionDomain, ¡ava: 86)

at lava.desktop/Java.awl

:203

at lava.desktop/java.awt.Eventospatc at java.desktop/java.awt. EventDispatchThread.pumpEventsForFilter(EventDispatchThread at java. desktop/java.awt. EventDispatchThread.pumpEventsForHierarchy (EventDispatchT at java.desktop/java. awt. EventDispatchThread.pumpEvents (EventDispatchThread. at java.desktop/java.avt.EventDispatchThread.pumpEvents(EventDispatchThread.

Q

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at processing.app.Sketch.setModified in Sketch.java:760 and follow the JavaEditor and JavaMode editor-creation path named in the stack trace. Reproduce the failure by opening a sketch through the editor menu, then establish the expected behavior when current is null and verify that opening no longer throws this exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.