Skip to content

Arduino Environment exists before it's initialized #10340

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
leonbrag opened this issue Jun 10, 2020 · 4 comments
Closed

Arduino Environment exists before it's initialized #10340

leonbrag opened this issue Jun 10, 2020 · 4 comments
Labels
Component: Board/Lib Manager Boards Manager or Library Manager Component: IDE The Arduino IDE Type: Bug Type: Duplicate Another item already exists for this topic

Comments

@leonbrag
Copy link

Version: 1.8.12

:\Program Files (x86)\Arduino>arduino_debug.exe
Set log4j store directory C:\Users\leonb\AppData\Local\Arduino15
Loading configuration...
Initializing packages...
java.lang.NullPointerException
at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:134)
at processing.app.BaseNoGui.initPackages(BaseNoGui.java:483)
at processing.app.Base.(Base.java:273)
at processing.app.Base.main(Base.java:150)

Seems like this issue: #3248

It worked for weeks. Suddenly it stopped.

@imrehorvath
Copy link

imrehorvath commented Jun 10, 2020

+1

Opening the Board Manager and having the packages updated seems to trigger this issue. After this, the problem seems to be permanent.

java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$1(ContributionManagerUI.java:150)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:134)
at processing.app.BaseNoGui.initPackages(BaseNoGui.java:483)
at processing.app.Base$9.onIndexesUpdated(Base.java:1400)
at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$1(ContributionManagerUI.java:148)
... 1 more
java.lang.NullPointerException
at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:134)
at processing.app.BaseNoGui.initPackages(BaseNoGui.java:483)
at processing.app.Base.openBoardsManager(Base.java:1418)
at processing.app.Base$10.actionPerformed(Base.java:1441)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:125)
at java.awt.MenuItem.processActionEvent(MenuItem.java:669)
at java.awt.MenuItem.processEvent(MenuItem.java:628)
at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:357)
at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:345)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:763)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

@glkada
Copy link

glkada commented Jun 10, 2020

My Arduino IDE too shows the same problem. It crashes as soon as I launch it. Tried reinstalling it but doesn't help
image

@leonbrag
Copy link
Author

Un-installed, Re-install did NOT resolve the problem.

As a fix I have installed Windows Store app. Store app works.

@cmaglie
Copy link
Member

cmaglie commented Jun 10, 2020

We had a problem on our package_index.json that caused the error and prevented the IDE to start.
Now the package_index has been fixed, but to recover a working installation you must delete once again the package_index.json with the cache folder and restart the IDE as usual.

Windows:

  • remove file C:\Users\YourUsername\AppData\Local\Arduino15\package_index.json
  • remove folder C:\Users\YourUsername\AppData\Local\Arduino15\cache

Mac:

  • remove file /Users/YourUsername/Library/Arduino15/package_index.json
  • remove folder /Users/YourUsername/Library/Arduino15/cache

Linux:

  • remove file /home/YourUsername/.arduino15/package_index.json
  • remove folder /home/YourUsername/.arduino15/cache

Please note that the problem that prevents the IDE to start has already been fixed and it's ready for the next release, that's the reason why the Nightly/Beta Builds are not affected, and also the reason why we did not detect this problem earlier, sorry about that!

@cmaglie cmaglie closed this as completed Jun 10, 2020
@per1234 per1234 added the Type: Duplicate Another item already exists for this topic label Jun 12, 2020
@per1234 per1234 added Component: Board/Lib Manager Boards Manager or Library Manager Component: IDE The Arduino IDE Type: Bug labels Dec 24, 2020
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 Component: IDE The Arduino IDE Type: Bug Type: Duplicate Another item already exists for this topic
Projects
None yet
Development

No branches or pull requests

5 participants