Skip to content

Corrupted library_index.json prevents IDE from starting #7937

Closed
@PaulStoffregen

Description

@PaulStoffregen

If library_index.json becomes corrupted, the IDE can't start up and throws a NullPointerException.

Error parsing library.index:Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: (FileInputStream); line: 1, column: 2]
java.lang.NullPointerException
        at cc.arduino.contributions.libraries.LibrariesIndexer.rescanLibraries(LibrariesIndexer.java:140)
        at cc.arduino.contributions.libraries.LibrariesIndexer.setLibrariesFolders(LibrariesIndexer.java:109)
        at processing.app.BaseNoGui.onBoardOrPortChange(BaseNoGui.java:715)
        at processing.app.Base.onBoardOrPortChange(Base.java:1313)
        at processing.app.Base$12.actionPerformed(Base.java:1540)
        at processing.app.Base.filterVisibilityOfSubsequentBoardMenus(Base.java:1579)
        at processing.app.Base.access$000(Base.java:83)
        at processing.app.Base$11.actionPerformed(Base.java:1512)
        at processing.app.Base.rebuildBoardsMenu(Base.java:1490)
        at processing.app.Base.<init>(Base.java:267)
        at processing.app.Base.main(Base.java:145)

To reproduce this problem, just edit ~/.arduino15/library_index.json (or similar location on Mac & Windows) and change the first character from '{' to '<'. Restart the IDE will give the NullPointerException.

This problem came today for a user on the forum.

https://forum.arduino.cc/index.php?topic=565681

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions