jerrellmardis / Amphitheatre

Amphitheatre is an Android TV app that connects with network shares, organizes and serves videos to any Android capable media player app.
Apache License 2.0
437 stars 87 forks source link

Share discovery causes a app crash #27

Closed jerrellmardis closed 10 years ago

jerrellmardis commented 10 years ago

Once the app starts looking for network shares it crashes.

08-10 11:11:00.290  29388-29837/com.jerrellmardis.amphitheatre.dev E/NetworkSearchTask﹕ Failed to search network for shares.
    jcifs.smb.SmbException: Failed to connect to server
    java.net.UnknownHostException: ..__MSBROWSE__.<01>
            at jcifs.netbios.NbtAddress.doNameQuery(NbtAddress.java:317)
            at jcifs.netbios.NbtAddress.getByName(NbtAddress.java:422)
            at jcifs.netbios.NbtAddress.getByName(NbtAddress.java:403)
            at jcifs.smb.SmbFile.getFirstAddress(SmbFile.java:853)
            at jcifs.smb.SmbFile.connect(SmbFile.java:954)
            at jcifs.smb.SmbFile.connect0(SmbFile.java:883)
            at jcifs.smb.SmbFile.doNetServerEnum(SmbFile.java:1921)
            at jcifs.smb.SmbFile.doEnum(SmbFile.java:1741)
            at jcifs.smb.SmbFile.listFiles(SmbFile.java:1722)
            at jcifs.smb.SmbFile.listFiles(SmbFile.java:1655)
            at com.jerrellmardis.amphitheatre.task.NetworkSearchTask.doInBackground(NetworkSearchTask.java:35)
            at com.jerrellmardis.amphitheatre.task.NetworkSearchTask.doInBackground(NetworkSearchTask.java:16)
            at android.os.AsyncTask$2.call(AsyncTask.java:288)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
            at jcifs.smb.SmbFile.connect0(SmbFile.java:885)
            at jcifs.smb.SmbFile.doNetServerEnum(SmbFile.java:1921)
            at jcifs.smb.SmbFile.doEnum(SmbFile.java:1741)
            at jcifs.smb.SmbFile.listFiles(SmbFile.java:1722)
            at jcifs.smb.SmbFile.listFiles(SmbFile.java:1655)
            at com.jerrellmardis.amphitheatre.task.NetworkSearchTask.doInBackground(NetworkSearchTask.java:35)
            at com.jerrellmardis.amphitheatre.task.NetworkSearchTask.doInBackground(NetworkSearchTask.java:16)
            at android.os.AsyncTask$2.call(AsyncTask.java:288)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
08-10 11:11:00.323  29388-29388/com.jerrellmardis.amphitheatre.dev E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.jerrellmardis.amphitheatre.dev, PID: 29388
    java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference
            at java.util.ArrayList.addAll(ArrayList.java:188)
            at android.widget.ArrayAdapter.addAll(ArrayAdapter.java:195)
            at com.jerrellmardis.amphitheatre.fragment.AddSourceDialogFragment.onSharesFound(AddSourceDialogFragment.java:162)
            at com.jerrellmardis.amphitheatre.task.NetworkSearchTask.onPostExecute(NetworkSearchTask.java:98)
            at com.jerrellmardis.amphitheatre.task.NetworkSearchTask.onPostExecute(NetworkSearchTask.java:16)
            at android.os.AsyncTask.finish(AsyncTask.java:632)
            at android.os.AsyncTask.access$600(AsyncTask.java:177)
            at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5070)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)