Skip to content

IDE splitted sketch, misleading error report #4497

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

Closed
nikiob opened this issue Jan 27, 2016 · 4 comments
Closed

IDE splitted sketch, misleading error report #4497

nikiob opened this issue Jan 27, 2016 · 4 comments
Labels
Type: Duplicate Another item already exists for this topic
Milestone

Comments

@nikiob
Copy link

nikiob commented Jan 27, 2016

Sorry, first time here, I can't figure out how to apply labels, I think "Component: IDE user interface" and "Type: Bug" would be appropriate.

Description:

an error generated in the main tab is reported as an error in last open tab:

Error report

Please observe "W_I_P_Functions:9": line 9 doesn't even exist, "9" is the wrong line in the main tab

Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Uno"

WARNING: Category '' in library OneWire is not valid. Setting to 'Uncategorized'
F:\Elettronica\ArduinoPrgs\sketch_jan27b\W_I_P_Functions.ino: In function 'void setup()':

W_I_P_Functions:9: error: 'Error' was not declared in this scope

exit status 1
'Error' was not declared in this scope

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

View

Main Tab

actually the error is line 9, calling an "Error" variable that doesn't exist,
line 2 is Highlighted instead.
github1

W_I_P Tab

No errors on this tab, BUT
error on line 7 is highlighted,
error on unexistent line 9 is reported,
github2

@per1234
Copy link
Collaborator

per1234 commented Jan 27, 2016

I have reported this issue a week ago at arduino/arduino-builder#99. Until the bug is fixed the workaround is to either manually declare the function prototypes for any function defined after the first tab, so you would add the lines:

void someFunction();
void here(byte INvar);

to the top of the sketch_jan27b tab or you can use Arduino IDE 1.6.6(or previous) which doesn't have this bug.

@nikiob
Copy link
Author

nikiob commented Jan 27, 2016

Thank you, your workaround works!
If my understanding of post labels is correct you should mark your post with "Component: IDE user interface" and "Type: Bug"...
I'd have done the same but I don't know how to do that... sorry.

@per1234
Copy link
Collaborator

per1234 commented Jan 27, 2016

Only project owners/collaborators can add labels so we can't do it but I think the issue certainly qualifies for a bug label.

@matthijskooijman
Copy link
Collaborator

@nikiob, the arduino-builder repository uses fewer labels, but I did add a bug label just now. Thanks for the reminder.

I'll go ahead and close this issue now, since it is a duplicate.

@matthijskooijman matthijskooijman added the Type: Duplicate Another item already exists for this topic label Jan 28, 2016
@agdl agdl added this to the Release 1.6.8 milestone Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

4 participants