Debugging a Widget causes ANR

by Salv0 » Fri, 14 Jan 2011 21:18:38 GMT


Sponsored Links
 Hi all :)
I'm trying to debug an AppWidget but I incurred in a problem :D If not
setting the breakpoint the widget works good without ANR and the
commands Log.v are executed flawlessly. Then I placed a breakpoint on
the top of the following method:

    public void onReceive(Context context, Intent intent) {
    Log.v(TAG, "onReceive 1"); // BP on this line
    super.onReceive(context, intent);
    String action = intent.getAction();

    // Checks on action and computations ...

    Log.v(TAG, "onReceive 2");
    updateWidget(context);
    Log.v(TAG, "onReceive 3");
}

The breakpoint stops the execution as expected but then the process
dies. The problem is that the breakpoint ( I guess xD ) cause an ANR
and the ActivityManager kills the process. That's the Log:

01-07 14:32:38.886: ERROR/ActivityManager(72): ANR in
com.salvo.wifiwidget
01-07 14:32:38.886: INFO/Process(72): Sending signal. PID: 475 SIG: 9
......
......
01-07 14:32:38.906: INFO/ActivityManager(72): Process
com.salvo.wifiwidget (pid   475) has died.

This cause the debug to stop. So the question is: there's a way to
debug the widget without incurring in the ANR?? thanks in advance for
the answers

-- 



Other Threads

1. Hide address bar while launching native browser



You will need to implement your own browser using WebView. You have no
way of controlling that aspect of the Browser application's behavior
from an SDK application.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 

2. Is the javax.tools and javax security available

When I try to use code similar to that in
http://www.javablogging.com/dynamic-in-memory-compilation/ I
find the classes will compile but get a java.lang.VerifyError on
execution - the class uses
javax.tools.JavaCompiler and javax.tools.ToolProvider and one
supporting class uses
javax.tools.ForwardingJavaFileManager and
java.security.SecureClassLoader -

Any bright ideas - is it OK to use a class loader extending
java.security.SecureClassLoader?

Are these packages unavailable on the android and if so is there a
list of unavailable packages

-- 

3. User name against the default email account of Device?

4. Any way a WebView can show s context menu when not on a link

5. Pagi Semua.....Help abis down to RC29

6. OOT : WTA Account Lockdown

7. Chronometer with Android 2.1 issue