On Startup: Error using eval undefined function 'workspacefunc' for input arguments of type 'struct'
이전 댓글 표시
Hi I just installed the student version of Matlab R2014a. I had to go through adding an exception to my bitdefender firewall and reinstalling the Microsoft Visual Studio C++ Redistributables for it to be able to startup. I got that solution from this thread here: http://www.mathworks.com/matlabcentral/answers/97167-why-will-matlab-not-start-up-properly-on-my-windows-based-system .
Now when it does finally start after about 10 minutes after I click on it it gives me the error "Error using eval undefined function 'workspacefunc' for input arguments of type 'struct'" in a dialog box.
It then lists the following:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:242) at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:128) at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1023) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(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) com.mathworks.jmi.MatlabException: Error invoking runtime function. Please refer to error message for detail. at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method) at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:265) at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120) at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1619) at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:197) at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread(GetAppInstallDirectoryWorker.java:20) at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread(GetAppInstallDirectoryWorker.java:7) at com.mathworks.appmanagement.AbstractAppManagementMatlabWorker.runOnMatlabThread(AbstractAppManagementMatlabWorker.java:21) at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79) at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:440)
I've tried uninstalling and reinstalling this a couple times and each time had to add the bitdefender exception and reinstall the C++ redistributables in order to run. Additionally each time I try and do something in the command window such as typing "A = 4" it will pause for about 30 seconds and then pop up the same dialog box with the error using eval. However it will then complete the action and print what A is equal to. Also I tried uninstalling java and reinstalling the latest version, then uninstalled Matlab again and reinstalled with same error happening.
댓글 수: 2
Larry
2014년 9월 6일
I'm getting the same error. (After fixing the issue where the shortcut on the desktop doesn't work and having to redirect the shortcut to the Architecture Specific folder containing MATLAB.exe")
Star Strider
2014년 9월 7일
답변 (2개)
biancasama
2016년 10월 26일
8 개 추천
I had the same problem and I solved by typing "restoredefaultpath;matlabrc". Look at this link: <http://fr.mathworks.com/matlabcentral/answers/39976-error-in-getdefaultuserfolder-at-matlab-startup Error in getDefaultUserFolder at MATLAB startup>
댓글 수: 5
Peeyush Awasthi
2018년 12월 11일
Works fantasticaly for the 377 error code repeated while you do anything on matlab
sumin baek
2019년 6월 30일
Thank youu!!!
I hammered out the problem thanks to you :)
Guodong Ma
2021년 2월 23일
thank you so much!!!
WJ
2021년 5월 7일
This solves the issue temporarily: when I startup Matlab, click away all the errors and run restoredefaultpath;matlabrc , the errors are gone and Matlab functions like it should. However, I have to do it again every time I start Matlab
Mike
2014년 10월 9일
0 개 추천
I had the same issue. You have to edit your matlab.settings file. It seems to be that the entry for the user path is blank in the settings file.
Follow this link to find where to edit the file. Just make up any path and it should work. http://www.mathworks.de/matlabcentral/answers/39976-error-in-getdefaultuserfolder-at-matlab-startup
From above link:
"change the userpath value maually in AppData\Roaming\MathWorks\MATLAB\R2012a\matlab.settings (or corresponding) to (or insert if missing):
name="matlab" ..................................................... name="UserPath" string value<![CDATA[C:\Users\**\Documents\MATLAB]]></value> /string /key
or whatever user path you prefer (the dots correspond to some text I left out). Start MATLAB, enjoy."
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!