arduino / arduino/Arduino

Library Manager sometimes throws a NullPointerException

Open
#6,292 0 comments 0 reactions 1 assignee Claimed by @cmaglie View on GitHub
Component: IDE Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

**Description**
When opening the library manager and choosing the library type from the drop-down whilst the UI was fetching available libraries, a `NullPointerException` was thrown.

Would appear to be a race condition as it cannot be replicated reliably.

**Stack Trace**

`java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onUpdatePressed$0(LibraryManagerUI.java:212)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.apple.laf.AquaListUI.repaintCell(AquaListUI.java:154)
at com.apple.laf.AquaComboBoxUI$1$1.paintSelected(AquaComboBoxUI.java:117)
at com.apple.laf.AquaUtils.blinkMenu(AquaUtils.java:243)
at com.apple.laf.AquaComboBoxUI$1.itemStateChanged(AquaComboBoxUI.java:115)
at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1223)
at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1280)
at javax.swing.JComboBox.contentsChanged(JComboBox.java:1330)
at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:118)
at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:93)
at javax.swing.DefaultComboBoxModel.addElement(DefaultComboBoxModel.java:131)
at javax.swing.JComboBox.addItem(JComboBox.java:716)
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.updateUI(LibraryManagerUI.java:166)
at processing.app.Base$8.onIndexesUpdated(Base.java:1332)
at cc.arduino.contributions.libraries.ui.LibraryManagerUI.lambda$onUpdatePressed$0(LibraryManagerUI.java:210)
... 1 more
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.