MATLAB crash when loading configuration MMCore

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MATLAB crash when loading configuration MMCore

Fabien Jammes
Dear all,

We have been using MM through Matlab via the MMCoreJ for 6 month and it was great.
We have an Andor iXon camera and a Nikon Ti. the computer was old and run Windows XP with MATLAB 2013.
We just updated to a new one. Windows 10 / MATLAB 2018.
I did the same setup as before:
- Installed MM (Nightly build 20181101) in a folder without spaces (C:\Micro-Manager-1.4)
- Installed the drivers of camera and microscope -> Micro Manager is working and controlling the setup just fine.
 On MATLAB:
- Created a javaclasspath file through edit([prefdir '/javaclasspath.txt']); and added all jar files that I could find.
- Added a User variable AND system variable in the environment variables in the system.

I was not able to edit the librarypath.txt as new versions of MATLAB apparently protect the file.
The commands in MATLAB:
import mmcorej.CMMCore;
core = CMMCore();
went fine and core is created. However, when I enter this:
core.loadSystemConfiguration('C:\Micro-Manager-1.4\CoreConfig.cfg');
after a small wait MATLAB crash and gives the following message.

 MATLAB crash file:C:\Users\CELLCU~1\AppData\Local\Temp\matlab_crash_dump.14564-1:


--------------------------------------------------------------------------------
          Access violation detected at Fri Nov 02 02:24:19 2018 +0100
--------------------------------------------------------------------------------

Configuration:
  Crash Decoding           : Disabled - No sandbox or build area path
  Crash Mode               : continue (default)
  Default Encoding         : US-ASCII
  Deployed                 : false
  Graphics Driver          : Unknown hardware 
  Graphics card 1          : NVIDIA ( 0x10de ) NVIDIA GeForce GTX 1060 6GB Version 24.21.13.9907 (2018-8-21)
  Java Version             : Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  MATLAB Architecture      : win64
  MATLAB Entitlement ID    : 815975
  MATLAB Root              : C:\Program Files\MATLAB\R2018b
  MATLAB Version           : 9.5.0.944444 (R2018b)
  OpenGL                   : hardware
  Operating System         : Microsoft Windows 10 Education
  Process ID               : 14564
  Processor ID             : x86 Family 6 Model 158 Stepping 10, GenuineIntel
  Session Key              : 6cf28604-7e8b-480d-b79c-b20fe5e4616a
  Window System            : Version 10.0 (Build 16299)

Fault Count: 1


Abnormal termination

I have seen people with similar issues but I couldn't find the solution. Please help  :)3

thanks a million in advance !

--
Best Regards,

Fabien Jammes


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: MATLAB crash when loading configuration MMCore

nanthony
Hi Fabien,

I use a new version of Matlab with Windows 7 to work with micromanager and I
have just been using the StartMMStudio.m matlab file that is included in the
micromanager installation.

So my matlab code just looks like:
        currDir = cd;
        cd('C:\Program Files\Micro-Manager-2.0beta');
        mm = StartMMStudio(); %Get an instance of MMStudio
        cd(currDir)           % load original dir

You can then get the core using: mm.core()

This has worked fine for me. It is worth noting however that I can only run
micromanager once per instance of matlab. If I close micromanager and then
try to open it again without first closing and reopening Matlab I will get a
crash.

Hope that helps,
  Nick



--
Sent from: http://micro-manager.3463995.n2.nabble.com/


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: MATLAB crash when loading configuration MMCore

Stuurman, Nico
In reply to this post by Fabien Jammes
On 11/2/18 6:26 AM, Fabien Jammes wrote:

> We have been using MM through Matlab via the MMCoreJ for 6 month and
> it was great.
> We have an Andor iXon camera and a Nikon Ti. the computer was old and
> run Windows XP with MATLAB 2013.
> We just updated to a new one. Windows 10 / MATLAB 2018.
> I did the same setup as before:
> - Installed MM (Nightly build 20181101) in a folder without spaces
> (C:\Micro-Manager-1.4)
> - Installed the drivers of camera and microscope ->*Micro Manager is
> working and controlling the setup just fine.*
>  On MATLAB:
> - Created a javaclasspath file through edit([prefdir
> '/javaclasspath.txt']); and added all jar files that I could find.
> - Added a User variable AND system variable in the environment
> variables in the system.
>
> I was not able to edit the librarypath.txt as new versions of MATLAB
> apparently protect the file.

I think that is the key to your problem.  You can load the Java code
that "binds" to the compiles C++ code that should be found by Matlab
through the librarypath.txt file content.  Since it does not find the
compiles code, Matlab crashes once you call into the CMMCore object. 
You should contact Mathworks and ask them how to fix this (or ask them
to fix it, you pay them plenty after all).

Best,


Nico



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general