Re: [android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
On 30/04/12 22:13, ThomasWrobel wrote: Ok, I am using a HTC Legend. The crashes didn't start when I started using the 3D, so I don't think its a specific command thats doing it. Maybe a OpenGL related memory leak. You may install the mat plugin for eclipse. It can generate a dump that you can analyze after a crash. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
I have installed Mat but not sure if I am using it the way intended, as I am not getting any useful results. I run my app from eclipse using usb debugging. I let it run for a bit doing random actions. I open DDMS in eclipse and goto the Dump HPROF file icon. This gives me what I think is a android-specific Hprof file that MAT cant open. However, in the SDK tools directory there is a conversion program (hprof-conv.exe) which I use to get a standard hprof file. MAT can open this, so I do so. I then try Leak Suspect Report and click finish. I get a nice piechart with a selection of information - but no trace of my apps class's in any of it. Its as if my app is invisible to the dump somehow. The problem suspects it lists are: -- 2,185 instances of java.lang.Class, loaded by system class loader occupy 661,576 (36.76%) bytes. Biggest instances: class com.ibm.icu4jni.util.Resources$DefaultTimeZones @ 0x401f7148 - 166,600 (9.26%) bytes. class android.text.Html$HtmlParser @ 0x4007b230 - 126,592 (7.03%) bytes. class org.apache.harmony.security.fortress.Services @ 0x400900d0 - 51,456 (2.86%) bytes. class android.content.res.Resources @ 0x40058cf8 - 41,752 (2.32%) bytes. 7,252 instances of java.lang.String, loaded by system class loader occupy 450,392 (25.03%) bytes. Keywords java.lang.String 58 instances of org.bouncycastle.jce.provider.X509CertificateObject, loaded by system class loader occupy 289,288 (16.07%) bytes. These instances are referenced from one instance of java.util.HashMap$HashMapEntry[], loaded by system class loader Keywords org.bouncycastle.jce.provider.X509CertificateObject java.util.HashMap$HashMapEntry[] --- I also tried opening the dump and going Component Report and typing my projects class name (com.arwave.skywriter), but nothing comes up: Size: 0 B Classes: 0 Objects: 0 Class Loader: 0 Is there something special I have to do too make my project visible to this MAT plugin? It does seem quite usefull. Also, I am dumping manually by using the DDMS dump button, is there a way to do that post-crash or automatically before a crash? Thanks, Thomas On 1 May 2012 09:23, deb-account theedge...@free.fr wrote: On 30/04/12 22:13, ThomasWrobel wrote: Ok, I am using a HTC Legend. The crashes didn't start when I started using the 3D, so I don't think its a specific command thats doing it. Maybe a OpenGL related memory leak. You may install the mat plugin for eclipse. It can generate a dump that you can analyze after a crash. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
I've only ever (in over two years) seen reboots caused by changes made via the wifi manager API. If you're using it, I would start there. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
You can do a logcat before the crash, logging to a file. Perhaps then you'll get a better view of what happened before. A post-crash bugreport may also have a copy of the previous kernel log if it's a kernel issue. R On Mon, Apr 30, 2012 at 7:52 AM, Pent supp...@apps.dinglisch.net wrote: I've only ever (in over two years) seen reboots caused by changes made via the wifi manager API. If you're using it, I would start there. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
Thanks for the replys. I am afraid I am ignorant of how to do that. So far I have just been using the Dalvik Debug Monitor, I can see options to save to a file, but not to log to a file continuously. Googleing around seems to infer I need to put code in my app to send the log to a file on the SD card, or use a Debugging library. Is this correct? Also, where is the bugreport located? Poly - I have nothing in my own code that effects the wifi manager API. However, I am using aSmack lib for XMPP communications that could do that. It doesn't seem too consistent though, as the crashes happen sometimes before I logon to a server. I suspect it might be ram related in some way, as the crashs are very inconsistent. Sometimes it crashes as soon as it loads, other times I can use it for a few minutes before crashing. I also use the JPCT 3D library in my app, as well as using the camera preview as a background, so the app is pretty heavy overall. Thanks again, Thomas On Apr 30, 5:00 pm, Robert Greenwalt rgreenw...@google.com wrote: You can do a logcat before the crash, logging to a file. Perhaps then you'll get a better view of what happened before. A post-crash bugreport may also have a copy of the previous kernel log if it's a kernel issue. R On Mon, Apr 30, 2012 at 7:52 AM, Pent supp...@apps.dinglisch.net wrote: I've only ever (in over two years) seen reboots caused by changes made via the wifi manager API. If you're using it, I would start there. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
I don't know your environment, but you should have access to adb. adb logcat starts capturing some of the available debug streams. To write it to a file: adb logcat mylog.txt or to log to file and to screen (on linux): adb lgocat | tee mylog.txt This will only record stuff from some of the log streams, but it defaults to the common ones. If you think your app is strictly to blame you can put in log statements there too, but crashes should be logged for you. adb bugreport mybugreport.txt will capture the last buffers from all the streams and much much more. R On Mon, Apr 30, 2012 at 8:34 AM, ThomasWrobel darkfl...@gmail.com wrote: Thanks for the replys. I am afraid I am ignorant of how to do that. So far I have just been using the Dalvik Debug Monitor, I can see options to save to a file, but not to log to a file continuously. Googleing around seems to infer I need to put code in my app to send the log to a file on the SD card, or use a Debugging library. Is this correct? Also, where is the bugreport located? Poly - I have nothing in my own code that effects the wifi manager API. However, I am using aSmack lib for XMPP communications that could do that. It doesn't seem too consistent though, as the crashes happen sometimes before I logon to a server. I suspect it might be ram related in some way, as the crashs are very inconsistent. Sometimes it crashes as soon as it loads, other times I can use it for a few minutes before crashing. I also use the JPCT 3D library in my app, as well as using the camera preview as a background, so the app is pretty heavy overall. Thanks again, Thomas On Apr 30, 5:00 pm, Robert Greenwalt rgreenw...@google.com wrote: You can do a logcat before the crash, logging to a file. Perhaps then you'll get a better view of what happened before. A post-crash bugreport may also have a copy of the previous kernel log if it's a kernel issue. R On Mon, Apr 30, 2012 at 7:52 AM, Pent supp...@apps.dinglisch.net wrote: I've only ever (in over two years) seen reboots caused by changes made via the wifi manager API. If you're using it, I would start there. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
I am using XP/eclipse. I see all the normal logs coming from the device just fine, including many,many I put in my apps code. On searching for adb on my system it seems all I found is a polite note from google saying its been moved too platform-tools/ in my android sdk directory. As that directory is not in my sdk directory, it tells me too install Android SDK Platform-tools which I will try now and post back in a bit. This is really odd to me though, as I thought adb was an essential part not a optional addon. Apparently ddsm.bat and logcat seem to be able to run without it though. On 30 April 2012 18:41, Robert Greenwalt rgreenw...@google.com wrote: I don't know your environment, but you should have access to adb. adb logcat starts capturing some of the available debug streams. To write it to a file: adb logcat mylog.txt or to log to file and to screen (on linux): adb lgocat | tee mylog.txt This will only record stuff from some of the log streams, but it defaults to the common ones. If you think your app is strictly to blame you can put in log statements there too, but crashes should be logged for you. adb bugreport mybugreport.txt will capture the last buffers from all the streams and much much more. R On Mon, Apr 30, 2012 at 8:34 AM, ThomasWrobel darkfl...@gmail.com wrote: Thanks for the replys. I am afraid I am ignorant of how to do that. So far I have just been using the Dalvik Debug Monitor, I can see options to save to a file, but not to log to a file continuously. Googleing around seems to infer I need to put code in my app to send the log to a file on the SD card, or use a Debugging library. Is this correct? Also, where is the bugreport located? Poly - I have nothing in my own code that effects the wifi manager API. However, I am using aSmack lib for XMPP communications that could do that. It doesn't seem too consistent though, as the crashes happen sometimes before I logon to a server. I suspect it might be ram related in some way, as the crashs are very inconsistent. Sometimes it crashes as soon as it loads, other times I can use it for a few minutes before crashing. I also use the JPCT 3D library in my app, as well as using the camera preview as a background, so the app is pretty heavy overall. Thanks again, Thomas On Apr 30, 5:00 pm, Robert Greenwalt rgreenw...@google.com wrote: You can do a logcat before the crash, logging to a file. Perhaps then you'll get a better view of what happened before. A post-crash bugreport may also have a copy of the previous kernel log if it's a kernel issue. R On Mon, Apr 30, 2012 at 7:52 AM, Pent supp...@apps.dinglisch.net wrote: I've only ever (in over two years) seen reboots caused by changes made via the wifi manager API. If you're using it, I would start there. Pent -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
On Apr 30, 11:34 am, ThomasWrobel darkfl...@gmail.com wrote: I also use the JPCT 3D library in my app, as well as using the camera preview as a background, so the app is pretty heavy overall. My first hunch would be issues in the platform openGL implementation that probably uses. It would be worth doing some web searching on the phone model - it's possible others have found the same issue. Also you may want to figure out if you are getting a kernel reboot, or an android runtime framework crash restart while the kernel continues running. Once you get adb working, look in /proc/uptime shortly after a crash - if it's a low number of seconds, your kernel rebooted, if it's a high number likely just the framework crashed and restarted. (You'll probably also see a bootloader splash screen after a power-on or kernel reboot, before the more lengthy startup animation that runs while the android runtime framework gets itself going.) It goes without saying, that if the platform is working as intended, there is nothing an app can do to cause a reboot, so the fact that it is happening means something is broken with the device/android build. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
Ok, that seemed to help. Installing the Platform-tools seemed to put the adb.exe where It should be. Dumping the log to a file the last entries I see are: D/dalvikvm( 1241): GC_FOR_MALLOC freed 10098 objects / 483816 bytes in 152ms W/System.err( 1241): java.security.KeyStoreException: KeyStore jks implementation not found W/System.err( 1241):at java.security.KeyStore.getInstance(KeyStore.java:134) W/System.err( 1241):at org.jivesoftware.smack.ServerTrustManager.init(ServerTrustManager.java: 70) W/System.err( 1241):at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived(XMPPConnection.java: 824) W/System.err( 1241):at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java: 267) W/System.err( 1241):at org.jivesoftware.smack.PacketReader.access $000(PacketReader.java:43) W/System.err( 1241):at org.jivesoftware.smack.PacketReader $1.run(PacketReader.java:70) V/libgps ( 104): DeferredActionThread pthread_cond_wait returned D/RPC ( 104): written RPC packet size: [24] D/RPC ( 104): read RPC packet D/RPC ( 104): read RPC packet size: [284] V/libgps ( 104): DeferredActionThread pthread_cond_wait returned D/RPC ( 104): written RPC packet size: [24] D/RPC ( 104): read RPC packet D/RPC ( 104): read RPC packet size: [284] V/libgps ( 104): DeferredActionThread pthread_cond_wait returned D/RPC ( 104): written RPC packet size: [24] D/RPC ( 104): read RPC packet D/RPC ( 104): read RPC packet size: [284] V/libgps ( 104): DeferredActionThread pthread_cond_wait returned D/RPC ( 104): written RPC packet size: [24] I am going to try cross referencing this with the Dalvik Debug Monitor a few times too see if I really am getting more out of the saving too file method VS just looking in the GUI. I am a little skeptical I am seeing the real reason, as I would expect the very last messages to be the ones causing the crash, rather then a few more debug/normal stuff and then a hardware restart. On Apr 30, 7:46 pm, Thomas Wrobel darkfl...@gmail.com wrote: I am using XP/eclipse. I see all the normal logs coming from the device just fine, including many,many I put in my apps code. On searching for adb on my system it seems all I found is a polite note from google saying its been moved too platform-tools/ in my android sdk directory. As that directory is not in my sdk directory, it tells me too install Android SDK Platform-tools which I will try now and post back in a bit. This is really odd to me though, as I thought adb was an essential part not a optional addon. Apparently ddsm.bat and logcat seem to be able to run without it though. On 30 April 2012 18:41, Robert Greenwalt rgreenw...@google.com wrote: I don't know your environment, but you should have access to adb. adb logcat starts capturing some of the available debug streams. To write it to a file: adb logcat mylog.txt or to log to file and to screen (on linux): adb lgocat | tee mylog.txt This will only record stuff from some of the log streams, but it defaults to the common ones. If you think your app is strictly to blame you can put in log statements there too, but crashes should be logged for you. adb bugreport mybugreport.txt will capture the last buffers from all the streams and much much more. R On Mon, Apr 30, 2012 at 8:34 AM, ThomasWrobel darkfl...@gmail.com wrote: Thanks for the replys. I am afraid I am ignorant of how to do that. So far I have just been using the Dalvik Debug Monitor, I can see options to save to a file, but not to log to a file continuously. Googleing around seems to infer I need to put code in my app to send the log to a file on the SD card, or use a Debugging library. Is this correct? Also, where is the bugreport located? Poly - I have nothing in my own code that effects the wifi manager API. However, I am using aSmack lib for XMPP communications that could do that. It doesn't seem too consistent though, as the crashes happen sometimes before I logon to a server. I suspect it might be ram related in some way, as the crashs are very inconsistent. Sometimes it crashes as soon as it loads, other times I can use it for a few minutes before crashing. I also use the JPCT 3D library in my app, as well as using the camera preview as a background, so the app is pretty heavy overall. Thanks again, Thomas On Apr 30, 5:00 pm, Robert Greenwalt rgreenw...@google.com wrote: You can do a logcat before the crash, logging to a file. Perhaps then you'll get a better view of what happened before. A post-crash bugreport may also have a copy of the previous kernel log if it's a kernel issue. R On Mon, Apr 30, 2012 at 7:52 AM, Pent supp...@apps.dinglisch.net wrote: I've only ever (in over two years) seen reboots caused by changes made via the wifi manager API. If you're using it, I would start there. Pent -- You received
[android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
Ok, I am using a HTC Legend. The crashes didn't start when I started using the 3D, so I don't think its a specific command thats doing it. Maybe a OpenGL related memory leak. Anyway, using adb pull /proc/uptime I get 65.94 18.30 The phone takes a good 20 seconds to reload, most of the time spent on a HTC logo (first a static one for a long time, then it flashes and then a animated one for a shorter time) If its hardware related I guess there isnt too much I can do about it, but perhaps by figuring out the exact point it happens I can minimize its occurrences. On Apr 30, 8:26 pm, Chris Stratton cs07...@gmail.com wrote: On Apr 30, 11:34 am, ThomasWrobel darkfl...@gmail.com wrote: I also use the JPCT 3D library in my app, as well as using the camera preview as a background, so the app is pretty heavy overall. My first hunch would be issues in the platform openGL implementation that probably uses. It would be worth doing some web searching on the phone model - it's possible others have found the same issue. Also you may want to figure out if you are getting a kernel reboot, or an android runtime framework crash restart while the kernel continues running. Once you get adb working, look in /proc/uptime shortly after a crash - if it's a low number of seconds, your kernel rebooted, if it's a high number likely just the framework crashed and restarted. (You'll probably also see a bootloader splash screen after a power-on or kernel reboot, before the more lengthy startup animation that runs while the android runtime framework gets itself going.) It goes without saying, that if the platform is working as intended, there is nothing an app can do to cause a reboot, so the fact that it is happening means something is broken with the device/android build. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Debugging code that cause's a hardware restart of the phone :?
Very interesting -- the last few days, my Galaxy Nexus has started rebooting a few times a day when pushing the app to it using Eclipse. I cannot think of a trigger event that started this behavior. On Tuesday, May 1, 2012 4:13:36 AM UTC+8, ThomasWrobel wrote: Ok, I am using a HTC Legend. The crashes didn't start when I started using the 3D, so I don't think its a specific command thats doing it. Maybe a OpenGL related memory leak. Anyway, using adb pull /proc/uptime I get 65.94 18.30 The phone takes a good 20 seconds to reload, most of the time spent on a HTC logo (first a static one for a long time, then it flashes and then a animated one for a shorter time) If its hardware related I guess there isnt too much I can do about it, but perhaps by figuring out the exact point it happens I can minimize its occurrences. On Apr 30, 8:26 pm, Chris Stratton cs07...@gmail.com wrote: On Apr 30, 11:34 am, ThomasWrobel darkfl...@gmail.com wrote: I also use the JPCT 3D library in my app, as well as using the camera preview as a background, so the app is pretty heavy overall. My first hunch would be issues in the platform openGL implementation that probably uses. It would be worth doing some web searching on the phone model - it's possible others have found the same issue. Also you may want to figure out if you are getting a kernel reboot, or an android runtime framework crash restart while the kernel continues running. Once you get adb working, look in /proc/uptime shortly after a crash - if it's a low number of seconds, your kernel rebooted, if it's a high number likely just the framework crashed and restarted. (You'll probably also see a bootloader splash screen after a power-on or kernel reboot, before the more lengthy startup animation that runs while the android runtime framework gets itself going.) It goes without saying, that if the platform is working as intended, there is nothing an app can do to cause a reboot, so the fact that it is happening means something is broken with the device/android build. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en