Usually it works well, but sometimes it seems that "parseWeatherInfo" returns a null value.
This is the stack trace:
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
at java.util.concurrent.FutureTask.run(FutureTask.java:239)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.NullPointerException
at zh.wang.android.apis.yweathergetter4a.YahooWeather$WeatherQueryByLatLonTask.doInBackground(YahooWeather.java:441)
at zh.wang.android.apis.yweathergetter4a.YahooWeather$WeatherQueryByLatLonTask.doInBackground(YahooWeather.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
... 4 more
Thank you for your feedback. Exactly, using a null value returned from "parseWeatherInfo" causes this problem. I have fix it by arranging the parse process, and it can correctly handle a NPE now.
Usually it works well, but sometimes it seems that "parseWeatherInfo" returns a null value.
This is the stack trace: