Skip to content
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

Wrong line numbers in error messages when using .java files #825

Open
quirinmeyer opened this issue Feb 26, 2024 · 0 comments
Open

Wrong line numbers in error messages when using .java files #825

quirinmeyer opened this issue Feb 26, 2024 · 0 comments

Comments

@quirinmeyer
Copy link

Description

The Processing IDE reports wrong source code location for a programming error in .java-files

The Processing IDE should change such that errors are reported correctly. This severely degrades the overall usability of the Processing IDE. I degrades programmer's productivity.

Expected Behavior

When I include .java files in my sketch and I make programming errors, I would expect that the Processing IDE shows the errors at the right source code location.

Current Behavior

Instead it reports the error in the same file but with the wrong line number.

Steps to Reproduce

My sketch contains two files:

  • BrokenErrorMessage.pde, whose content is irrelevant, and
  • SomeJavaCodeWithErrors.java:
    public class SomeJavaCodeWithErrors // line 1
    {                                   // line 2
      public static int testMe()        // line 3
      {                                 // line 4
        // provoking an error!          // line 5
        return asdflkj;                 // line 6, error, but it is reported be on line 3
      } 
    }
    

When I hit the "play" button in the Processing IDE, I, of course, do get an error:
The variable "asdflkj" does not exist, but the source code location refers to line 3.

However, I would have expected the line number of the error not to be 6 and instead be 3.

Your Environment

  • Processing version: 4.3
  • Operating System and OS version: Windows 10 Enterprise 22H2
  • Other information:

Possible Causes / Solutions

In the Processing forum, we have already discussed the bug here https://discourse.processing.org/t/wrong-line-numbers-in-error-messages-when-using-java-files/43983 and concluded to raise an issue on github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant