Blaze Tama
Blaze Tama

Reputation: 10948

What should i do, if debug is not working correctly (Eclipse IDE, Android SDK)?

I don't know if this question is suitable for this site or not, but I think this place is better for this kind of question than stackoverflow.

I'm developing an Android application using Eclipse. I always debug and log when I encounter a complex problem/bug when developing apps.

However, this is the first time I encountered a situation where debug and log seem not working correctly. This is what happened:

  1. When I run my apps (using log) : The getView method in my adapter is not called, i know this by using log.
  2. When I debug it step by step : The getView method in my adapter is called, however it gives me the NPE (Null Pointer Exception).
  3. When I debug it, but not step by step : Same like when i run my apps, the program never entered the getView method.

Note : The 3rd means that I set some breakpoints, then I debug what I need to debug (not step by step), then I skip to the next breakpoint, while the 2nd means I debug the apps step by step, not skipping anything.

I have tried to solve this bug for more than 20 hours, but I still can't get things working correctly.

Have you encountered the same problem like mine, while running and debugging a program, or even different method of debugging give you a different result?

What should I do now?

Upvotes: 0

Views: 207

Answers (1)

Sush
Sush

Reputation: 3874

are you working with threads ? if yes please check code your for synchronization blocks. These kind of problems happens when you miss some code blocks for synchronization. Always behavior will be strange.

Upvotes: 1

Related Questions