Guess I found it myself: Apparently the else-if block was detected as unreachable code and not compiled into the binary. At least that is my conclusion for now. It’s almost 7am. Will further investigate after a little nap.
I’m totally lost and lost a day already on digging really deep.
I have an android app. At some point, my changes could not be debugged anymore. It seamed to be running stale code. I’ve done all the obvious (Refresh, project clean), less obvious (eclipse -clean, fresh checkout of my project) and last thing I did was:
- download eclipse
- install mercurial and adt
- install android sdk
- checkout my project to a virgin workspace
- run the app in a newly created virtual device
guess what, it still behaves as follows:
When I put a breakpoint at “// breakpoint” pressing F6 (Step Over) I can step through “// 1” and “// 2” although after //1, //2 should be unreachable. Also the debugger knows nothing about the variables in the else-if block while I’m at //1
} else if (column == 4) { // breakpoint
TextView cardSetLabel = (TextView) view;
String name = cursor.getString(cardSetColumnIndex);
name = name.substring(0, Math.min(15, name.length() - 1));
cardSetLabel.setText(name); // 1
return true;
}
return false; // 2
Actually even if I delete the whole surrounding code block, the stuff that it does still remains intact. This is voodoo, sorry.
At least deleting the whole Activity results in the Activity being gone at run time, so the theory of stuff being stale is not really an option.
Please, any help appreciated 🙁
Apparently the else-if block was detected as unreachable code and not compiled into the binary. At least that is my conclusion for now.
Actually I had found out by debugging, that “4” is not the right number and actually a number that is never the value of “column” but I didn’t expect the compiler to know that at compile time 🙁