MATLAB: Do I receive a “java.lang​.NullPoint​erExceptio​n” error in MATLAB 7.0 (R14) after closing a dialog generated by the INPUTDLG function

canceldialogexceptionexecptioninputjavaMATLABok

I create an input dialog box with the following code:
prompt={'Enter the matrix size for x^2:','Enter the colormap name:'};
name='Input for Peaks function';
numlines=1;
defaultanswer={'20','hsv'};
answer=inputdlg(prompt,name,numlines,defaultanswer)
When I click on the canel button I receive the following error:
java.lang.NullPointerException
at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, there are no workarounds.
Related Question