TheBurrd / androidClient

Android client for The Burrd, a happy hour app
MIT License
3 stars 2 forks source link

App crash when Wifi is off #44

Closed patelanjali closed 9 years ago

patelanjali commented 9 years ago

When we click on any functionality, app crash when the wifi is off

t1miller commented 9 years ago

Is this a Wifi issue or an internet connection issue? Can someone who has a android device with a cellular connection test this?

AdamDorwart commented 9 years ago

I'm unable to replicate but your not the first person to mention a bug with WiFi. I think it's caused by poor error handling for the Parse Queries.

t1miller commented 9 years ago

I was able to write a dialog box that enables the user to turn on the wifi if it is turned off but i feel this is just a bandaid to bigger problem.

daleebz commented 9 years ago

I haven't had too many problems to be honest with cellular connections

On Fri, Jul 3, 2015, 8:47 AM t1miller notifications@github.com wrote:

I was able to write a dialog box that enables the user to turn on the wifi if it is turned off but i feel this is just a bandaid to bigger problem.

— Reply to this email directly or view it on GitHub https://github.com/DoingGaryAFavor/androidClient/issues/44#issuecomment-118378727 .

t1miller commented 9 years ago

I opened up the debugger and ran the app without wifi. This is the culprit. Maybe Adam can take a look because of his knowledge of the database stuff.

java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference at com.dgaf.happyhour.Adapter.DealListAdapter$1.done(DealListAdapter.java:146) at com.dgaf.happyhour.Adapter.DealListAdapter$1.done(DealListAdapter.java:144) at com.parse.Parse$6$1.run(Parse.java:944)

AdamDorwart commented 9 years ago

Alright I've been able to replicate this bug by turning on Airplane mode on my device. It is caused by the Parse Query returning an exception but some logcat debugging code still trying to read the result.

AdamDorwart commented 9 years ago

Pull request with fix is at #62

@t1miller or @patelanjali , could you pull this branch and verify it solves the issue?