Skip to content

Please harden upload.tool property reading code for boards.txt #1464

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
kenyee opened this issue Jun 10, 2013 · 3 comments
Closed

Please harden upload.tool property reading code for boards.txt #1464

kenyee opened this issue Jun 10, 2013 · 3 comments
Assignees
Milestone

Comments

@kenyee
Copy link

kenyee commented Jun 10, 2013

Found out why I was getting a null pointerexception in 1.5 (now a RunnerException w/ the nightlies) when trying to integrate a different board type from 1.0 code:
processing.app.debug.RunnerException
at processing.app.debug.BasicUploader.uploadUsingPreferences(BasicUploader.java:127)
at processing.app.Sketch.upload(Sketch.java:1670)

The boards.txt file was missing some new parameters for 1.5. In particular, if the upload tool entry is not there, you'll get the runnerexception above because it tries using the BasicUploader which is now invalid because you have to use the sam one or the avrdude one:
xxx.upload.tool=avrdude
xxx.bootloader.tool=avrdude

To reproduce, take these lines out for the board you're using and try an upload to it.
It should never happen w/ a correctly specified boards.txt file, but hardening will help if people add a new board and forget all the parameters...

@LonghornEngineer
Copy link

I am getting a similar error in regards to the bootloader uploader

processing.app.debug.RunnerException
at processing.app.debug.BasicUploader.burnBootloader(BasicUploader.java:311)
at processing.app.Editor$47.run(Editor.java:2540)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

@cmaglie
Copy link
Member

cmaglie commented Jul 15, 2013

Fixed the error, now a message explaining the problem appears instead of the ugly stacktrace.

Error while uploading: missing 'upload.tool' configuration parameter

Do you have something else in mind to improve this part?

C

@cmaglie cmaglie closed this as completed Jul 15, 2013
@kenyee
Copy link
Author

kenyee commented Jul 15, 2013

Thanks, Christian. Works for me. It was just worth making the error show something useful instead of doing something cryptic that makes you think there's a bug in the IDE instead of an issue w/ your config file ;-)

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

3 participants