Closed ronasimi closed 10 years ago
Can you please post logcat of let's say 10 lines before the exception? Also I'd need to know which XBMC version you're running.
XBMC is 12.2 on openelec.
02-18 10:51:37.672 17578-17578/org.xbmc.android.remotesandbox I/PullToRefreshAttacher﹕ Given null options so using default options.
02-18 10:51:37.692 17578-17578/org.xbmc.android.remotesandbox W/Resources﹕ Converting to string: TypedValue{t=0x4/d=0x3f800000 a=2 r=0x7f0b00b7}
02-18 10:51:37.702 17578-17578/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_launch_request id:org.xbmc.android.remotesandbox time:36537112
02-18 10:51:37.752 17578-17604/org.xbmc.android.remotesandbox V/AudioProvider﹕ query(uri=content://org.xbmc.android.jsonrpc.audio/albums, proj=[albums._id, album_id, album_title, album_year, artist_title, album_thumbnail])
02-18 10:51:38.083 17578-17578/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 10:51:38.083 17578-17578/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 10:51:38.083 17578-17578/org.xbmc.android.remotesandbox I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM Build: Iabe52cfaeae4c5fab1acacfe6f056ba15fa93274
02-18 10:51:38.083 17578-17578/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 10:51:38.093 17578-17578/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 10:51:38.133 17578-17578/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 10:51:38.133 17578-17578/org.xbmc.android.remotesandbox D/OpenGLRenderer﹕ Enabling debug mode 0
02-18 10:51:38.133 17578-17578/org.xbmc.android.remotesandbox W/ViewRootImpl﹕ Dropping event due to no window focus: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_BACK, scanCode=158, metaState=0, flags=0x48, repeatCount=0, eventTime=36536620, downTime=36536620, deviceId=5, source=0x101 }
02-18 10:51:38.363 17578-17578/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_idle id: android.os.BinderProxy@41e083a0 time:36537787
02-18 10:51:38.363 17578-17578/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_idle id: android.os.BinderProxy@41a2f230 time:36537787
02-18 10:51:41.015 17578-17578/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_launch_request id:org.xbmc.android.remotesandbox time:36540434
02-18 10:51:41.106 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step1WelcomeFragment from cache.
02-18 10:51:41.106 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step1WelcomeFragment manually.
02-18 10:51:41.126 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step2aSearchingFragment from cache.
02-18 10:51:41.126 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step2aSearchingFragment manually.
02-18 10:51:41.276 17578-17578/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_idle id: android.os.BinderProxy@41e55bb0 time:36540697
02-18 10:51:42.267 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step2aSearchingFragment from cache.
02-18 10:51:42.267 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step2aSearchingFragment manually.
02-18 10:51:42.517 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step2aSearchingFragment from cache.
02-18 10:51:42.557 17578-17649/org.xbmc.android.remotesandbox I/DiscoveryService﹕ Discovering XBMC hosts through 192.168.1.114...
02-18 10:51:42.557 17578-17649/org.xbmc.android.remotesandbox D/DiscoveryService﹕ Multicast lock acquired.
02-18 10:51:43.578 17578-17649/org.xbmc.android.remotesandbox D/DiscoveryService﹕ Multicast lock released.
02-18 10:51:43.588 17578-17578/org.xbmc.android.remotesandbox D/Step2aSearchingFragment﹕ Got event from bus: Finished.
02-18 10:51:43.588 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step2bNothingFoundFragment from cache.
02-18 10:51:43.588 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step2bNothingFoundFragment manually.
02-18 10:51:43.838 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step2bNothingFoundFragment from cache.
02-18 10:51:45.470 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step4AllDoneFragment from cache.
02-18 10:51:45.470 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step4AllDoneFragment manually.
02-18 10:51:45.520 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step2aSearchingFragment from cache.
02-18 10:51:45.520 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step2aSearchingFragment manually.
02-18 10:52:12.586 17578-17962/org.xbmc.android.remotesandbox I/JsonApiRequest﹕ POST request: http://192.168.1.111:3737/jsonrpc
02-18 10:52:12.586 17578-17962/org.xbmc.android.remotesandbox I/JsonApiRequest﹕ POST entity:{"jsonrpc":"2.0","id":"-3995426411096390906","method":"JSONRPC.Ping"}
02-18 10:52:12.606 17578-17962/org.xbmc.android.remotesandbox E/ApiException﹕ Server says "401 Unauthorized".
org.xbmc.android.jsonrpc.io.ApiException: Server says "401 Unauthorized".
at org.xbmc.android.jsonrpc.io.JsonApiRequest.postRequest(JsonApiRequest.java:141)
at org.xbmc.android.jsonrpc.io.JsonApiRequest.execute(JsonApiRequest.java:68)
at org.xbmc.android.jsonrpc.io.ConnectionManager$1.run(ConnectionManager.java:193)
at java.lang.Thread.run(Thread.java:841)
02-18 10:52:21.955 17578-18035/org.xbmc.android.remotesandbox I/JsonApiRequest﹕ POST request: http://192.168.1.111:3737/jsonrpc
02-18 10:52:21.955 17578-18035/org.xbmc.android.remotesandbox I/JsonApiRequest﹕ POST entity:{"jsonrpc":"2.0","id":"-3995426411096390906","method":"JSONRPC.Ping"}
02-18 10:52:21.965 17578-18035/org.xbmc.android.remotesandbox I/JsonApiRequest﹕ POST response: {"id":"-3995426411096390906","jsonrpc":"2.0","result":"pong"}
02-18 10:52:23.927 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step2aSearchingFragment from cache.
02-18 10:52:23.927 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step2aSearchingFragment manually.
02-18 10:52:23.937 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step4AllDoneFragment from cache.
02-18 10:52:23.937 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step4AllDoneFragment manually.
02-18 10:52:24.228 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step4AllDoneFragment from cache.
02-18 10:52:24.248 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Getting fragment Step1WelcomeFragment from cache.
02-18 10:52:24.248 17578-17578/org.xbmc.android.remotesandbox D/FragmentStateManager﹕ Nothing found, instantiating Step1WelcomeFragment manually.
02-18 10:52:24.248 17578-17578/org.xbmc.android.remotesandbox I/Step4AllDoneFragment﹕ Addding host "192.168.1.111 - 192.168.1.111:3737" to account manager.
02-18 10:52:24.528 17578-17589/org.xbmc.android.remotesandbox W/Binder﹕ Caught a RuntimeException from the binder stub implementation.
java.lang.SecurityException: no permission to read the sync settings: Neither user 10096 nor current process has android.permission.READ_SYNC_SETTINGS.
at android.os.Parcel.readException(Parcel.java:1465)
at android.os.Parcel.readException(Parcel.java:1419)
at android.content.IContentService$Stub$Proxy.getIsSyncable(IContentService.java:748)
at android.content.ContentResolver.getIsSyncable(ContentResolver.java:1978)
at android.content.AbstractThreadedSyncAdapter$ISyncAdapterImpl.startSync(AbstractThreadedSyncAdapter.java:165)
at android.content.ISyncAdapter$Stub.onTransact(ISyncAdapter.java:70)
at android.os.Binder.execTransact(Binder.java:404)
at dalvik.system.NativeStart.run(Native Method)
02-18 10:52:25.499 17578-17578/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_launch_request id:org.xbmc.android.remotesandbox time:36584912
02-18 10:52:25.669 17578-17578/org.xbmc.android.remotesandbox I/PullToRefreshAttacher﹕ Given null options so using default options.
02-18 10:52:25.669 17578-17578/org.xbmc.android.remotesandbox W/Resources﹕ Converting to string: TypedValue{t=0x4/d=0x3f800000 a=2 r=0x7f0b00b7}
02-18 10:52:25.689 17578-18215/org.xbmc.android.remotesandbox V/AudioProvider﹕ query(uri=content://org.xbmc.android.jsonrpc.audio/albums, proj=[albums._id, album_id, album_title, album_year, artist_title, album_thumbnail])
02-18 10:52:25.979 17578-17578/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_idle id: android.os.BinderProxy@4215dd08 time:36585390
02-18 10:52:27.190 17578-17578/org.xbmc.android.remotesandbox D/HomeActivity﹕ Triggered refresh in 7ms.
02-18 10:52:27.210 17578-17578/org.xbmc.android.remotesandbox D/SyncService﹕ Starting SyncService...
02-18 10:52:27.210 17578-17578/org.xbmc.android.remotesandbox D/SyncService﹕ Starting quering...
02-18 10:52:27.221 17578-17578/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Starting and binding service...
02-18 10:52:27.231 17578-17578/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Saving post data for later.
02-18 10:52:27.251 17578-17578/org.xbmc.android.remotesandbox I/ConnectionService﹕ Connection service bound to new client.
02-18 10:52:27.251 17578-18356/org.xbmc.android.remotesandbox D/ConnectionService﹕ Starting TCP client for 192.168.1.111:9090...
02-18 10:52:27.261 17578-17578/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Connected to service.
02-18 10:52:27.261 17578-17578/org.xbmc.android.remotesandbox D/ConnectionManager﹕ Posting pending handled call AudioLibrary.GetArtists...
02-18 10:52:27.261 17578-17578/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Posted handled API call service.
02-18 10:52:27.261 17578-17578/org.xbmc.android.remotesandbox D/ConnectionService﹕ Registered new client.
02-18 10:52:27.261 17578-17578/org.xbmc.android.remotesandbox D/ConnectionService﹕ Done!
02-18 10:52:27.261 17578-17578/org.xbmc.android.remotesandbox D/ConnectionService﹕ Sending new handled API call..
02-18 10:52:27.261 17578-17578/org.xbmc.android.remotesandbox D/ConnectionService﹕ Quering for later.
02-18 10:52:27.281 17578-18356/org.xbmc.android.remotesandbox D/ConnectionService﹕ Connected and writer setup.
02-18 10:52:27.281 17578-18356/org.xbmc.android.remotesandbox I/ConnectionService﹕ Connected to TCP socket in 26ms
02-18 10:52:27.281 17578-17578/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Got message: 4
02-18 10:52:27.281 17578-18358/org.xbmc.android.remotesandbox D/ConnectionService﹕ Sending data to server.
02-18 10:52:27.281 17578-18358/org.xbmc.android.remotesandbox D/ConnectionService﹕ REQUEST: {"jsonrpc":"2.0","id":"7154656162016742991","method":"AudioLibrary.GetArtists"}
02-18 10:52:27.311 17578-18356/org.xbmc.android.remotesandbox I/ConnectionService﹕ READ: {"id":"7154656162016742991","jsonrpc":"2.0","result":{"limits":{"end":0,"start":...
02-18 10:52:27.311 17578-18356/org.xbmc.android.remotesandbox D/ArtistHandler﹕ Building queries for artist's drop and create.
02-18 10:52:27.311 17578-18356/org.xbmc.android.remotesandbox I/ConnectionService﹕ TCP socket closed.
02-18 10:52:27.311 17578-18356/org.xbmc.android.remotesandbox W/dalvikvm﹕ threadid=21: thread exiting with uncaught exception (group=0x4179cc80)
02-18 10:52:27.311 17578-18356/org.xbmc.android.remotesandbox E/AndroidRuntime﹕ FATAL EXCEPTION: IntentService[ConnectionService]
Process: org.xbmc.android.remotesandbox, PID: 17578
java.lang.NullPointerException
at org.xbmc.android.app.io.audio.ArtistHandler.parse(ArtistHandler.java:65)
at org.xbmc.android.jsonrpc.io.JsonHandler.applyResult(JsonHandler.java:76)
at org.xbmc.android.jsonrpc.service.ConnectionService.notifyClients(ConnectionService.java:330)
at org.xbmc.android.jsonrpc.service.ConnectionService.onHandleIntent(ConnectionService.java:224)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
That's the entire logcat...
Is it possibly just missing android.permission.READ_SYNC_SETTINGS?
I added READ_SYNC_SETTINGS and WRITE_SYNC_SETTINGS, now I get:
02-18 12:25:31.275 32619-32619/org.xbmc.android.remotesandbox I/PullToRefreshAttacher﹕ Given null options so using default options.
02-18 12:25:31.295 32619-32619/org.xbmc.android.remotesandbox W/Resources﹕ Converting to string: TypedValue{t=0x4/d=0x3f800000 a=2 r=0x7f0b00b7}
02-18 12:25:31.325 32619-32637/org.xbmc.android.remotesandbox V/AudioProvider﹕ query(uri=content://org.xbmc.android.jsonrpc.audio/albums, proj=[albums._id, album_id, album_title, album_year, artist_title, album_thumbnail])
02-18 12:25:31.415 32619-32619/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 12:25:31.425 32619-32619/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 12:25:31.425 32619-32619/org.xbmc.android.remotesandbox I/Adreno200-EGL﹕ <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM Build: Iabe52cfaeae4c5fab1acacfe6f056ba15fa93274
02-18 12:25:31.445 32619-32619/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 12:25:31.445 32619-32619/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 12:25:31.475 32619-32619/org.xbmc.android.remotesandbox E/Adreno200-GSL﹕ <get_panel_settings:3616>: debug.prerotation.disable set. Disable prerotation
02-18 12:25:31.475 32619-32619/org.xbmc.android.remotesandbox D/OpenGLRenderer﹕ Enabling debug mode 0
02-18 12:25:31.675 32619-32619/org.xbmc.android.remotesandbox I/ActivityManager﹕ Timeline: Activity_idle id: android.os.BinderProxy@41a35db8 time:39038606
02-18 12:25:33.828 32619-32619/org.xbmc.android.remotesandbox D/HomeActivity﹕ Triggered refresh in 5ms.
02-18 12:25:33.838 32619-32619/org.xbmc.android.remotesandbox D/SyncService﹕ Starting SyncService...
02-18 12:25:33.838 32619-32619/org.xbmc.android.remotesandbox D/SyncService﹕ Starting quering...
02-18 12:25:33.898 32619-32619/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Starting and binding service...
02-18 12:25:33.908 32619-32619/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Saving post data for later.
02-18 12:25:33.908 32619-32619/org.xbmc.android.remotesandbox I/ConnectionService﹕ Connection service bound to new client.
02-18 12:25:33.908 32619-314/org.xbmc.android.remotesandbox D/ConnectionService﹕ Starting TCP client for 192.168.1.111:9090...
02-18 12:25:33.918 32619-314/org.xbmc.android.remotesandbox D/ConnectionService﹕ Connected and writer setup.
02-18 12:25:33.918 32619-314/org.xbmc.android.remotesandbox I/ConnectionService﹕ Connected to TCP socket in 8ms
02-18 12:25:33.918 32619-32619/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Connected to service.
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox D/ConnectionManager﹕ Posting pending handled call AudioLibrary.GetArtists...
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Posted handled API call service.
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox D/ConnectionService﹕ Registered new client.
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox D/ConnectionService﹕ Directly notifying connected status.
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox D/ConnectionService﹕ Done!
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox D/ConnectionService﹕ Sending new handled API call..
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox D/ConnectionService﹕ Sending data to server.
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox D/ConnectionService﹕ REQUEST: {"jsonrpc":"2.0","id":"6889756319347530076","method":"AudioLibrary.GetArtists"}
02-18 12:25:33.928 32619-32619/org.xbmc.android.remotesandbox I/ConnectionManager﹕ Got message: 4
02-18 12:25:33.958 32619-314/org.xbmc.android.remotesandbox I/ConnectionService﹕ READ: {"id":"6889756319347530076","jsonrpc":"2.0","result":{"limits":{"end":0,"start":...
02-18 12:25:33.958 32619-314/org.xbmc.android.remotesandbox D/ArtistHandler﹕ Building queries for artist's drop and create.
02-18 12:25:33.958 32619-314/org.xbmc.android.remotesandbox I/ConnectionService﹕ TCP socket closed.
02-18 12:25:33.958 32619-314/org.xbmc.android.remotesandbox W/dalvikvm﹕ threadid=14: thread exiting with uncaught exception (group=0x4179cc80)
02-18 12:25:33.958 32619-314/org.xbmc.android.remotesandbox E/AndroidRuntime﹕ FATAL EXCEPTION: IntentService[ConnectionService]
Process: org.xbmc.android.remotesandbox, PID: 32619
java.lang.NullPointerException
at org.xbmc.android.app.io.audio.ArtistHandler.parse(ArtistHandler.java:65)
at org.xbmc.android.jsonrpc.io.JsonHandler.applyResult(JsonHandler.java:76)
at org.xbmc.android.jsonrpc.service.ConnectionService.notifyClients(ConnectionService.java:330)
at org.xbmc.android.jsonrpc.service.ConnectionService.onHandleIntent(ConnectionService.java:224)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
02-18 12:25:34.819 32619-32619/org.xbmc.android.remotesandbox I/PullToRefreshAttacher﹕ PullToRefreshAttacher is destroyed.
02-18 12:25:35.669 32619-314/org.xbmc.android.remotesandbox I/Process﹕ Sending signal. PID: 32619 SIG: 9
Seems like a weird response from XBMC. Can you please remove .substring(0, 80)
from ConnectionService.java
(line 220) and post what XBMC's response is? The file is in the lib. Thanks in advance!
"end":0 ;)
The artist value will then either contains empty array or json null value that needs to be tested here
final ArrayNode artists = (ArrayNode)response.get(AbstractCall.RESULT).get(AudioLibrary.GetArtists.RESULT);
Remark valid for all calls you need to check for JSON null before casting or test if really an array.
Good catch, will add a fix. Merci Tolriq!
@ronasimi: Pushed a fix, can you retry?
EDIT: You also need to update the lib (git submodule update
).
LGTM. Only the movie category opens, no cover art displays and I'm not able to tap on anything. Also, tapping on addons opens the add host wizard. Crashes are gone.
Yep, welcome to development state. :)
Cover art should display, though.
I'm building using android studio 0.4.5 on arch linux. I have my xbmc install listening on port 3737, and the remote did not find the xbmc instance. manual configuration seemed to work, but when I swipe down to sync:
Not running in emulator, running on my phone w/ CM 11.0, my own custom build of CM