Error when closing program cause of running job [message #840860] |
Tue, 10 April 2012 15:40 |
AmFreak Missing name Messages: 25 Registered: June 2011 |
Junior Member |
|
|
Hi,
i have an eclipse rcp app that does some periodically (every 5 seconds) work in a child thread. After the work is done the thread executes a method to update the Status Line of the app to inidicate that the work is finished.
It looks like this:
protected void updateStatusBar()
{
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(MainView.ID).
getViewSite().getActionBars().getStatusLineManager().setMessage("work finished");
}
});
}
It runs fine. The problem i have is when i close my app i get a Null Pointer Exception with this error from time to time:
Quote:
Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.progress.TaskBarProgressManager$2
Seems the program is deconstructing itself while the async job is running. So is there a way to get / wait for the running ui jobs, so that i can make sure the jobs are finsihed before the app is closed? Or a way to cancel them before the app "destroys" itself?
[Updated on: Tue, 10 April 2012 15:41] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03377 seconds