Getting the following runtime error, causing my application to crash on launch
E FATAL EXCEPTION: MonitoringThread 13533 AndroidRuntime E Process: foo.com, PID: 13533 13533 AndroidRuntime E java.lang.NullPointerException 13533 AndroidRuntime E at foo.com$MonitoringThread.run(foo.java:125) 13533
AndroidRuntime E at java.lang.Thread.run(Thread.java:841)
The offending line is
ret = mConnection.getInputStream().read(buffer);
in the following code snippet
try {
ret = mConnection.getInputStream().read(buffer);
} catch (IOException e) {
break;
}
Can anyone suggest next steps in trying to debug? I thought that use of a try catch block would eliminate any null pointer errors.
mConnection?mConnectioninitialized?