Problem debugging OUYA Android console.

Sysprogs forums Forums VisualGDB Problem debugging OUYA Android console.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #610
    John Gaby
    Participant

    First, let me say that you have a fantastic product. I have used it successfully on a wide variety of Android devices. However, I am trying to debug native code on an OUYA Android console and I am having a problem that I have not seen on other devices. I can set breakpoints, run my app and the debugger will break at the appropriate line. If I immediately continue, everything is fine, but if I wait at a breakpoint for more than a few seconds, it seems like the system is killing and/or suspending the process and I can no longer continue (or inspect data). Since I have only seen this happen with the OUYA system, I suspect that it is something they are doing. However, in discussions on their development forums, I find people who have been able to do native debugging using means other than VisualGDB, and they do not seem to have this issue.

    I was wondering if you have any ideas about what might be going on and how to work around it.

    Thanks.

    #2543
    ket
    Participant

    Hi,

    Could you give us a GDB log of one such occurence? If a gdb timeout happens, it will be shown in the log, as will any other gdb and debugging issues.

    Please go to VisualGDB Project Properties, on the GDB settings page set the option to write diagnostic GDB logs. Then start debugging and replicate your scenario, send us the gdb log file from your project directory.

    #2541
    John Gaby
    Participant

    Ok, here is what I did. I started the app and set a breakpoint. I then executed the code which contained the breakpoint and the program broke like normal. I then waited and eventually the app seemed to close (i.e. the screen went back to the home page). At this point, I can no longer resume or look at data. I have attached the log.

    As a side note, I sometimes have the app close during the startup process. It seems like if the startup takes longer than 20 seconds or so, something kills the app. This may be related to the breakpoint issue.

    Thanks.

    #2542
    ket
    Participant

    Hi,

    Based on the log it is not the gdb that is killing the session. Are there any errors in the logcat? Furthermore, are you able to replicate the same with an hello world app? In other words does the same happen for all breakpoints and apps?

    Btw, based on your log, you are using an older version of VisualGDB, try updating to version 3.1.r5 at least. If you have not updated NDK for a while as well, then update to the latest version r8e.

    #2544
    John Gaby
    Participant

    I will give that a try, thanks.

    #2545
    ket
    Participant

    Hi,

    We looked more into this. It looks like an ANR (Activity Not Responding) issue, the logcat shows that the ActivityManager is killing the app due to it after 5 seconds on inactivity. On usual Android devices it is not an issue, as the device will just show a message asking whether to kill the app off. But on OUYA no message is shown, instead the app is killed off automatically.

    To fix this, you need to select your app on OUYA as the debugged app. This setting is in Manage->Notifications->USB debugging connected->Debugging->Select debug app .

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.