Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse debugger stops by itself without any throwable

Eclipse Debugger suddenly stops not throwing anything:

private void openChannelsListActivity() {
    try{
        Intent gridListIntent=new Intent();
        // the pause is on the following line
        gridListIntent.setClass(this,ChannelsListActivity.class);
        startActivity(gridListIntent);
    }
    catch (Throwable e){
        ErrorMessage.outputMessageByName(
            "channels_list_activity_create",this, " While setting intent.");
        finish();
    }
}

The stack is:

DexFile.defineClass(String, ClassLoader, int, ProtectionDomain) line: not available [native method] 
DexFile.loadClassBinaryName(String, ClassLoader) line: 207  
PathClassLoader.findClass(String) line: 200 
PathClassLoader(ClassLoader).loadClass(String, boolean) line: 551   
PathClassLoader(ClassLoader).loadClass(String) line: 511    
PackVideo.openChannelsListActivity() line: 508  

If I press Resume, the application goes on without any problems. The activity starts OK, but it is not normal behavior and surely means something is wrong. What is it?

The problem is not in waiting; the time from starting the app to this point is about 2 seconds.

It is not an uncaught exception; I turned them off in debugger preferences.

It is not a hidden breakpoint, I have cleaned them all off.

like image 917
Gangnus Avatar asked Jan 18 '12 13:01

Gangnus


3 Answers

A proper solution is to go

Window -> Show View -> Other -> Debug -> Breakpoints

and then on that view click the Remove All Breakpoints button.

Seems eclipse got confused and thought there was a breakpoint where there wasn't

like image 79
JeffG Avatar answered Nov 10 '22 08:11

JeffG


And again it was an Eclipse bug. After some entering and leaving the Eclipse, this behaviour disappeared.

As for cleaning breakpoints, I use it always when there are some problems with breakpoints, for two years already. The problem was deeper this time - I had to enter and exit Eclipse many times - I hadn't counted, there were about 5 of them, I think. And after the last one the problem disappeared. Without the system restart, without any hand-made changes in workspace or Eclipse folders. I think, it is connected with that intellectual behaviour of the debugger, when it stops before the possible break. The Eclipse debugger is buggy and in this, very complicated part, it could be even more buggy.

like image 28
Gangnus Avatar answered Nov 10 '22 10:11

Gangnus


I had the same problem; it was a breakpoint at the declaration of the MyActivity.java class. Apparently, a breakpoint at a class declaration shows up in the editor as a white "C" in green circle, instead of the usual blue dot. I must have fat-fingered something for the breakpoint to have been added there. I deleted the breakpoint and the debugger no longer stops there.

like image 3
strangeluck Avatar answered Nov 10 '22 09:11

strangeluck