Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7034069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:08:29+00:00 2026-05-28T01:08:29+00:00

Guess I found it myself: Apparently the else-if block was detected as unreachable code

  • 0

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 🙁

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:08:30+00:00Added an answer on May 28, 2026 at 1:08 am

    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 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found myself staring at code that looks similar to this: private double? _foo;
Based on example found here but I guess I'm not understanding it. This works
My guess is that class variables (class var) are truly global in storage (that
Yesterday I found myself needing to zoom my Visual Studio text editor and was
Recently i've found myself writing a lot of methods with what i can only
I guess no one was lucky to found the best solution of handling reports
I found all sorts of really close answers already, but not quite. I need
I found big distinction in standard emacs-nox and emacs-gtk. I know that emacs console
I'm trying to teach myself Python and found a couple of exercises online. One
I painted myself into a bit of an annoying corner. I started using RVM

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.