Skip to content

Prevent NPEs when tab document is null#4596

Merged
benfry merged 1 commit into
processing:masterfrom
JakubValtar:master
Aug 1, 2016
Merged

Prevent NPEs when tab document is null#4596
benfry merged 1 commit into
processing:masterfrom
JakubValtar:master

Conversation

@JakubValtar

Copy link
Copy Markdown
Contributor

JavaMode visits all tabs on sketch load to extract breakpoints, so doc
is always set (except when running Tweak mode; it sets docs to null to
force reload). Other modes have null docs until the tabs are visited
manually.

Fixes #4555

JavaMode visits all tabs on sketch load to extract breakpoints, so doc
is always set (except when running Tweak mode; it sets docs to null to
force reload). Other modes have null docs until the tabs are visited
manually.

Fixes processing#4555
@benfry benfry merged commit 21900a8 into processing:master Aug 1, 2016
@benfry

benfry commented Aug 1, 2016

Copy link
Copy Markdown
Contributor

Thanks; maybe we'll do a 3.1.3 with this.

@JakubValtar

JakubValtar commented Aug 1, 2016

Copy link
Copy Markdown
Contributor Author

There are two other places where null doc can be a problem. One is main error checker loop, it uses docs to get tab contents. It will spit an exception into console, but keep running. Other place is Rename, it will also spit an exception and do nothing. I need to revise this later and make sure there are some clear rules how document works.

Edit: this is only a problem in JavaMode, after running Tweak Mode

@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NullPointerException in SketchCode.getDocumentText()

2 participants