Skip to content

IDE crashes when setting invalid Additional Boards Manager URLs #11774

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
3 tasks done
thorv opened this issue Mar 20, 2022 · 5 comments
Closed
3 tasks done

IDE crashes when setting invalid Additional Boards Manager URLs #11774

thorv opened this issue Mar 20, 2022 · 5 comments
Assignees
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug

Comments

@thorv
Copy link

thorv commented Mar 20, 2022

Describe the problem

The Arduino IDE crashes at the end of the splash.

To reproduce

Set the Prefereces / Additional Boards Manager URLs to
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/
I know this is the wrong URL, but I still don't think the application should crash.

Expected behavior

I'd like to be able to reconfigure the correct URL, in this case https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json, without the program crashing.
In addition, I think it would be better if the user was notified that the URL was incorrect.

Arduino IDE version

Zip/Desktop 1.8.19

Operating system

Windows

Operating system version

11

Additional context

I confirmed that the phenomenon is reproduced even in the Windows Sandbox environment.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@PaulStoffregen
Copy link
Contributor

Confirmed, reproducible on Linux x86-64.

java.io.FileNotFoundException: /home/paul/.arduino15 (Is a directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:234)
	at cc.arduino.contributions.packages.ContributionsIndexer.mergeContributions(ContributionsIndexer.java:179)
	at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:116)
	at processing.app.BaseNoGui.initPackages(BaseNoGui.java:483)
	at processing.app.Base.<init>(Base.java:272)
	at processing.app.Base.main(Base.java:150)

@PaulStoffregen
Copy link
Contributor

But this repository is for the new/upcoming 2.0 IDE. This is a bug in Arduino 1.8.19. I'm pretty sure @per1234 will move it to the proper place.

@thorv
Copy link
Author

thorv commented Mar 20, 2022

But this repository is for the new/upcoming 2.0 IDE.

Oh, excuse me for posting to the wrong place.
Can you tell me the correct location for the issue report for version 1.8.x?

@per1234 per1234 transferred this issue from arduino/arduino-ide Mar 21, 2022
@per1234 per1234 added Type: Bug Component: Board/Lib Manager Boards Manager or Library Manager labels Mar 21, 2022
@per1234
Copy link
Collaborator

per1234 commented Mar 21, 2022

Thanks for your report @thorv and for your assistance @PaulStoffregen!

I confirm this fault is only present in Arduino IDE 1.x and so I have transferred the issue to that project's issue tracker. @thorv there is no need for you to submit an additional report, but for future reference the issue tracker for the Arduino IDE 1.x-specific reports is here:

https://github.com/arduino/Arduino/issues

I can reproduce it on Windows, with a slightly different error message from the one @PaulStoffregen shared:

java.io.FileNotFoundException: C:\Users\per\AppData\Local\Arduino15 (Access is denied)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:234)
        at cc.arduino.contributions.packages.ContributionsIndexer.mergeContributions(ContributionsIndexer.java:179)
        at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:116)
        at processing.app.BaseNoGui.initPackages(BaseNoGui.java:483)
        at processing.app.Base.<init>(Base.java:272)
        at processing.app.Base.main(Base.java:150)

@per1234
Copy link
Collaborator

per1234 commented Sep 24, 2022

As mentioned above, this bug only affects Arduino IDE 1.x, so is considered resolved by the release of Arduino IDE 2.0.0.

Note that there is a somewhat similar bug in Arduino IDE 2.x, which does not occur with the specific URL shared here, but does occur with invalid URLs that have a valid file name. That bug already has a dedicated issue with specific details so it is effectively tracked there: arduino/arduino-ide#1084

@per1234 per1234 closed this as completed Sep 24, 2022
@per1234 per1234 self-assigned this Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants