Skip to content

No stack trace or thrower position highlighting on exception #1153

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

Open
lammich opened this issue Jun 17, 2025 · 2 comments
Open

No stack trace or thrower position highlighting on exception #1153

lammich opened this issue Jun 17, 2025 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed pde Processing Development Environment

Comments

@lammich
Copy link

lammich commented Jun 17, 2025

Most appropriate sub-area of Processing 4?

PDE

Processing version

4.4.4

Operating system

Ubuntu 24.04, Windows 10

Bug description

The location of an exception (e.g. NullPointerException) is not highlighted, nor is a stack trace printed. The only information printed is a red NullPointerException message at the bottom. There is no obvious way how to find out where this was thrown.

This seems to be a regression to earlier 3.x versions, where the line of the thrower would be at least highlighted.

Steps to reproduce this

"1. open the below snippet in PDE

  1. run the snippet

  2. observe that the error message (NullPointerException) is not linked to any position in the code, nor is any position in the code highlighted, nor is a stack-trace or similar printed anywhere"

snippet

PVector [] vs = new PVector[10];
for (int i=0;i<vs.length;++i)
  vs[i].set(0,0);   // <-- this position should be contained in the error message

Additional context

real showstopper when trying to debug any bigger program in PDE!

Would you like to work on the issue?

No, I’m just reporting the issue

@lammich lammich added the bug Something isn't working label Jun 17, 2025
@Stefterv
Copy link
Collaborator

Hi @lammich Thank you for reporting this issue and giving such detailed context! I just tested it and it seems to be a regression in 4.4.x. It has probably something to do with the integrated JDK within Processing. I suspect that the error reporting probably looking in the wrong place for now.

@Stefterv
Copy link
Collaborator

Traced it down to here:

if (e instanceof SketchException re) {
the code is expecting a processing.app.SketchException and has been given a processing.java.preproc.SketchException missing this if check.

So the origin of the problem is that we had a circular reference to SketchException which was dealt with by copying the class but instead should have been migrated out off the app instead

@Stefterv Stefterv added good first issue Good for newcomers help wanted Extra attention is needed pde Processing Development Environment labels Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed pde Processing Development Environment
Projects
None yet
Development

No branches or pull requests

2 participants