-
Notifications
You must be signed in to change notification settings - Fork 14
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
postCachedMethods does not handle null return value from File.listFiles() #62
Comments
Hey @DanFTRX - Thanks for that report, I'll have a look at a fix later today. Out of curiousity - may I ask in which scenario(s) that occurred for you? And were you using the v4 final or are you on the older 3.0.6 release? |
@TheRealAgentK I was on the older 3.0.6 release, however the code in question did not change between the two versions(aside from moving from RaygunClient to CrashReporting) As for the scenario, it occured when sending up an exception. Unfortuanently I do not have reproduction steps. |
@DanFTRX Yeah, I saw this is code from 3.0.x and would show the same behaviour. Bugger you don't have a repro. Will have a bit of a deeper look in which scenarios building that path could fail. Did you see it on any particular devices or Android versions? |
This is the environment section of the raygun report:
This is the relevant part of the StackTrace:
Oh and as a bonus, now that I am looking at my report again, I notice that the OS had too many open files at the time. So I would guess that the reproduction steps is to induce that state again. I send my logcat up with Raygun reports and it got this:
And as File.listFiles() is documented as returning null on IOExceptions, this tracks as being the cause. |
…efore looping over files, this is a fix for MindscapeHQ#62 (where the OP reported they saw it with the device open files being exhausted).
Thx @DanFTRX, this is fixed in my dev build and will go out to a 4.0.1 release in the next few days. |
https://github.com/MindscapeHQ/raygun4android/blob/master/provider/src/main/java/com/raygun/raygun4android/CrashReporting.java#L165
https://docs.oracle.com/javase/7/docs/api/java/io/File.html#listFiles()
listFiles() can return null in some cases and raygun errors on it rather than handling gracefully.
The text was updated successfully, but these errors were encountered: