Boards Manager

39 views
Skip to first unread message

Victor Aprea

unread,
Jun 11, 2015, 12:30:43 PM6/11/15
to Arduino Developers
Hey all,

This has me pulling my hair out. I'm trying to create and deploy a package for the Boards Manager. I type in the URL into the preferences field. I go to the Boards Manager, and it throws a Null Pointer Exception. I close the IDE, the IDE won't open, throwing a Null Pointer Exception on startup with this stacktrace. 

java.lang.NullPointerException
at cc.arduino.contributions.packages.ContributedToolReference.resolve(ContributedToolReference.java:43)
at cc.arduino.contributions.packages.ContributedPlatform.resolveToolsDependencies(ContributedPlatform.java:76)
at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:92)
at processing.app.BaseNoGui.initPackages(BaseNoGui.java:600)
at processing.app.Base.<init>(Base.java:271)
at processing.app.Base.guardedMain(Base.java:215)
at processing.app.Base.main(Base.java:128)


I go into .arduino15 and delete all the stuff associated with my package and Arduino starts up again. This is really bad, right? One shouldn't be able to "brick" the IDE by adding a package to the Boards Manager through the Preferences dialogue...

A Null Pointer Exception doesn't really help me narrow down what's going on. Clearly something in my package_index.json is giving it heartache, but I can't tell what. The deepest the stacktrace shows me is this line. But my package doesn't have any Tool dependencies... it seems like in order for a Null Pointer Exception to happen there platform would have to be null, but if that were the case, wouldn't line 89 have had a Null Pointer Exception first?

On a related note, I still haven't worked out how to get Arduino 1.6.4 to launch in Eclipse, or else I would have break-pointed this by now. I really want to help, but I need help to elevate me to a point where I can be helpful and not just be complaining.

Victor Aprea // Wicked Device

Mikael Patel

unread,
Jun 11, 2015, 1:03:10 PM6/11/15
to devel...@arduino.cc
Hi Victor. Hade the same problem with the package file for Cosa. You need to add an empty tools dependency. Cheers! Mikael
https://github.com/mikaelpatel/Cosa/commit/4f34dcaffd71ddc593638c8db10be215b90b3a96

Victor Aprea

unread,
Jun 11, 2015, 2:13:56 PM6/11/15
to Arduino Developers
Mikael, 

Thanks so much, that seems to have done the trick! A couple of notes to the Arduino Team:
  1. I still think this is a kind of major bug, would you like me to post an issue to the repo, or is it already covered?
  2. I would still love to see guidance on how to set up an Eclipse dev environment for the Java part of Arduino (i.e. the IDE). I'm a somewhat experienced Java programmer, and I haven't been able to get past this hurdle on my own. 
  3. It seems to me like it would be super easy (for someone in-the-know) to create a package validation script of some kind (online even, but offline would be fine too)
  4. It would be nice if the Boards menu including headings for which Package a set of boards are included as part of. This would help disambiguate boards with the same name included in multiple Packages (or included in a Package and in the hardware folder, etc).
  5. The version field of the package has to be compliant with semver.org, that should be made clear in some TBD documentation (any old string won't do).
  6. There was some kind of registration process going on at one point... now that I'm catching up, is that still a thing?
Kind Regards,
Vic

Victor Aprea // Wicked Device

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Federico Fissore

unread,
Jun 12, 2015, 6:06:18 AM6/12/15
to devel...@arduino.cc
Victor Aprea ha scritto il 11/06/2015 alle 20:13:
> Mikael,
>
> Thanks so much, that seems to have done the trick! A couple of notes to
> the Arduino Team:
>
> 1. I still think this is a kind of major bug, would you like me to post
> an issue to the repo, or is it already covered?


Fixed with https://github.com/arduino/Arduino/issues/3248


> 2. I would still love to see guidance on how to set up an Eclipse dev
> environment for the Java part of Arduino (i.e. the IDE). I'm a
> somewhat experienced Java programmer, and I haven't been able to get
> past this hurdle on my own.


I'm not an eclipse user, I'll ping Cristian.


> 3. It seems to me like it would be super easy (for someone in-the-know)
> to create a package validation script of some kind (online even, but
> offline would be fine too)


While it's not called "validation", putting a
test_package_something_index.json in your .arduino15 folder and see what
the IDE says is THE way for being sure it works. If we had released that
validation tool, it would have failed with the same cryptic error
message because it would have been buggy as well.


> 4. It would be nice if the Boards menu including headings for which
> Package a set of boards are included as part of. This would help
> disambiguate boards with the same name included in multiple Packages
> (or included in a Package and in the hardware folder, etc).


Boards menu already have labels with the name of the core with its
boards list below. Are you referring to something else?


> 5. The version field of the package has to be compliant with semver.org
> <http://semver.org>, that should be made clear in some TBD
> documentation (any old string won't do).


Yep, I'll a couple of docs entries in my backlog. I'll go through it
next week


> 6. There was some kind of registration process going on at one point...
> now that I'm catching up, is that still a thing?


We gave up when we opened the IDE for custom boards. No one has to tell
Arduino a thing about its core. However listing it at
https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls
is appreciated


Victor Aprea

unread,
Jun 12, 2015, 9:13:51 AM6/12/15
to Arduino Developers
Federico,
 
 4. It would be nice if the Boards menu including headings for which
    Package a set of boards are included as part of. This would help
    disambiguate boards with the same name included in multiple Packages
    (or included in a Package and in the hardware folder, etc).


Boards menu already have labels with the name of the core with its boards list below. Are you referring to something else?

Maybe I have the wrong idea, or I'm not following some kind of philosophical convention, but I think I need to publish a new zip and a new json file to go with it anytime anything in the zip changes (because that changes the sha256sum). Lets say I have my board descriptions in the sketchbook/hardware folder, and then I add a package_myboard_1.0.0_index.json that includes some of the same boards in it, and then I add package_myboard_1.2.0_index.json that *also* has some of the same boards in it. 

There is no clear way for me to know which 'instance' of the board to pick from the Boards menu so that I know it's using the right package (or no package at all in the case of the sketchbook/hardware selection). The package has a "name" attribute in the json and a "version" attribute even, but that doesn't show up anywhere in the Boards menu as a heading. What I end up seeing is horizontal separators between the same set of board names three times (in the case above) with no headings providing a link to "why are these showing up in my boards menu"

The significance of this, I think, is the package has correlated library dependencies. This is a really great feature, because it lets someone go from zero to compiling my project in Arduino without having to go off and pull together all the hardware and library dependencies themselves. If my understanding is correct, the mechanism for selecting a package is to select a board from the Boards menu that is a member of that package. It's trial an error at the moment if you have duplicates.

Kind Regards,
Vic

Federico Fissore

unread,
Jun 12, 2015, 10:18:45 AM6/12/15
to devel...@arduino.cc
OK I see your point: 2 comments then

First, when releasing an upgrade, you shouldn't publish a brand new json
file, but rather include the update into the first one (which then
should not have a version in its name)
Look at how we are doing it in our file
http://downloads.arduino.cc/packages/package_index.json
Doing so will remove the duplication you mention because you'll be able
to install only one version at a time

Second, in boards manager, for each core, the list of supported boards
is shown. While answering your email, I double checked this feature and
I found a bug: the list of displayed boards is not bound to the version
you select from the dropdown, but it's always the most recent version
installable (thus, if you already have version 1.2, it will show the
list from version 1.0, doh!)
I'll open an issue asap

Hope this helps you

Best regards

Federico

Reply all
Reply to author
Forward
0 new messages