I’m stressing the CodeWarrior debugger a lot: having multiple boards attached, debugging things in parallel, switching and unplugging boards all the time. I have my eclipse IDE running for several days and nights (up to a week or more), with constantly suspending and resuming and switching networks. And sometimes it is my fault (see Device is Secure?). But well, sometimes the CodeWarrior debugger has a problem too. Luckily, a simple trick gets things back on track.
The problems might show up in different ways. But typically I cannot connect any more to my board, or it reports a connection failure. In that case it is worthwhile to quickly press CTRL-ALT-DELETE on Windows to get the Windows Task Manager to get a quick view what the problem could be. And if it shows something like this, I have a problem:
What I can see here in above screenshot is that I have Eclipse CodeWarrior running (cwide.exe). And there is as well the DE.exe which is the Debugger Engine. The Debugger Engine is separate from Eclipse, and Eclipse talks to the debugger using CORBA. CORBA is used as an interface between Java and C/C++ binaries. Obviously the Eclipse IDE is using Java, and the CodeWarrior Debugger in C/C++. The Debugger Engine is launched for the first debugging session, and then stays in memory. That’s the reason why starting the first debug session takes more time than subsequent debugging sessions. The Debugger Engines stays attached with the cwide.exe, and gets terminated when I exit the Eclipse IDE.
It might happen that the DE.exe is having a problem and screwed up. CORBA is using a network protocol, and it could be that with me changing networks all the time it could run into a problem. Exiting the eclipse IDE will shut down as well the DE.exe. So if the DE.exe is still working, that might get rid of a problem. But sometimes this fails, and there is a zombie DE.exe hanging around. And starting a new Eclipse IDE and doing a debug session, might start another instance of DE.exe. And then somehow the cwide.exe might not know to which one it is talking. So having multiple DE.exe or zombies of it (unresponsive instances of DE.exe) is a bad thing.
The solution to that: kill the zombies with the Task Manager. If the Eclipse IDE is still attached to it, I will get this dialog about a CORBA connection error:
Well, that’s ok, as I have shut down the connection the hard way. Not really “Killing Me Softly”, but close :-).
- If I face problems with connecting to my board, I check in the task manager if I have multiple instances of DE.exe (or even multiple cwide.exe instances). If so, I kill them with the task manager.
- If I feel that the Debugger Engine somehow might be screwed up, I kill the DE.exe as well. That saves me to exit the Eclipse IDE and to restart it.
- If all this does not help, well, then it could be that the problem is in the Eclipse IDE. For this I quit the IDE and restart it. But with step 1 and 2 above I can avoid that for a long time.
Happy Killing 🙂