Hello SPM Experts,

For the past few months, I have been having frequent problems with matlab crashing when I run a variety of spm scripts. Below I have included the error message I got most recently. I emailed matlab and I now believe it is spm_global.mexw64 that is giving me problems. I have scoured the archives and the internet to try to figure out how to fix this but I am not very familiar with mex files and have not had any luck so far. Do you have any advice?

Thanks!
Shana


MATLAB crash file:C:\Users\shana\AppData\Local\Temp\matlab_crash_dump.22356-1:


------------------------------------------------------------------------
           In page error detected at Thu May 07 13:15:34 2015
------------------------------------------------------------------------

Configuration:
  Crash Decoding     : Disabled
  Default Encoding   : windows-1252
  MATLAB Architecture: win64
  MATLAB Root        : C:\Program Files\MATLAB\R2014a
  MATLAB Version     : 8.3.0.532 (R2014a)
  Operating System   : Microsoft Windows 7 Enterprise 
  Processor ID       : x86 Family 6 Model 60 Stepping 3, GenuineIntel
  Virtual Machine    : Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  Window System      : Version 6.1 (Build 7601: Service Pack 1)

Fault Count: 1


Abnormal termination:
In page error

Register State (from fault):
  RAX = 000000000000008e  RBX = 000000007133af00
  RCX = 0000000000001d50  RDX = 00000000000001f6
  RSP = 0000000004020b60  RBP = 00000000117c0004
  RSI = 0000000071345ad0  RDI = 00000000117bd510
 
   R8 = 0000000000001d51   R9 = 0000000072fd4c60
  R10 = 0000000000000009  R11 = 0000000070f312c0
  R12 = 000000000000004f  R13 = 000000000000004f
  R14 = 000000007133af00  R15 = 000000007305a8a0
 
  RIP = 0000000010913120  EFL = 00010206
 
   CS = 0033   FS = 0053   GS = 002b

Stack Trace (from fault):
[  0] 0x0000000010913120 C:\Program Files\MATLAB\fMRI\spm12\spm_global.mexw64+00078112 mexFunction+00074016
[  1] 0x0000000010913461 C:\Program Files\MATLAB\fMRI\spm12\spm_global.mexw64+00078945 mexFunction+00074849
[  2] 0x00000000109015d3 C:\Program Files\MATLAB\fMRI\spm12\spm_global.mexw64+00005587 mexFunction+00001491
[  3] 0x0000000010901225 C:\Program Files\MATLAB\fMRI\spm12\spm_global.mexw64+00004645 mexFunction+00000549
[  4] 0x00000000fc5ef711 C:\Program Files\MATLAB\R2014a\bin\win64\libmex.dll+00063249 mexRunMexFile+00000129
[  5] 0x00000000fc5ee1e2 C:\Program Files\MATLAB\R2014a\bin\win64\libmex.dll+00057826 inSwapMexfileReader+00000226
[  6] 0x00000000fc5ef294 C:\Program Files\MATLAB\R2014a\bin\win64\libmex.dll+00062100 _constructor_lm_mexmaci64+00001620
[  7] 0x000000000464be4f C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00048719 Mfh_file::dispatch_fh+00000687
[  8] 0x000000000464c77a C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[  9] 0x000000000479cdfe C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00577022 MathWorks::MException::MExceptionEnvelope::GetID+00371822
[ 10] 0x0000000004799569 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00562537 MathWorks::MException::MExceptionEnvelope::GetID+00357337
[ 11] 0x00000000047b446f C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 12] 0x00000000047b45b8 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 13] 0x00000000047a4a2d C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 14] 0x00000000047a192c C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 15] 0x00000000047b11c9 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 16] 0x000000000464be4f C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00048719 Mfh_file::dispatch_fh+00000687
[ 17] 0x000000000464c77a C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 18] 0x000000000479cdfe C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00577022 MathWorks::MException::MExceptionEnvelope::GetID+00371822
[ 19] 0x0000000004799569 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00562537 MathWorks::MException::MExceptionEnvelope::GetID+00357337
[ 20] 0x00000000047b446f C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 21] 0x00000000047b45b8 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 22] 0x00000000047a4a2d C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 23] 0x00000000047a192c C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 24] 0x00000000047b11c9 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 25] 0x000000000464be4f C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00048719 Mfh_file::dispatch_fh+00000687
[ 26] 0x000000000464c77a C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 27] 0x00000000047f5d06 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00941318 in_is_matlab_function+00012502
[ 28] 0x0000000004805d37 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01006903 inCallFcn+00000071
[ 29] 0x0000000004808735 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01017653 inFullFevalFcn+00000245
[ 30] 0x000000000464c07f C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00049279 Mfh_file::dispatch_fh+00001247
[ 31] 0x000000000464c637 C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00050743 Mfunction_handle::dispatch+00000487
[ 32] 0x000000000480638b C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01008523 inCallFcn+00001691
[ 33] 0x00000000047c5ed7 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00745175 MathWorks::MException::MExceptionEnvelope::GetID+00539975
[ 34] 0x00000000047b0782 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00657282 MathWorks::MException::MExceptionEnvelope::GetID+00452082
[ 35] 0x00000000047a3f6f C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00606063 MathWorks::MException::MExceptionEnvelope::GetID+00400863
[ 36] 0x000000000478cd43 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00511299 MathWorks::MException::MExceptionEnvelope::GetID+00306099
[ 37] 0x000000000479644f C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00549967 MathWorks::MException::MExceptionEnvelope::GetID+00344767
[ 38] 0x0000000004799350 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00562000 MathWorks::MException::MExceptionEnvelope::GetID+00356800
[ 39] 0x00000000047b446f C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 40] 0x00000000047b45b8 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 41] 0x00000000047a4a2d C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 42] 0x00000000047a192c C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 43] 0x00000000047b11c9 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 44] 0x000000000464be4f C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00048719 Mfh_file::dispatch_fh+00000687
[ 45] 0x000000000464c77a C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 46] 0x000000000479cdfe C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00577022 MathWorks::MException::MExceptionEnvelope::GetID+00371822
[ 47] 0x00000000048168a7 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01075367 inEachVisibleName+00016119
[ 48] 0x000000000479ab1a C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00568090 MathWorks::MException::MExceptionEnvelope::GetID+00362890
[ 49] 0x00000000047b446f C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00672879 MathWorks::MException::MExceptionEnvelope::GetID+00467679
[ 50] 0x00000000047b45b8 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00673208 MathWorks::MException::MExceptionEnvelope::GetID+00468008
[ 51] 0x00000000047a4a2d C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00608813 MathWorks::MException::MExceptionEnvelope::GetID+00403613
[ 52] 0x00000000047a192c C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00596268 MathWorks::MException::MExceptionEnvelope::GetID+00391068
[ 53] 0x00000000047b11c9 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+00659913 MathWorks::MException::MExceptionEnvelope::GetID+00454713
[ 54] 0x000000000464c00e C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00049166 Mfh_file::dispatch_fh+00001134
[ 55] 0x000000000464c77a C:\Program Files\MATLAB\R2014a\bin\win64\m_dispatcher.dll+00051066 Mfunction_handle::dispatch+00000810
[ 56] 0x0000000004824a0e C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01133070 inValidateLoadedObject+00003486
[ 57] 0x000000000482bd95 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01162645 inResetInterpreter+00005029
[ 58] 0x0000000004830a05 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01182213 MathWorks::MException::MExceptionEnvelope::Copy+00010997
[ 59] 0x00000000048309d2 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01182162 MathWorks::MException::MExceptionEnvelope::Copy+00010946
[ 60] 0x0000000004830997 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+01182103 MathWorks::MException::MExceptionEnvelope::Copy+00010887
[ 61] 0x0000000004c1e89c C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+05302428 inMexPutVariable+00004204
[ 62] 0x0000000004c1ebf6 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+05303286 inMexPutVariable+00005062
[ 63] 0x0000000004c1f02e C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+05304366 inMexPutVariable+00006142
[ 64] 0x0000000004c1f36c C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+05305196 inMexPutVariable+00006972
[ 65] 0x0000000004b30161 C:\Program Files\MATLAB\R2014a\bin\win64\m_interpreter.dll+04325729 inEvalCmdWithLocalReturn+00000065
[ 66] 0x000000000418becd C:\Program Files\MATLAB\R2014a\bin\win64\libmwbridge.dll+00048845 mnDebugPrompt+00000109
[ 67] 0x000000000418cfaf C:\Program Files\MATLAB\R2014a\bin\win64\libmwbridge.dll+00053167 mnParser+00000735
[ 68] 0x00000000fd0afae4   C:\Program Files\MATLAB\R2014a\bin\win64\mcr.dll+00195300 mcrInstance::mnParser_on_interpreter_thread+00000036
[ 69] 0x00000000fd093af0   C:\Program Files\MATLAB\R2014a\bin\win64\mcr.dll+00080624 mcr::runtime::setInterpreterThreadToCurrent+00029488
[ 70] 0x00000000fd093b50   C:\Program Files\MATLAB\R2014a\bin\win64\mcr.dll+00080720 mcr::runtime::setInterpreterThreadToCurrent+00029584
[ 71] 0x00000000fab6e026   C:\Program Files\MATLAB\R2014a\bin\win64\uiw.dll+00581670 UIW_IsUserMessage+00000086
[ 72] 0x00000000fab6e705   C:\Program Files\MATLAB\R2014a\bin\win64\uiw.dll+00583429 UIW_SetGLIMUserMsg+00000117
[ 73] 0x00000000fab6e789   C:\Program Files\MATLAB\R2014a\bin\win64\uiw.dll+00583561 UIW_SetGLIMUserMsg+00000249
[ 74] 0x00000000777887fe                     C:\Windows\system32\USER32.dll+00165886 GetMenuBarInfo+00000638
[ 75] 0x000000007776f5fb                     C:\Windows\system32\USER32.dll+00062971 SystemParametersInfoW+00000235
[ 76] 0x0000000077774895                     C:\Windows\system32\USER32.dll+00084117 IsProcessDPIAware+00000465
[ 77] 0x00000000779cdae5                      C:\Windows\SYSTEM32\ntdll.dll+00318181 KiUserCallbackDispatcher+00000031
[ 78] 0x000000007777908a                     C:\Windows\system32\USER32.dll+00102538 PeekMessageW+00000186
[ 79] 0x00000000777750fe                     C:\Windows\system32\USER32.dll+00086270 GetKeyState+00000238
[ 80] 0x0000000077773a6f                     C:\Windows\system32\USER32.dll+00080495 PeekMessageA+00000087
[ 81] 0x00000000fab1bd4b   C:\Program Files\MATLAB\R2014a\bin\win64\uiw.dll+00245067 UIW_SetCurrentDialog+00000731
[ 82] 0x00000000fab6fbe2   C:\Program Files\MATLAB\R2014a\bin\win64\uiw.dll+00588770 ws_FreeSystemFont+00000482
[ 83] 0x00000001000e2ed0 C:\Program Files\MATLAB\R2014a\bin\win64\libmwservices.dll+00995024 services::system_events::PpeDispatchHook::~PpeDispatchHook+00053488
[ 84] 0x00000001000e36a5 C:\Program Files\MATLAB\R2014a\bin\win64\libmwservices.dll+00997029 services::system_events::PpeDispatchHook::~PpeDispatchHook+00055493
[ 85] 0x00000001000e4330 C:\Program Files\MATLAB\R2014a\bin\win64\libmwservices.dll+01000240 services::system_events::PpeDispatchHook::~PpeDispatchHook+00058704
[ 86] 0x00000001000ed4c6 C:\Program Files\MATLAB\R2014a\bin\win64\libmwservices.dll+01037510 sysq::removeProcessPendingEventsHook+00011030
[ 87] 0x00000001000ed7ca C:\Program Files\MATLAB\R2014a\bin\win64\libmwservices.dll+01038282 svWS_ProcessPendingEvents+00000138
[ 88] 0x00000000fd094b6d   C:\Program Files\MATLAB\R2014a\bin\win64\mcr.dll+00084845 mcr::runtime::setInterpreterThreadToCurrent+00033709
[ 89] 0x00000000fd094e3b   C:\Program Files\MATLAB\R2014a\bin\win64\mcr.dll+00085563 mcr::runtime::setInterpreterThreadToCurrent+00034427
[ 90] 0x00000000fd088b75   C:\Program Files\MATLAB\R2014a\bin\win64\mcr.dll+00035701 mcrInstantiationError::operator=+00003221
[ 91] 0x00000000fd08bea2   C:\Program Files\MATLAB\R2014a\bin\win64\mcr.dll+00048802 mcr_invoke_on_interpreter_thread+00001602
[ 92] 0x00000000fa7e6e5d C:\Program Files\MATLAB\R2014a\bin\win64\MVMLocal.dll+00159325 mvm_server::inproc::LocalFactory::createMVM+00040653
[ 93] 0x000000000520afaa   C:\Program Files\MATLAB\R2014a\bin\win64\mvm.dll+00569258 mvm::detail::SessionImpl::privateSession+00001754
[ 94] 0x000000000520d32a   C:\Program Files\MATLAB\R2014a\bin\win64\mvm.dll+00578346 mvm::detail::SessionImpl::privateSession+00010842
[ 95] 0x000000000520ce85   C:\Program Files\MATLAB\R2014a\bin\win64\mvm.dll+00577157 mvm::detail::SessionImpl::privateSession+00009653
[ 96] 0x0000000140004f79 C:\Program Files\MATLAB\R2014a\bin\win64\MATLAB.exe+00020345
[ 97] 0x0000000140006a07 C:\Program Files\MATLAB\R2014a\bin\win64\MATLAB.exe+00027143
[ 98] 0x00000000778759cd                   C:\Windows\system32\kernel32.dll+00088525 BaseThreadInitThunk+00000013
[ 99] 0x00000000779ab891                      C:\Windows\SYSTEM32\ntdll.dll+00178321 RtlUserThreadStart+00000033


This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If this problem is reproducible, please submit a Service Request via:
    http://www.mathworks.com/support/contact_us/

A technical support engineer might contact you with further information.

Thank you for your help.