Eclipse (Helios) debugger - getting different Results in Debug mode and Run mode

I am debugging RCP( multi-threaded GUI application) using Eclipse Helios.

When I am executing the same method, I get a null pointer exception in run mode, but in

debug mode, I don't get any exception. I think it works fine in Debug mode.

Null pointer exception doesn't come in debug mode , but in run mode only..

Please help me out. Could it be a multi-threading issue.

Answers


You can add a breakpoint to the line that NPE happened in run mode. And you need set the property of breakpoint to pause the entire vm.

Then debugging your program, the entire vm will be suspended when a thread tries to execute that line. You can let other threads which don't try to execute that line to resume, the second thread will be suspended on that line as well. You can analysis the flaw of your code.


Different behavior in run and debug mode is not unusual. Once I spent a day to find that a toString() had side effects. The debugger calls this method when displaying variables. Another reason for differences is concurrency. The execution order in the debugger may be different from run mode.


Need Your Help

Comparing 2 tables for new or updated rows using composite keys

tsql join composite-key

I'm writing tsql for SQL Server 2008. I've got two tables with roughly 2 million rows each. The Source table gets updated daily and changes are pushed to the Destination table based on a last_edit

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.