Eclipse debugger freezes but gives no errors - eclipse

I'm debugging someones code, and it freezes when I do something specific, but Eclipse doesn't stop on an error (I may have accidentally turned this off). When I press pause in the debugger, Eclipse shows me a bunch of suspended threads, where two of them are coloured red.
I want to find out if there is an error anywere, or if there's just an infinite loop somewhere (which doesn't seem likely, because Eclipse should break in the loop in that case).
I'd be great if anyone can help me with this Thanks in advance!

Maybe you have a deadlock?
You can use jconsole (goes with java jdk) to find out this. Launch jconsole, attach to your process, go to the Threads tab. Press "Detect deadlock"... It can be also useful to look at all threads states, for example you can have infinity loop in one thread and another thread blocked etc...

I've had this happen to me before, try inserting breakpoints every few lines of code, then stepping through those until it breaks, removing the breakpoints that don't have any errors between them. Remember the line of code that causes it to crash and make whatever changes are necessary to fix it.

Related

VSCode annoying problem focus behavior, keeps jumping to a problem

Last Edit:
It appears I've had an F8 key being pressed non-stop, and it seems to be a shortcut for "Go to Next Error or Warning".
I've wrote a piece of code, it has an error which I'm aware of. Specifically, I'm trying to run a function which doesn't exist yet:
All good, I'm glad it is telling me there's a problem, but... I wish to keep writing stuff in the same file and I simply can't. Every so often the GUI keeps sending the caret (the place where my next piece of text will be written) to the beginning of the problematic piece of code. Simply speaking, I can't keep doing anything until I resolve the problem, since it forcefully intrudes my every action. Even more than that! When I go to a different file, with means of fixing the problem and adding the missing function, it once again interrupts me and forcefully takes me back to the problematic file to show me that there's a problem (??!?!?!). Closing it with "Esc" only closes it once, but it keeps on returning every several seconds.
I don't think it was like that just a week ago, and I didn't install any new plugin since then. I'm currently using the last version, 1.58.2.
How do I stop this work-flow-intruding behavior?
Edit:
I've kept on working for some time and it turns out the issue is much bigger than that. Whenever I type a name of some property, half way through some wild problem would jump and tell me "Cannot find name 'quar'. Did you mean 'quarter'?". The issue is basically the time delay of the problem checks, it's non-existent. It's also too intrusive, moving the caret and jumping between files to show me the existing problems. It's very recent, it didn't happen earlier this week. I've tried disabling different plugins I have and they're not the cause.
This is not exactly your issue, but could be related to what you are experiencing: https://github.com/microsoft/vscode/issues/68776
Try disabling the Outline Explorer and see what happens then.
Furthermore, see if disabling autosave improves anything.

Eclipse not stopping at breakpoints while debugging

I'm debugging a program which works with multiple matrix and the breakpoints are not working. When I start the debugging, a pointer appears indicating where in the code the program stopped. The thing is, this pointer doesn't appear in a line with a breackpoint, it shows up in wherever it suits it and the worst thing is that enters a function which gives me the values of the coordinates in the matrix so you can imagine that I'm in a loop that is hard to get out.
I have tried using the "Step Return" to get out of that function but, as a loop, I always end there again. Also, the "Ignore breakpoints" is not activated.
Have I some debugging option activaded by mistake? thank you for your time
I didn't check the "Breakpoints" window in the "Debugging" prespective thus not seeing that there were some kind of breakpoints that I didn't know about and I don't have any idea appeared. I removed them and I could debug as usual.

Jump/Goto last "running" breakpoint line

I am using Eclipse 3.4 and debugging Java. I have set a couple of breakpoints and that works fine. I run to a line and then it stops. I can inspect and all.
BUT If you I choose to enter a class or more I loose where the breakpoint actually was, that is where the debugger has stopped. I have to keep track of it myself and scroll back and stuff.
I just want to go back to where the last breakpoint was ( that is where the debugger has stopped )
How can I do that?
Thanks!
=== EDIT ===
I know that I can watch the call stack but nothing there is highlighted so it is a bit difficult.
I do not know of such a possibility.
However, depending on the number of active breakpoints you are using, maybe the "Breakpoints" view can help. Here you can see all breakpoints you have defined. If you make a doubleclick on an entry, Eclipse jumps to the corresponding source location.

EXEC BAD ACCESS shows no trace/logs even with NSZombiesEnabled set to YES

I'm not exactly sure how to debug this but it seems that I'm getting EXEC BAD ACCESS in the main function of my app. There's no trace or logs of what's going on. I have NSZombiesEnabled but it doesn't seem to be showing anything. How would I debug this?
The first step in debugging is to find out where the crash happens. To do this you need to be able to reproduce the bug.
The Xcode debugger will usually tell you where the crash happened. It doesn't happen in main(), that's simply the entry point for the app and the top of the call stack. You can zoom in to the call stack with the slider at the bottom of the Debugger pane (in Xcode 4).
If the stack trace doesn't include any of your own code, then you may need to set an exception breakpoint in the Breakpoints pane and try again.
If all else fails, you'll have to do some digging:
1) Find a reproducible case where you can make the app crash every time (or almost every time) using the same actions.
2) Since you know what you're doing to make the app crash, you roughly know where in the code you should look. Set breakpoints at strategic places (or use NSLog). After some fishing, you'll find the exact line where the app crashed.
3) Fix the problem. :-)
It may be helpful.
Mainly you are getting this error because you have released something which is useful in furthur.So try to focus on the release.comment the line where you have used the release
Have you tried too clean and rebuild your project, and restart XCode. Latest versions of Xcode sometimes does EXEC BAD ACCESS int the main function with no reasons…
Turns out, pushing multiple view controllers simultaneously will cause this. Hard to debug that!

Xcode stops at breakpoints and seems to hang

I am trying to debug a small prototype for an iPhone App (iOS Simulator 4.1), compiled as Debug, with all the configuration apparently ok.
The application makes use of Cocos2d graphic engine and GDataXMLNode library (for XML reading). There isn’t much stuff going on. But on certain method, if I set a breakpoint, gdb simply “stops”.
Here’s the status line of the debugger after it hits he breakpoint:
And here’s the code that has the breakpoint(sshot):
note: the breakpoint could be anywhere in that function and it’s the same.
And this is the calling code (from another object)
self.map = [SimulationLoader loadMap];
None of the Editor buttons work when a breakpoint is set inside the “loadMap" (step into, step out, next, continue execution, etc.). I can stop and/or restart the debugging and it works (but goes back to the beginning). The gdb prompt, will let me write, but nothing happens. I cannot view object values or anything debugging related. I cannot resume execution, it won’t do anything.
The strange thing is that, if I put a breakpoint before or after that line (the loadMap), it all works, and I can step out or in, debug it and do all I want to do.
What am I missing?
A couple of seconds after the “failing” breakpoint is hit (and it “hangs”) the stack window clears. I believe all this happens because the gdb has stopped, but the question is, why does it stop there? What are the restrictions for this?
I’m compiling with LLVM GCC 4.2 for what is worth (but could probably change to other if that’s the problem, haven’t tried that because I don’t know much about the differences).
Is there something (maybe in your Map class?) that requires timing? For instance, a double-tap that's being interrupted by the breakpoint's being triggered at that spot?
(i.e., no breakpoint => double-tap registered, Breakpoint => second tap comes after breakpoint hits, so only a single-tap is registered.)
I don't see anything like this in your code specifically, but that's the kind of thing that could show mysteriously different behavior between breakpoints on/off.