Project

General

Profile

Bug #1447

null pointer exception in getFiles

Added by cpg about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
exceptions
Target version:
-
Start date:
06/19/2014
Due date:
% Done:

0%


Description

This is a crash that is affecting a few users: http://crashes.to/s/903ca8e75ea

(there is another about audio at the top, but it's only one user and i suspect it's the FLAC support, so we should keep that lower priority for now)

History

#1 Updated by megabitdragon about 7 years ago

  • Priority changed from Medium to High

#2 Updated by megabitdragon about 7 years ago

  • Priority changed from High to Medium

#3 Updated by megabitdragon about 7 years ago

  • Priority changed from Medium to High

#4 Updated by megabitdragon about 7 years ago

  • Category set to exceptions

#5 Updated by megabitdragon about 7 years ago

Let's not update the version number until this one is fixed as well.

#6 Updated by cpg about 7 years ago

more related crashes showing up in the google developer area:

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.amahi.anywhere/org.amahi.anywhere.activity.ServerFilesActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2077)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2102)
at android.app.ActivityThread.access$600(ActivityThread.java:137)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4838)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.amahi.anywhere.server.client.ServerClient.getFiles(ServerClient.java:127)
at org.amahi.anywhere.fragment.ServerFilesFragment.setUpFilesContent(ServerFilesFragment.java:104)
at org.amahi.anywhere.fragment.ServerFilesFragment.setUpFiles(ServerFilesFragment.java:88)
at org.amahi.anywhere.fragment.ServerFilesFragment.onActivityCreated(ServerFilesFragment.java:78)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:848)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1035)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1017)
at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1802)
at android.app.Activity.performCreate(Activity.java:5013)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2041)

#7 Updated by ming about 7 years ago

Actually I don’t really understand why it is happening. I have this when some exception is happening during the audio or video playback. Server and ServerApi objects are null when the exception happens, so I think that when application crashes, it drags injected objects with it.

#8 Updated by megabitdragon about 7 years ago

I'll switch this to low until we can get more info about it.

#9 Updated by megabitdragon about 7 years ago

  • Priority changed from High to Low

#10 Updated by cpg about 7 years ago

  • Priority changed from Low to High

We're still getting this exception in the latest released code 0.1.7.

#11 Updated by ming about 7 years ago

  • Status changed from Assigned to Feedback
  • Assignee changed from ming to cpg

Any steps to reproduce?

#12 Updated by ming about 7 years ago

OK, another portion of explanations. API clients are delivered via dependency injection. When something crashes at viewers the application tries to recreate activities, but somehow a DI objects graph sets child objects to null. Basically a crash causes the crash. Don’t know why it happens.

#13 Updated by megabitdragon almost 7 years ago

I don't know if this is related but it is happening on the latest beta release and maybe it helps in isolating the issue.

java.lang.NullPointerException
       at org.amahi.anywhere.server.client.ServerClient.getFiles(ServerClient.java:195)
       at org.amahi.anywhere.fragment.ServerFilesFragment.setUpFilesContent(ServerFilesFragment.java:234)
       at org.amahi.anywhere.fragment.ServerFilesFragment.setUpFilesContent(ServerFilesFragment.java:198)
       at org.amahi.anywhere.fragment.ServerFilesFragment.setUpFiles(ServerFilesFragment.java:106)
       at org.amahi.anywhere.fragment.ServerFilesFragment.onActivityCreated(ServerFilesFragment.java:95)
       at android.app.Fragment.performActivityCreated(Fragment.java:1708)
       at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:908)
       at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
       at android.app.BackStackRecord.run(BackStackRecord.java:684)
       at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
       at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:157)
       at android.app.ActivityThread.main(ActivityThread.java:5293)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
       at dalvik.system.NativeStart.main(NativeStart.java)

#14 Updated by megabitdragon almost 7 years ago

  • Assignee changed from cpg to ming

#15 Updated by cpg almost 7 years ago

we are still getting crashes for this in the 0.4.1 build. can we add some sanity checks to avoid the crash at least?
the app may not work well in those situations, but it could be sue to loss of wifi signal, or cell signal or something.

#16 Updated by megabitdragon almost 7 years ago

  • Status changed from Feedback to Assigned

At this point we shouldn't worry why it happens and just catch the exception.

#17 Updated by cpg almost 7 years ago

added some protection for release to the community.

#18 Updated by cpg almost 7 years ago

  • Status changed from Assigned to Closed
  • Assignee changed from ming to cpg

added some protection for release to the community.

Also available in: Atom