Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / How to get Android app crash reports?

Author
Message
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th Oct 2013 18:23
My app has some random crashes that I'd like to diagnose. It does not do this in Windows, but only on Android and the crashes are minor: the app even restarts almost instantaneously. I would, however, like to know what's causing it.
The crash is only saying my app has stopped, I don't even see the normal "wait" or "force close".
Does AppGameKit have a way to give me these reports?
I see some stuff about it in the files, but not sure what I can modify to get these reports.
Thanks.

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 24th Oct 2013 18:47
don't know yet but
did the crash did not appear in the agk player?
maybe the memory runs full.
just print on screen
GetUnassignedImageFileName
GetUnassignedImages
at google playstore i get a crash report, if you have a account
maybe upload a beta version.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Oct 2013 18:50
One way to get information about how something is behaving is to attach it to your PC via USB and then run the app from Eclipse. It will have a window that shows all the output created by the app (not yours, but stuff from the guts) and it can show where it has failures.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th Oct 2013 18:50
Ya I'm not using the player. It's an alpha build. If Google Play will give me the crash reports, that should suffice.
We're running beta next week.
What kind of detail does the Play store crash report give you?

Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th Oct 2013 18:53
@AL - Thanks! I might give that a try too. I've had some issues with running the app right from Eclipse lately. I don't recall seeing this info before though. Is it in the normal Problems/Javadoc/Console that is typically at the bottom? Or is it some separate window?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Oct 2013 19:08
You need to go into the Debug view. The button should be in the upper right corner (next to 'Java').

This works to view the event log on the device even if you haven't used Eclipse to create and install the app.

You need to make sure that you have the settings on your device to allow debugging. And that is found in different places on different devices (and I can't find it on my Nexus 7 right now even though I know I did before).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th Oct 2013 19:11
It's in Settings/Developer Options

This is good to know. So is it the same big nasty bug report you get from pressing "Take bug report" in the Developer options on the Nexus 7? Or is it something a bit more specific to the app?

Thanks!

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Oct 2013 20:18
Quote: "It's in Settings/Developer Options"

It should be. But 'Developer' is no longer (or wasn't) displayed in my Nexus 7 Settings page.

Apparently, some update hid it.

After a google search, I found out how to get it back:
1. Open Settings
2. Scroll to 'About Tablet'
3. Tap the 'Build Number' section 7 (seven) times
4. Go back to main Settings and '{} Developer options' has reappeared!

This is bizarre!

I know I checked the developer settings relatively recently. But they were not there today (until I restored them).

I never saw the 'Take bug report' option. I think something was seriously updated in the background on me. That might or might not give you the information about what just happened that was an issue.

But, for a more real time view of what happens, use the Debug output window in Eclipse. It shows you all events as they happen. You can apply a filter for your app once you figure out the process id as it appears in the list of stuff. Then Eclipse lets you select the text and store it to a file.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 24th Oct 2013 20:21
Very cool to know. Thanks.
Wonder why your dev options got hidden... I'm pretty sure mine didn't even get hidden with the update to 4.3
Bizzare indeed.
The take bug report gives you lots of juicy info, which most of means about zilch to me lol.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Oct 2013 20:33
Apparently it is something introduced in Android 4.2.

And it appears to be Nexus specific.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 25th Oct 2013 14:06
at google i can see a Exception message with the nonsense hundrets following lines for details...
i got there only one from a special device.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Oct 2013 18:21
The trick is interpreting what is shown in Eclipse window or crash report.

The Eclipse view gives you a running 'dialog' about what is actually happening. You can see when errors are reported as they happen and that can be helpful.

The bug report (which I was finally able to generate and send) is different. It first reports information about the current state (one of the reports is the output of the 'top' *nix command). Then it starts reporting all kinds of things like what threads are running and memory and stuff.

Eventually you get to a section labeled 'KERNEL LOG'. This shows (not quite understandable) events as they happened for some period of time ('star date' type time stamps). But you can sort of see when some processes start and stop (or fail).

Then you get 'SMAPS OF ALL PROCESSES' and 'BLOCKED PROCESS WAIT-CHANNELS', no clue.

After that you get 'SYSTEM LOG (logcat -v threadtime -d *:v'. This is the first really useful section. It gives you events with human readable time tags and messages. You search through this to the first occurrence of your package id (com.yourcompany.yourapp) and you can start tracing it via name and process id (pid). The process id will be associated with the start of your package and then appear as the third or fourth value in each line when the reported event is for it.

More than one log is output and the time stamp starts over.

After the log outputs (it looks like three of them), you get to 'VM TRACES JUST NOW'. This looks like information about processes (identified by pid) that are running and the threads (?) they have.

Then some NETWORK stuff and QTAGUID CTRL INFO (?) and QTAGUID STATS INFO, followed by some more NETWORK stuff and then LAST KMSG (kill message, I think). Then (after a long bunch of kmsg stuff) PING and DUMP WIFI, INTERRUPTS, SYSTEM PROPERTIES, VOLD DUMP, SECURE CONTAINTERS, FILESYSTEMS, PACKAGE SETTINGS and a bunch of others (all pretty useless for our purposes).

Eventually you get to the 'DUMP OF SERVICE <servicename>' section. This might have useful information if the AppGameKit app is shown.

Then some WINDOW MANAGER SESSIONS.

Then, major section, 'Running Application Activities'. It shows activities for all activities currently running and may have information useful if your app is still running.

After that is 'Running Application Services'. Maybe useful, if the AppGameKit app shows up. And last is 'Running Application Providers' where some dump information may exist for each app, but it doesn't look very useful.

The screen shot provided by the Nexus 7 bug report is useless since it always sends the screen of the Developer options settings page.

I just created a debug log with my current WIP actively running. I was then able to follow its progress in the SYSTEM LOG section. It included messages like 'native-activity: Failed to create audio player' and 'threaded_app: New Input event: type=2...'. This second one was where I had tapped a button in the app. You can also see where the app loses focus, saving an instance state before it does.

The logcat is probably the most useful for seeing what your app does.

Best bet is to search for your app package and then follow the pid in the logcat to see if you can figure out what happens to it.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Naphier
14
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 25th Oct 2013 18:57
Wow! Thanks so much for the detailed look at the log.
I've also set up the APK on Google Play for beta testing.
I'll be comparing the reports when possible.
Thanks again!

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Oct 2013 19:16
Always glad to help.

The useful log output in the report is also what you would see in the debug output in Eclipse. So, being able to do some testing locally is good for that. But the bug reports for other devices are what you would have to go through from customers and testers.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 22:59:33
Your offset time is: 2024-11-24 22:59:33