jianlinwei / connectbot

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

SQLiteException right at app start #408

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed app from market
2. tapped on app to start

What is the expected output? What do you see instead?
Force close dialog box.

What version of the product are you using (you can see this by using Menu
-> About in the Host List)?
I can't even get this far.  App crashes before even opening.  Got following 
from crash report:  pkg ver: 323, name: 1.7.1

What type of system are you trying to connect to?
App crashes at startup

If you are able to connect, what is the output of "echo $TERM", "uname -a",
and any other relevant information on the host?

Please provide any additional information below.
Verizon HTC Incredible, rooted.  SDK ver: 8, rel: 2.2.

Original issue reported on code.google.com by jacomoma...@gmail.com on 22 Dec 2010 at 11:14

GoogleCodeExporter commented 9 years ago
Excerpt from logcat command:

E/PackageManager(   97): Package org.connectbot has mismatched uid: 10067 on 
disk, 10064 in settings
I/ActivityManager(   97): Force stopping package org.connectbot uid=10064
W/ActivityManager(   97): Permission Denial: broadcasting Intent { 
act=android.server.checkin.FOTA_CANCEL } from com.google.android.gsf (pid=273, 
uid=10002) requires android.permission.HTC_FOTA_UPDATE due to registered 
receiver BroadcastFilter{45e82358 ReceiverList{45e847f0 97 system/1000 
local:45daa3b0}}
V/AlarmManager(   97): Adding Alarm{45fca9c0 type 0 com.google.android.gsf} Dec 
23 02:37:25 am
I/ActivityManager(   97): Starting activity: Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.HOME] 
flg=0x10200000 cmp=com.htc.launcher/.Launcher }
V/StatusBarPolicy(   97): cdmaLevel:2
D/StatusBarPolicy(   97): iconLevel:2
I/ActivityManager(   97): Starting activity: Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
flg=0x10200000 cmp=org.connectbot/.HostListActivity }
I/ActivityManager(   97): Start proc org.connectbot for activity 
org.connectbot/.HostListActivity: pid=1082 uid=10064 gids={3003, 1015}
I/ActivityManager(   97): Starting activity: Intent { 
cmp=org.connectbot/.WizardActivity }
E/AndroidRuntime( 1082): FATAL EXCEPTION: main
E/AndroidRuntime( 1082): java.lang.RuntimeException: Unable to start activity 
ComponentInfo{org.connectbot/org.connectbot.HostListActivity}: 
android.database.sqlite.SQLiteException: unable to open database file
E/AndroidRuntime( 1082):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
E/AndroidRuntime( 1082):    at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
E/AndroidRuntime( 1082):    at 
android.app.ActivityThread.access$2300(ActivityThread.java:135)
E/AndroidRuntime( 1082):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
E/AndroidRuntime( 1082):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1082):    at android.os.Looper.loop(Looper.java:144)
E/AndroidRuntime( 1082):    at 
android.app.ActivityThread.main(ActivityThread.java:4937)
E/AndroidRuntime( 1082):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime( 1082):    at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 1082):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 1082):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 1082):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1082): Caused by: android.database.sqlite.SQLiteException: 
unable to open database file
E/AndroidRuntime( 1082):    at 
android.database.sqlite.SQLiteDatabase.dbopen(Native Method)
E/AndroidRuntime( 1082):    at 
android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1899)
E/AndroidRuntime( 1082):    at 
android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:881)
E/AndroidRuntime( 1082):    at 
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
915)
E/AndroidRuntime( 1082):    at 
android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:
908)
E/AndroidRuntime( 1082):    at 
android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:551)
E/AndroidRuntime( 1082):    at 
android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203)
E/AndroidRuntime( 1082):    at 
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.ja
va:98)
E/AndroidRuntime( 1082):    at 
org.connectbot.util.HostDatabase.<init>(HostDatabase.java:142)
E/AndroidRuntime( 1082):    at 
org.connectbot.HostListActivity.onCreate(HostListActivity.java:185)
E/AndroidRuntime( 1082):    at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
E/AndroidRuntime( 1082):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
E/AndroidRuntime( 1082):    ... 11 more

Original comment by jacomoma...@gmail.com on 23 Dec 2010 at 12:00

GoogleCodeExporter commented 9 years ago
After seeing the above exception details in the log, went to Manage 
Applications and cleared app's cache and data.  Attempted to restart app and 
got a NullPointerException:

I/ActivityManager(   97): Starting activity: Intent { 
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] 
flg=0x10200000 cmp=org.connectbot/.HostListActivity }
I/ActivityManager(   97): Start proc org.connectbot for activity 
org.connectbot/.HostListActivity: pid=3383 uid=10064 gids={3003, 1015}
D/AK8973  (   75): Compass Start
D/Sensors (   97): open_akm, fd=153
D/PowerManagerService(   97): New lightsensor value:40, lcdValue:70
I/com.nullwire.trace.ExceptionsHandler( 3383): Registering default exceptions 
handler
W/ApplicationContext( 3383): Unable to create files directory
D/AndroidRuntime( 3383): Shutting down VM
W/dalvikvm( 3383): threadid=1: thread exiting with uncaught exception 
(group=0x400259f8)
E/AndroidRuntime( 3383): FATAL EXCEPTION: main
E/AndroidRuntime( 3383): java.lang.RuntimeException: Unable to start activity 
ComponentInfo{org.connectbot/org.connectbot.HostListActivity}: 
java.lang.NullPointerException
E/AndroidRuntime( 3383):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
E/AndroidRuntime( 3383):    at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
E/AndroidRuntime( 3383):    at 
android.app.ActivityThread.access$2300(ActivityThread.java:135)
E/AndroidRuntime( 3383):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
E/AndroidRuntime( 3383):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3383):    at android.os.Looper.loop(Looper.java:144)
E/AndroidRuntime( 3383):    at 
android.app.ActivityThread.main(ActivityThread.java:4937)
E/AndroidRuntime( 3383):    at java.lang.reflect.Method.invokeNative(Native 
Method)
E/AndroidRuntime( 3383):    at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 3383):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 3383):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 3383):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 3383): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 3383):    at 
com.nullwire.trace.ExceptionHandler.register(ExceptionHandler.java:69)
E/AndroidRuntime( 3383):    at 
org.connectbot.HostListActivity.onCreate(HostListActivity.java:168)
E/AndroidRuntime( 3383):    at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
E/AndroidRuntime( 3383):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
E/AndroidRuntime( 3383):    ... 11 more
W/ActivityManager(   97):   Force finishing activity 
org.connectbot/.HostListActivity

Original comment by jacomoma...@gmail.com on 23 Dec 2010 at 12:07

GoogleCodeExporter commented 9 years ago
Ok, so this may technically still be considered a bug, but now I know it's a 
rare corner-case.

It's because I rooted my phone (UnrEVOked 3) and after that although all my 
previously installed apps were gone, all their data & cache on my sdcard were 
still there.  All I had to do was go into manage applications, clear cache and 
data, uninstall the app, and re-install.  After this all is good and ConnectBot 
works fine.

I had this same problem with a couple of other apps that I had running just 
fine before I rooted my phone.  Doing the same procedure for them also solved 
their issues.

Sorry for the false alarm.

-Jac

Original comment by jacomoma...@gmail.com on 23 Dec 2010 at 3:59