Skip to content

Permissions/IO errors can cause nullpointerexception #1160

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
rfmerrill opened this issue Dec 10, 2012 · 2 comments
Closed

Permissions/IO errors can cause nullpointerexception #1160

rfmerrill opened this issue Dec 10, 2012 · 2 comments
Labels
Component: IDE The Arduino IDE

Comments

@rfmerrill
Copy link

starting at line 1223 in app/Base.java, addLibraries calls Compiler.headerListFromIncludePath

It then immediately uses the returned value without checking for null first.

Compiler.headerListFromIncludePath returns the return value of File.list(), which can return null if an IO error occurs.

This results in nullpointerexception if said directory has permissions that don't allow you to list() it.

ffissore pushed a commit that referenced this issue Dec 12, 2012
@ghost ghost assigned ffissore Dec 12, 2012
ffissore pushed a commit that referenced this issue Dec 12, 2012
@ffissore
Copy link
Contributor

Hello @rfmerrill I've pushed the fix to branch https://github.com/arduino/Arduino/tree/master-issue1160 (ide version 1.0.x) and to branch https://github.com/arduino/Arduino/tree/ide-1.5.x-issue1160 (ide version 1.5.x)

Can you test one and report back if the IDE is showing an error message or if it keeps on crashing?

@rfmerrill
Copy link
Author

Unfortunately I just tracked the error down, I wasn't the one experiencing it. I could try and find the time to test it, but it might be a while.

cmaglie added a commit that referenced this issue Dec 27, 2012
Fixes #1160
Merge remote-tracking branch 'arduino/ide-1.5.x-issue1160' into ide-1.5.x
oriregev pushed a commit to oriregev/Arduino that referenced this issue Dec 20, 2013
oriregev pushed a commit to oriregev/Arduino that referenced this issue Dec 20, 2013
Fixes arduino#1160

Merge remote-tracking branch 'arduino/master-issue1160'
@cmaglie cmaglie removed the Waiting for feedback More information must be provided before we can proceed label Oct 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE The Arduino IDE
Projects
None yet
Development

No branches or pull requests

3 participants