MATLAB Answers

Why do I receive the error "The application encountered an unexpected error and needs to close. You may want to try re-installing your product(s)," at 0% when installing MATLAB?

126 views (last 30 days)
When installing MATLAB I get the error above at 0% in the installer. The error additionally suggest looking at the installation log. The installation log has the following error:
java.lang.NullPointerException
    at com.mathworks.install.ComponentSizeAggregator.add(ComponentSizeAggregator.java:13)
    at com.mathworks.install.ProductInstallerImpl.downloadProducts(ProductInstallerImpl.java:143)
    at com.mathworks.install.ProductInstallerImpl.installProducts(ProductInstallerImpl.java:81)
    at com.mathworks.install.InstallerImpl.install(InstallerImpl.java:113)
    at com.mathworks.installwizard.model.InstallTask.execute(InstallTask.java:46)
    at com.mathworks.installwizard.model.AbstractBackgroundTask.execute(AbstractBackgroundTask.java:38)
    at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:74)
    at com.mathworks.installwizard.model.AbstractTask.call(AbstractTask.java:24)
    at com.mathworks.wizard.worker.WorkerImpl.doInBackground(WorkerImpl.java:24)
    at javax.swing.SwingWorker$1.call(SwingWorker.java:296)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at javax.swing.SwingWorker.run(SwingWorker.java:335)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Error: The application encountered an unexpected error and needs to close.  You may want to try re-installing your product(s).  More information can be found at /var/folders/4l/_2c57spd59vcxrz3kb8t3s600000gn/T/mathworks_username.log

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 21 Sep 2017
The issue is likely related to old cached files in the MathWorks folder in Downloads.  Removing this folder will allow the installation to continue.

  6 Comments

Show 3 older comments
Birte Toussaint
Birte Toussaint on 5 Apr 2018
I have deleted th MathWorks folder but am still getting the error message when trying to install a new toolbox. Is there any workaround?
Steven Lord
Steven Lord on 5 Apr 2018
I recommend you contact Technical Support directly using the Contact Us link in the upper-right corner of this page. They can work with you to determine why you're still experiencing this problem and how to correct or avoid it.

Sign in to comment.

More Answers (3)

yangyang
yangyang on 11 Jul 2017
I have the exactly same problem. How did you fix this?

  1 Comment

Anjuri Kelaiya
Anjuri Kelaiya on 21 Feb 2018
Earlier I was trying to install MATLAB 2017b with the floating licenses assigned and it was throwing above error. After that, I have downloaded MATLAB 2017b from mathworks site with the trial license key and it got successfully installed with trial license key. So, I guess there is some problem with the license key which you are using. Please check it and try to install it with proper license key. It should work.

Sign in to comment.


Vasco Sampaio
Vasco Sampaio on 21 Feb 2018
Same problem here! Any updates on this issue? Thanks

  3 Comments

Piriya Sivalingam
Piriya Sivalingam on 7 Jan 2019
You have to delete the folder containing the preleases of MATLAB and also delete the "_temp_matlab_xxxxx_xxxxx" folder which also can contain the preleases file.
So that MATLAB can be installed into a new clean directory.
It worked fine for me.

Sign in to comment.


thurdsak lucksanahut
thurdsak lucksanahut on 7 Mar 2019
You have to change the regional setting to English before matlab installation. Go to Control Panel->Region and Language->Formats->Format:English

  0 Comments

Sign in to comment.

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!