NPE searchForStackTraces().length due to dir.list(filter) returning null

17 views
Skip to first unread message

nathan child

unread,
Mar 6, 2013, 9:57:32 AM3/6/13
to android-remo...@googlegroups.com
Hi,

Watch out for the NPE thrown in register(Context context) when attempting to get the length of null (returned by searchForStackTraces)

dir.list(filter) in searchForStackTraces() can return null in some circumstances (i.e. due to I/O Error, such as when ownership of the directory has changed perhaps by setting a shared user id)

An unhandled NPE being thrown by ExceptionHandler.register in the onCreate method of your activity or in your service is likely to cause your app to crash, i.e. the registering the ExceptionHandler itself may cause your app to crash - be warned...

Best regards,
Nathan CEng MEng(Hons) MIET
Reply all
Reply to author
Forward
0 new messages