mattshobe / flightmap

Automatically exported from code.google.com/p/flightmap
Apache License 2.0
0 stars 0 forks source link

Application crash when unable to connect to download site #128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On my emulator which may have a network connectivity problem. No aviation.db 
exists on /sdcard.
2. Start app, agree to disclaimer.
3. Crash with the following stack trace. Some extra log output is included.

12-07 11:15:51.169: WARN/System.err(304): java.net.UnknownHostException: Host 
is unresolved: sites.google.com:80
12-07 11:15:51.209: WARN/System.err(304):     at 
java.net.Socket.connect(Socket.java:1037)
12-07 11:15:51.279: WARN/System.err(304):     at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(Htt
pConnection.java:62)
12-07 11:15:51.300: WARN/System.err(304):     at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager$Con
nectionPool.getHttpConnection(HttpConnectionManager.java:145)
12-07 11:15:51.340: WARN/System.err(304):     at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionManager.get
Connection(HttpConnectionManager.java:67)
12-07 11:15:51.360: WARN/System.err(304):     at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getHTTP
Connection(HttpURLConnection.java:821)
12-07 11:15:51.390: WARN/System.err(304):     at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.connect
(HttpURLConnection.java:807)
12-07 11:15:51.410: WARN/System.err(304):     at 
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInpu
tStream(HttpURLConnection.java:1051)
12-07 11:15:51.450: WARN/System.err(304):     at 
com.google.flightmap.common.net.FileDownload.download(FileDownload.java:52)
12-07 11:15:51.480: WARN/System.err(304):     at 
com.google.flightmap.common.net.FileUpdater.doUpdate(FileUpdater.java:157)
12-07 11:15:51.480: WARN/System.err(304):     at 
com.google.flightmap.common.net.FileUpdater.update(FileUpdater.java:126)
12-07 11:15:51.610: WARN/System.err(304):     at 
com.google.flightmap.android.DbUpdaterTask.doInBackground(DbUpdaterTask.java:47)
12-07 11:15:51.620: WARN/System.err(304):     at 
com.google.flightmap.android.DbUpdaterTask.doInBackground(DbUpdaterTask.java:1)
12-07 11:15:51.669: WARN/System.err(304):     at 
android.os.AsyncTask$2.call(AsyncTask.java:185)
12-07 11:15:51.730: WARN/System.err(304):     at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
12-07 11:15:51.789: WARN/System.err(304):     at 
java.util.concurrent.FutureTask.run(FutureTask.java:137)
12-07 11:15:51.799: WARN/System.err(304):     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
12-07 11:15:51.809: WARN/System.err(304):     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
12-07 11:15:51.809: WARN/System.err(304):     at 
java.lang.Thread.run(Thread.java:1096)
12-07 11:15:51.889: INFO/MainActivity(304): Download completed.  Success: false
12-07 11:15:52.089: ERROR/MainActivity(304): Download failed
12-07 11:15:52.129: ERROR/Database(304): 
sqlite3_open_v2("/sdcard/com.google.flightmap/aviation.db", &handle, 1, NULL) 
failed
12-07 11:15:52.179: DEBUG/AndroidRuntime(304): Shutting down VM
12-07 11:15:52.189: WARN/dalvikvm(304): threadid=3: thread exiting with 
uncaught exception (group=0x4001b188)
12-07 11:15:52.199: ERROR/AndroidRuntime(304): Uncaught handler: thread main 
exiting due to uncaught exception
12-07 11:15:52.340: ERROR/AndroidRuntime(304): 
android.database.sqlite.SQLiteException: unable to open database file
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1698)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:739)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.android.AndroidAviationDbAdapter.open(AndroidAviationDbAdap
ter.java:130)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.common.CachedAviationDbAdapter.open(CachedAviationDbAdapter
.java:44)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.common.CustomGridAirportDirectory.open(CustomGridAirportDir
ectory.java:46)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.common.CachedAirportDirectory.open(CachedAirportDirectory.j
ava:139)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.android.MainActivity.initializeApplication(MainActivity.jav
a:244)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.android.MainActivity.downloadDatabaseDone(MainActivity.java
:235)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.android.MainActivity.access$3(MainActivity.java:233)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.android.MainActivity$3.hasCompleted(MainActivity.java:212)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.android.DbUpdaterTask.onPostExecute(DbUpdaterTask.java:75)
12-07 11:15:52.340: ERROR/AndroidRuntime(304):     at 
com.google.flightmap.android.DbUpdaterTask.onPostExecute(DbUpdaterTask.java:1)

Original issue reported on code.google.com by ph...@google.com on 7 Dec 2010 at 7:19

GoogleCodeExporter commented 9 years ago
Confirmed my emulator was unable to connect to anything on the internet. Could 
probably reproduce this by doing the following steps:
1. Remove /sdcard/com.google.flightmap
2. Put emulator into airplane mode
3. Launch app.

Original comment by ph...@google.com on 7 Dec 2010 at 7:23