Closed pepijndevos closed 2 years ago
That's an IDE bug, as far as I am aware, and I have not heard any explanation of how it is triggered, by my core or anything else. But it seems to impact only versions after 1.8.13. Thus 1.8.13 the only version of the IDE that's really usable (up until 1.8.12, they put inapplicable entries into tools-> programmers, assuming every programmer could support every part. Needless to say that is not the case, and because it used the platform.txt file that came with the programmer definition, every core had to supply their own copy of every common programmer. So you'd end up with a dozen programmers or so per core installed, ex, you'd see 4 "USBAsp" programmer options... but only one of them would use the correct platform.txt and work).
I don't know the language that's written in, or have any idea how to debug it, and I haven't been able to get anyone who does to help out, so all I can advise is going back to 1.8.13, which is what I use for everything. Because of this bug. I don't know what supposed improvements they've been working on in 1.8.x
Notice that when it manifests it fails on all boards, not just ATTinyCore. At least that's the behavior I see with it. I don't know what causes it o what it thinks should have a major version and doesn't. The core certainly does. It's a real mystery. Wouldn't it be nice if the error message the IDE printed told you what it was that it was crashing because it couldn't determine the major version of? Since it's such a serious error that it prevents all compilation? But they don't, the problem reproduces only erratically for me, and nobody has given an explanation of what is wrong or - if it is related to my core - how I could fix it.
Closing because we cannot fix this as it is a bug in arduino.
Only advise I can give until they finally decide to care about the huge regression they introduced in 1.8.14 is to stick with 1.8.13, which thankfully fixed the bug that displayed inappropriate programming tool options. At least we got one working versinon before they took a hammer to other key functionality.
I have not been able to find any information on how this could be fixed from the core, If anyone knows. please reopen this issue and tell me!
It seems to be choking on this line:
I got the Blink sketch to build by replacing it with the following:
version=2.0.0-dev
Hi all. The bug in Arduino CLI that caused this panic has now been fixed: https://github.com/arduino/arduino-cli/pull/1830
I apologize for the inconvenience.
I have not heard any explanation of how it is triggered
I explained it to you on the forum here:
https://forum.arduino.cc/t/panic-no-major-version-found/876644
what it thinks should have a major version and doesn't
This line:
The property references were not being expanded, so it was treated as that literal string, which of course is not a valid version.
the problem reproduces only erratically for me
In addition to the condition of using the affected versions of Arduino IDE (>1.8.13, <=2.0.0-rc9.1) or Arduino CLI, the other required condition is to have manually installed the boards platform in the sketchbook folder. The Boards Manager installations don't use the version
property.
With those conditions satisfied, it should be consistently reproducible. I provided instructions for a minimal reproduction using Arduino CLI here:
https://github.com/arduino/arduino-cli/issues/1823
I have not been able to find any information on how this could be fixed from the core
As AndrioCelos explained already, the workaround is to refrain from using property references in the version
field of platform.txt
:
-version={versionnum.major}.{versionnum.minor}.{versionnum.patch}{versionnum.postfix}
+version=2.0.0-dev
I would be happy to submit a pull request for the change if you would like.
Any idea whether this is likely to be back ported to 1.8.x? given that the last hourly build was "LAST UPDATE: 24 Apr 2022, 23:52:49 GMT" I am assuming it is unlikely.
The current advice to use 1.8.13 is unfortunate given the log4j issues there.
I don't know about 1.8.x, but I can tell you that the fix for this issue, as well as the fix for the megaTinyCore issue you reported (https://github.com/SpenceKonde/megaTinyCore/issues/751), is in the Arduino IDE 2.0.0-rc9.2 release that was made just minutes ago:
https://github.com/arduino/arduino-ide/releases/tag/2.0.0-rc9.2
Please give it a try and let us know if you have any problems or suggestions for enhancements.
Awesome! I verified RC9.2 fixes both issues. Thanks for fixing these and delighted to have an RC I can recommend.
Where would you suggest sending those problems and suggestions? off the top of my head:
Happy to stick more carefully written versions of these wherever you suggest.
Where would you suggest sending those problems and suggestions?
Formal bug reports or feature requests should be submitted to the issue tracker of the appropriate repository:
Less structured feedback or general discussion should be done on the Arduino Forum:
error output is sometimes truncated or non-existent on 2.0
This is being tracked here: https://github.com/arduino/arduino-cli/issues/1818
New dark red on black for errors is far less legible than the 1.8.x color scheme
This is being tracked here: https://github.com/arduino/arduino-ide/issues/1087
clicking on compiler errors jumped to the referenced line
This is already in progress: https://github.com/arduino/arduino-ide/pull/1275
It is currently not working on Windows, and there are some other minor issues (see the comments in the PR), but it is quite usable for me on Linux. If you would like to try it out, test builds are available from the links under the "Artifacts" section of this page:
https://github.com/arduino/arduino-ide/actions/runs/2781486653#artifacts
(note that GitHub requires you to be signed in to your account in order to download workflow run artifacts)
a text based config file (.txt, .ini, .json, .xml, .dont_really_care_pick1) to configure the sketch settings.
The capability has been requested in several forms. I think the most comprehensive discussion happens to have occurred in this proposal for doing it via comments in sketches:
https://github.com/arduino/arduino-ide/issues/2438
Your metadata file approach (which is less hacky than putting the info in the sketch code) has also been proposed and receives some discussion there as well.
That is in the Arduino IDE 1.x issue tracker, but the foundation of such a feature must be done in Arduino CLI, which will make it available both for using Arduino CLI directly as well as for all the tools that use Arduino CLI under the hood (e.g., Arduino IDE, Arduino Web Editor).
A sketch.json
metadata file already exists, and provides just this capability in Arduino Web Editor and Arduino CLI:
https://arduino.github.io/arduino-cli/latest/sketch-specification/#sketchjson
A "sketch project file" was also recently added:
https://arduino.github.io/arduino-cli/dev/sketch-specification/#sketch-project-file
Arduino IDE will use the sketch.json
data if you don't have a board selected, but this is likely only a side effect of Arduino CLI's recognition of the file rather than any intentional design.
Related:
sketch-level global defines
Tracked here: https://github.com/arduino/arduino-cli/issues/159
Request for adding support for them in the sketch project file: https://github.com/arduino/tooling-rfcs/issues/9
There is a collection of links to related requests and discussions here: https://github.com/arduino/arduino-cli/issues/846 That issue also explains how it is already possible to define global macros via Arduino CLI flags, and how that capability might easily be made more universally accessible.
sketch compile and programming output randomly went to the wrong window when multiple sketches were open. I'll keep an eye out for it
I am not aware of any reports of this issue. If you are still able to reproduce it with the latest version, please do submit a report to the arduino/arduino-ide
issue tracker.
The mere presence of the library causes this error, even when compiling for a completely different board. This is on Arduino 1.8.19