Kernald/buildbot-watcher — Issue #10: Crash when network is lost
Author: Kernald
Created: 2012-02-27 13:34:41+00:00
State: open

When the first activity is fully loaded then the network is lost, every network request will make a crash. Example loading BuilderActivity:

```
E/AndroidRuntime(18717): FATAL EXCEPTION: main
E/AndroidRuntime(18717): java.lang.NullPointerException
E/AndroidRuntime(18717):	at com.buildbotwatcher.BuilderActivity$BuildsAdapter.getView(BuilderActivity.java:249)
E/AndroidRuntime(18717):	at android.widget.HeaderViewListAdapter.getView(HeaderViewListAdapter.java:220)
E/AndroidRuntime(18717):	at android.widget.AbsListView.obtainView(AbsListView.java:2046)
E/AndroidRuntime(18717):	at android.widget.ListView.makeAndAddView(ListView.java:1820)
E/AndroidRuntime(18717):	at android.widget.ListView.fillDown(ListView.java:672)
E/AndroidRuntime(18717):	at android.widget.ListView.fillFromTop(ListView.java:732)
E/AndroidRuntime(18717):	at android.widget.ListView.layoutChildren(ListView.java:1659)
E/AndroidRuntime(18717):	at android.widget.AbsListView.onLayout(AbsListView.java:1876)
E/AndroidRuntime(18717):	at android.view.View.layout(View.java:11432)
E/AndroidRuntime(18717):	at android.view.ViewGroup.layout(ViewGroup.java:4232)
E/AndroidRuntime(18717):	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
E/AndroidRuntime(18717):	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
E/AndroidRuntime(18717):	at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
E/AndroidRuntime(18717):	at android.view.View.layout(View.java:11432)
E/AndroidRuntime(18717):	at android.view.ViewGroup.layout(ViewGroup.java:4232)
E/AndroidRuntime(18717):	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
E/AndroidRuntime(18717):	at android.view.View.layout(View.java:11432)
E/AndroidRuntime(18717):	at android.view.ViewGroup.layout(ViewGroup.java:4232)
E/AndroidRuntime(18717):	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1628)
E/AndroidRuntime(18717):	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1486)
E/AndroidRuntime(18717):	at android.widget.LinearLayout.onLayout(LinearLayout.java:1399)
E/AndroidRuntime(18717):	at android.view.View.layout(View.java:11432)
E/AndroidRuntime(18717):	at android.view.ViewGroup.layout(ViewGroup.java:4232)
E/AndroidRuntime(18717):	at android.widget.FrameLayout.onLayout(FrameLayout.java:431)
E/AndroidRuntime(18717):	at android.view.View.layout(View.java:11432)
E/AndroidRuntime(18717):	at android.view.ViewGroup.layout(ViewGroup.java:4232)
E/AndroidRuntime(18717):	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1509)
E/AndroidRuntime(18717):	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2498)
E/AndroidRuntime(18717):	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(18717):	at android.os.Looper.loop(Looper.java:154)
E/AndroidRuntime(18717):	at android.app.ActivityThread.main(ActivityThread.java:4894)
E/AndroidRuntime(18717):	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(18717):	at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(18717):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime(18717):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime(18717):	at dalvik.system.NativeStart.main(Native Method)
E/EmbeddedLogger( 238): App crashed! Process: com.buildbotwatcher
E/EmbeddedLogger( 238): App crashed! Package: com.buildbotwatcher v15 (1.0.2)
E/EmbeddedLogger( 238): Application Label: Buildbot Watcher
```