MATLAB: Version R2007b
Labview: Version 8.5 and Version 8.2.1
OS: Windows Vista SP1
Symptoms: VI's containing a MATLAB script node either did not load, took a very long time to load, or produced error 1047 or 1050.
Explanation: Matlab had an error in running as an automation (COM) object and would not load. This is testable by going to the bin directory of matlab (in my case C:\Program Files\MATLAB\R2007b\bin) in a command prompt and typing "matlab -automation". In my case MATLAB did not appear, but typing "matlab -automation -nojvm" did enable MATLAB to appear. Logic dictates this was a JAVA virtual machine problem, looking in the C:\Users\<my user name>\AppData\Local\Temp directory reveals the JAVA log files with a name of the form java.log.<some number>. In my case, the contents looked like this:
Error occurred during initialization of VMCould not reserve enough space for object heapStack Trace: [0] jmi.dll:void __stdcall mwJavaAbort(void)(0x78f95578 "Could not reserve enough space f..", 0, 0x78dd0000, 0x03fe3130 "�N�x") + 21 bytes
------------------------------------------------------------------------ Fatal Java Exception detected at Thu Apr 17 20:17:48 2008------------------------------------------------------------------------
Configuration: MATLAB Version: 7.5.0.342 (R2007b) Operating System: Microsoft Windows Vista Window System: Version 6.0 (Build 6001: Service Pack 1) Processor ID: x86 Family 6 Model 15 Stepping 6, GenuineIntel Virtual Machine: Java is not enabled Default Charset: windows-1252
Java is not enabled
Solution: Following this procedure (<a href="
http://www.campus.uniroma1.it/Licenze/Installazioni/MatLab75/fac/398525.htm" target="_blank">
http://www.campus.uniroma1.it/Licenze/Installazioni/MatLab75/fac/398525.htm</a>) and in particular setting the environment variable "MATLAB_RESERVE_LO=0" fixed the problem. Now when I type "matlab -automation", a matlab window pops up, and Labview is able to run matlab script nodes once more.
I spent a day of my life on this and for the sake of humanity wanted to share the solution - hope it helps!Message Edited by Kevin Parkin on 04-17-2008 10:54 PM