MATLAB: Does MATLAB installation crash near completion on Windows during ‘post installation tasks’


The MATLAB R2010b Windows installation ran to near completion, but at approximately 90% if failed with the following error:
This application encountered an unexpected error and needs to close.
A log file includes the following Java errors:
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
Caused by: java.lang.NullPointerException
at com.mathworks.wizard.ui.components.PrintableEditorPane.setText(
at com.mathworks.wizard.ui.components.PrintableEditorPane.(
at com.mathworks.wizard.ui.components.SwingComponentFactoryImpl.createEditorPane(
at com.mathworks.wizard.ui.components.SwingComponentFactoryImpl.createLabel(
at com.mathworks.wizard.ui.components.SwingComponentFactoryImpl.createOptionPane(
at com.mathworks.wizard.ui.WizardUIImpl.showMessage(
at com.mathworks.wizard.ui.WizardUIImpl.showErrorMessage(
at com.mathworks.installwizard.model.AbstractBackgroundTask$MyFlowControlHandler.alert(
at com.mathworks.installwizard.model.AbstractBackgroundTask$MyFlowControlHandler.alert(
at com.mathworks.install.command.FileCopier.copyFile(

Best Answer

This error is triggered by an I/O exception while trying to copy the uninstaller into the installation. This may be due to limited free space in the selected installation location.
Despite the error, your MATLAB installation is likely complete except for a few non-critical items (the MATLAB shortcut, the uninstaller, etc). You can likely use the existing MATLAB installation. To determine if MATLAB is useable, move into the install location (for example, C:\Program Files\MATLAB\R2010b) and start MATLAB via the "matlab.exe" file found in the bin directory.
You may experience error messages about pathdef.m. In that case, you can run the following commands in MATLAB:
restoredefaultpath; matlabrc
savepath '$MATLAB\toolbox\local\pathdef.m'
(where $MATLAB is your installation folder)
For example:
savepath 'C:\Program Files\MATLAB\R2010b\toolbox\local\pathdef.m'
Once complete, restart MATLAB.
If MATLAB is non-functional, or if you would rather an entirely complete installation, follow the instructions below:
1. Delete the incomplete installation directory, ex:
C:\Program Files\MATLAB\R2010b
2. Clear up drive space in the selected location, or choose an alternate installation location.
3. Reinstall MATLAB.