kurioes / pmix

Automatically exported from code.google.com/p/pmix
0 stars 0 forks source link

Crash when choose files list #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open pmix
2. Choose Files from menu

What is the expected output? What do you see instead?
List of files, instead I got force close of pmix

What version of the product are you using? On what operating system?
0.4beta2 on Cyanogenmod 4.2.2

Please provide any additional information below.
I/ActivityManager(  138): Starting activity: Intent { 
cmp=org.pmix.ui/.FSActivity }
I/global  (25840): onPause
D/AndroidRuntime(25840): Shutting down VM
W/dalvikvm(25840): threadid=3: thread exiting with uncaught exception 
(group=0x4001e1c0)
E/AndroidRuntime(25840): Uncaught handler: thread main exiting due to 
uncaught exception
E/AndroidRuntime(25840): java.lang.RuntimeException: Unable to start 
activity ComponentInfo{org.pmix.ui/org.pmix.ui.FSActivity}: 
java.lang.NullPointerException
E/AndroidRuntime(25840):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
E/AndroidRuntime(25840):    at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
E/AndroidRuntime(25840):    at 
android.app.ActivityThread.access$2100(ActivityThread.java:116)
E/AndroidRuntime(25840):    at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
E/AndroidRuntime(25840):    at 
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(25840):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(25840):    at 
android.app.ActivityThread.main(ActivityThread.java:4203)
E/AndroidRuntime(25840):    at 
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(25840):    at 
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(25840):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
791)
E/AndroidRuntime(25840):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
E/AndroidRuntime(25840):    at dalvik.system.NativeStart.main(Native 
Method)
E/AndroidRuntime(25840): Caused by: java.lang.NullPointerException
E/AndroidRuntime(25840):    at 
org.a0z.mpd.Music.getFilename(Music.java:129)
E/AndroidRuntime(25840):    at 
org.a0z.mpd.Directory.refreshData(Directory.java:109)
E/AndroidRuntime(25840):    at 
org.pmix.ui.FSActivity.onCreate(FSActivity.java:46)
E/AndroidRuntime(25840):    at 
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
E/AndroidRuntime(25840):    at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
E/AndroidRuntime(25840):    ... 11 more
I/Process (  138): Sending signal. PID: 25840 SIG: 3
I/dalvikvm(25840): threadid=7: reacting to signal 3
I/dalvikvm(25840): Wrote stack trace to '/data/anr/traces.txt'

Original issue reported on code.google.com by kep...@gmail.com on 2 Nov 2009 at 9:08

Attachments:

GoogleCodeExporter commented 9 years ago
I just updated to Cyanogen 4.2.3.1, I can't reproduce this problem. Can you 
still
verify this?

Original comment by stefan.a...@gmail.com on 2 Nov 2009 at 7:26

GoogleCodeExporter commented 9 years ago
I'm running on 4.2.3.1 now too, so I will try it tommorow (have different mpd 
at home) 
and let you know.

Original comment by kep...@gmail.com on 2 Nov 2009 at 7:34

GoogleCodeExporter commented 9 years ago
I had this issue, the problem was any playlists on the server result in
org.a0z.mpd.Music being instantiated with a null filename.  I modified
Music.getFilename() to return an empty string if Music.filename is null, but it 
might
be better to just ignore playlist entries in MPD.getDir(), at least until 
playlist
support is added. 

Original comment by gregory....@gmail.com on 18 Nov 2009 at 5:01

GoogleCodeExporter commented 9 years ago
Sorry for lack of updates from my side. I tried it today with latest cyan 
4.2.5, error 
is still same. On this location, I have bigger music collection here than home 
(no 
problem with this at home).

Original comment by kep...@gmail.com on 18 Nov 2009 at 8:16

GoogleCodeExporter commented 9 years ago
I can confirm the crash on my google g1 with android 1.5 crc37 with root rights.
I installed 0.4beta3 with adb install. I use mpd version 0.14.
Same crash. Anything I can help with? 

Original comment by waldemar...@googlemail.com on 23 Nov 2009 at 7:40

GoogleCodeExporter commented 9 years ago
I got a very similar crash also, found out it was because I had a bunch of 
playlists,
debugged it, and if a playlist is found, in MPD.java:

if (... || line.startsWith("playlist: ")  ...
...
 result.add(new Music(file));

A playlist doesn't have a "file:" entry, so fullpath ends up as null in the 
Music
constructor (which is bound to cause trouble, you should put an assert in there 
or
something to ensure Music has a fullpath, or else it crashes on 
Music.getFileName(),
as it counts on fullpath not being null.

This patch fixes my problem at least...

Original comment by magn...@gmail.com on 2 Dec 2009 at 11:47

Attachments:

GoogleCodeExporter commented 9 years ago
I have the same problem. I'll try your diff and see if this fixes my problem. 
Might
take a while because I will have to install the whole SDK...

regards

K

Original comment by kasper.j...@gmail.com on 3 Dec 2009 at 3:10

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for the patch... I will have a look at this next week, stay tuned...

Original comment by stefan.a...@gmail.com on 4 Dec 2009 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by stefan.a...@gmail.com on 4 Dec 2009 at 5:49

GoogleCodeExporter commented 9 years ago
Hello,

I fixed the bug which happens when there is a playlist in the directory (as 
magnepz
mentioned). I'm not sure if the original backtrace posted also suffers this 
problem.
Please try again 0.4-beta4 (will be published tonight), and reopen this bug it 
still
happen to you...

Thanks
Stefan

Original comment by stefan.a...@gmail.com on 10 Dec 2009 at 7:30