last fm keeps randomly rebooting moto droid

 
  • last fm keeps randomly rebooting moto droid

    I have tried looking for this at the Motorola forum, Ultimate Droid forum, and Android forums.

    What my problem is, last fm will randomly reboot my phone, no error, no warning, just reboot. I have noticed that it is always with custom ROMs. I have used Cyanogen, Bugless Beast, and now on Ultimate Droid UD10 with same issue occurring.

    When running on a core ROM, works for hours on end. I have tried using Pandora (which i by no means favor over last fm) and it will work fine, so apparently its not necessarily the streaming abilities of the custom ROMs.

    Has any one else seen this issue before, or will this not even be supported due to custom ROMs being involved?

  • More information to problem...

    After running OS Monitor, i am finding a few odd issues.

    When I run last.fm , i see that three seperate PIDs are created for last.fm. Some times one will fall off, but will shortly come back.
    PID: 20550
    Process: fm.last.android
    Mamory: 27M Thread: 27 Load: 1%
    STime: 226 UTime: 606
    User: app_54 Status: Sleep

    then again...

    PID: 20597
    Process: fm.last.android:player
    Memory: 21M Thread: 14 Load: 0%
    STime: 100 UTime: 137
    User: app_54 Status: Sleep

    then again...

    PID: 20608
    Process: fm.last.android:player
    Memory: 24M Thread: 14 Load: 0%
    STime: 89 UTime: 120
    User: app_54 Status: Sleep


    Is this normal to keep opening PIDs for one application? I dont see any other applications running with multiple instances.

  • Our app consists of 3 process: the main app (fm.last.android), the scrobbler (fm.last.android:scrobbler), and the background audio player (fm.last.android:player). This allows our app to continue scrobbling / playing audio in the background without wasting resources of keeping the main GUI app in RAM.

    The player service should only be running once, I'm not sure why Android has started it multiple times on your device.

  • Would this screen shot help any? (taken long after I made last post...) However, from what it sounds like, it is normal to see multiple last.fm sessions (it is possible I didnt read all of the line when i placed that last one, it very well could have been :scrobbler



    Is there any other information that I can post to help with trouble shooting? I really find it hard to believe that I am the only one out there with this issue, but I suppose it is possible, unless the others have given up and moved on to Pandora.

    Is it safe to presume that you truthfully have no clue as to what would cause this random reboot, I know i dont have a clue. I appreciate any help that you can offer.

  • If you have access to the Android SDK, running "adb logcat" with the device connected via USB would be useful, as it will output debug messages to your screen before the device reboots.

    I use a Moto Droid as my primary phone, and haven't run into this issue myself. Are you running custom firmware or a custom kernel?

    Some custom kernels have enabled a debug feature that reboots the device when system resources get low -- this feature is only supposed to be enabled for the emulator as an alert for developers to indicate a possible memory leak. Normal device kernels will just close unused background apps to free up resources in this situation.

    if you're using cyanogenmod, try using the kernel included with it instead of a custom kernel. The standard kernel on CM5 and CM6 does not have this issue, and neither should the standard kernel included with the stock Motorola firmware.

  • Thanks C99, I will look into this.

    I am running a custom ROM, I am running Ultimate Droid, UD10. When running the adb logcat, do I want to have it log verbose, or warning, error, etc.

    I will do this and get back with you.

  • By the way, would you mind if i quoted part of your reply to the Ultimate Droid forum? Specifically the part ..

    "Some custom kernels have enabled a debug feature that reboots the device when system resources get low -- this feature is only supposed to be enabled for the emulator as an alert for developers to indicate a possible memory leak. Normal device kernels will just close unused background apps to free up resources in this situation."

  • Hammerwalk said:
    By the way, would you mind if i quoted part of your reply to the Ultimate Droid forum?
    Feel free, as it will be nice to have this fixed in the various kernels. I have a link to more info about this somewhere in my email archives, I'll dig thru them when I'm in the office tomorrow.

  • I took a peek at the Android source, it looks like devs can either #define kTrackGrefUsage false in dalvik/vm/Jni.c or set the jniGrefLimit to 0, or set jniWarnError to false. I've never built a kernel / ROM myself, so I'm not sure where specifically the configuration change would go, just looked at what variables the Android source uses when it throws the "Excessive JNI global references" error and reboots.

  • just for a reference...

    http://forums.blackdroidmod.com/index.php?/topic/1016-random-reboots-while-using-lastfm/page__gopid__7566#entry7566

    Currently going back and forth between here and there. Thought I would supply the link to the topic just in case you were curious.

    I threw out some things that you suggested looking at, so hopefully someone who knows what they are doing will be able to help out. I did however mention a work around that I tried last night. There is a Dev Tool app with UD10 that allows an option of "Max 4 App Process" under Development. I ran last.fm last night for over 6 hours with this enabled. As soon as i turned it to no limit, with last.fm still running, it rebooted within ~15-20min.

  • I think i finally found something.

    I tried to save the log from the Android SDK, but couldn't ever get it to open back up again. Either way, this is what was caught before the shut down... This was about 30 minutes after i started last.fm. Prior to this, about 2 minutes or so, i had skipped a track. 30 seconds into the song, i see this...

    PID TAG Message
    3775 dalvikvm GREF has increased to 2001 (D)
    3775 dalvikvm Last 10 entries in JNI global reference table (W)

    skip a bunch of lines that seem irrelevant
    after listing all of the global reference entries

    3775 dalvikvm Memory held directly by native code is 77496 bytes (W)
    3775 dalvikvm Excessive JNI global references (2001) (E)
    3775 dalvikvm VM aborting


    this is then followed by a many lines of what looks like a memory dump

    1064 installd eof (e)
    1064 installd failed to read size (e)
    1064 installd closing connection (i)
    1058 vold Framework disconnected (e)
    3769 Zygote Process 3775 terminated by signal (11) (d)
    3769 Zygote Exit zygote because system server (3775) has terminated (i)
    1057 ServiceManager ....

    now it looks like its shutting everthing down, messages like service 'power' died , cpuinfo, wallpaper, on and on until it got to service 'phone' died

    now it looks like the phone booting up...

    13096 AndroidRuntime >>>>>> AndroidRuntime START <<<<<<<
    CheckJNI is ON


    I dont know if this helps one bit, but it definitly caught my eye when you replied last regarding the JNI check being on and such. I did manage to save the log to a txt document, but like i said, i was unable to open it again. If you need me to, i can send it to you, or whatever.

    Let me know if there is anything else that may help you. I greatly appreciate your time and help with this.

  • I did a bit more digging, and it looks like the setting to enable/disable debug mode is in build.prop. In Ultimate Droid, they've got "ro.kernel.android.checkjni=1" set, which puts Dalvik into debug mode. Cyanogenmod doesn't have this line, which is probably why it works fine on my Droid. Try removing it from /system/build.prop on your device and let me know if you still have issues with the app causing your Droid to reboot.

  • this very well could be solved!

    I found the line you were talking about, and #'ed it. This was earlier this norning. I have had last.fm running literally all day long, and so far, no reboots! The only thing I have noticed are the PIDs of the player, it will change from time to time. Not sure if that even means anything.

    Thank you very much for all of your help and suggestions. I will keep you posted should it happen again, but so far so good. :-)

  • Awesome! The PID changing is normal, as Android will stop the player service process when it's not needed, and start it again later.

    Hopefully the custom ROM developers will remove that line from build.prop to avoid this issue in the future.

  • Many Thanks

    Was having the same reboot problem with a CM6 build for CDMA Hero. Commented out the one line in build.prop and streaming perfectly now.

  • c99koder 说:
    Awesome! The PID changing is normal, as Android will stop the player service process when it's not needed, and start it again later.

    Hopefully the custom ROM developers will remove that line from build.prop to avoid this issue in the future.


    hey,Was having the same reboot problem in my app,but there is not exist "ro.kernel.android.checkjni=1" in /system/build.prop,Can you give some suggestions,i will appreciate you so much..

Anonymous users may not post messages. Please log in or create an account to post in the forums.