murat8505 / android-xbmcremote

Automatically exported from code.google.com/p/android-xbmcremote
0 stars 0 forks source link

Force-close on startup in rev 166 #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build latest svn
2. Install onto HTC Magic
3. Start app

Expect app to start up, and point the user to the settings dialog, if no 
valid settings are detected.
App force-closes on startup

Testing svn rev 166 on HTC Magic

Narrowed it down to an NPE in Connection.java.
debug output from adb:
-----
I/ActivityManager(   50): Starting activity: Intent { 
action=android.intent.action.MAIN flags=0x10100000 
comp={org.xbmc.android.remote/org.xbmc.android.remote.activity.HomeActivity
} }
I/ActivityManager(   50): Start proc org.xbmc.android.remote for activity 
org.xbmc.android.remote/.activity.HomeActivity: pid=19289 uid=10031 
gids={3003}
W/InputManagerService(   50): Window already focused, ignoring focus gain 
of: com.android.internal.view.IInputMethodClient$Stub$Proxy@438b3f28
I/dalvikvm(19289): Debugger thread not active, ignoring DDM send 
(t=0x41504e4d l=38)
I/dalvikvm(19289): Debugger thread not active, ignoring DDM send 
(t=0x41504e4d l=50)
W/dalvikvm(19289): threadid=13: thread exiting with uncaught exception 
(group=0x4000fe70)
E/AndroidRuntime(19289): Uncaught handler: thread HTTP API Connection 
Thread exiting due to uncaught exception
E/AndroidRuntime(19289): java.lang.NullPointerException
E/AndroidRuntime(19289):    at 
org.xbmc.httpapi.Connection.query(Connection.java:149)
E/AndroidRuntime(19289):    at 
org.xbmc.httpapi.Connection.getString(Connection.java:167)
E/AndroidRuntime(19289):    at 
org.xbmc.httpapi.client.InfoClient.getSystemInfo(InfoClient.java:93)
E/AndroidRuntime(19289):    at 
org.xbmc.android.backend.httpapi.InfoWrapper$1.run(InfoWrapper.java:46)
E/AndroidRuntime(19289):    at 
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(19289):    at 
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(19289):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(19289):    at 
org.xbmc.android.backend.httpapi.HttpApiThread.run(HttpApiThread.java:69)
I/Process (   50): Sending signal. PID: 19289 SIG: 3
I/dalvikvm(19289): threadid=7: reacting to signal 3
I/dalvikvm(19289): Wrote stack trace to '/data/anr/traces.txt'
I/ActivityManager(   50): Displayed activity 
org.xbmc.android.remote/.activity.HomeActivity: 941 ms
D/dalvikvm(15087): GC freed 10756 objects / 549792 bytes in 159ms
D/dalvikvm(14971): GC freed 7987 objects / 437544 bytes in 167ms
D/dalvikvm(18027): GC freed 620 objects / 39232 bytes in 132ms
I/Process (19289): Sending signal. PID: 19289 SIG: 9
-----

Added NPE check in existing try/catch hierarchy to fix the problem. Please 
see attached diff.

:O) Mikkle

Original issue reported on code.google.com by mukkenb...@gmail.com on 11 Oct 2009 at 11:17

Attachments:

GoogleCodeExporter commented 9 years ago
I think that's your code, Till. :)

Original comment by phree...@gmail.com on 12 Oct 2009 at 8:40

GoogleCodeExporter commented 9 years ago
yep it is. already applied the patch :)
Thanks mukkenborg!

Original comment by till.ess...@googlemail.com on 12 Oct 2009 at 8:43