Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322167

Summary: Save action throws NPE when status line manager is not displayed
Product: [RT] RAP Reporter: Matt Rosenberger <mrosenberger>
Component: JFaceAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 Keywords: needinfo
Version: 1.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matt Rosenberger CLA 2010-08-09 13:42:35 EDT
Build Identifier: 20100617-1415

After making changes in my editor I click the Save button (ActionFactory.SAVE).  It invokes my overridden doSave() with no errors.  But then I receive the following exception and my editor is still marked as dirty.

java.lang.NullPointerException
	at org.eclipse.jface.action.StatusLineManager$1.isCanceled(StatusLineManager.java:176)
	at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper.java:267)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:481)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:386)
	at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66)
	at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2540)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:273)
...

If I modify the method new IProgressMonitorWithBlocking().isCanceled() in StatusLineManager.getProgressMonitor() to check for null, then this problem goes away.  A workaround to this issue is to display the status line manager.

Reproducible: Always

Steps to Reproduce:
1.  Create a simple RAP application and hide the status line manager
2.  Modify something in the text editor and click Save
Comment 1 Ivan Furnadjiev CLA 2010-08-10 07:00:03 EDT
Please, provide a snippet to reproduce it.
Comment 2 Ivan Furnadjiev CLA 2010-12-06 05:02:58 EST
Matt, any chance for a snippet to reproduce it?
Comment 3 Ivan Furnadjiev CLA 2011-04-21 04:34:51 EDT
Matt, I still can't reproduce it. Please reopen this bug if the issue persist and you can provide a snippet to reproduce it.