Bug 322167 - Save action throws NPE when status line manager is not displayed
Summary: Save action throws NPE when status line manager is not displayed
Status: RESOLVED WORKSFORME
Alias: None
Product: RAP
Classification: RT
Component: JFace (show other bugs)
Version: 1.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-08-09 13:42 EDT by Matt Rosenberger CLA
Modified: 2011-04-21 04:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.