Crash when unpacking data file in MATLAB

Hi Chris,

Hope things are going well at MIT. It’s been a while since I left the lab. Will you be able to help me out with a MWorks question?

I am in the middle of data analyses to finish up an open project from the DiCarlo lab. I need to unpack some old MWorks data to retrieve some content I initially ignored. I have an older version MWorks on my labtop (the one I took w/ me from the lab). I tried to unpack the .mwk file w/ the getCodecs.mexmaci and getEvents.mexmaci I had, but unsuccessfully (I’ve attached the crash report). I previously unpacked data on the setup machines, this is the first time I tried it on my laptop, so I’m not sure if I have the right version of MWorks and so on.

If you can give me an link to the MWorks installer, I can re-install everything and give it another try. If you think this is not related to version issues, some pointers would be really helpful. Please let me know if you need more info.

Thank you! Best,
Nuo


         Bus error detected at Wed Sep 28 08:20:07 2011

Configuration:
MATLAB Version: 7.8.0.347 (R2009a)
MATLAB License: 650662
Operating System: Darwin 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386
Window System: The X.Org Foundation (10402000), display /tmp/launch-Eu1DWx/:0
Current Visual: 0x24 (class 4, depth 24)
Processor ID: x86 Family 6 Model 15 Stepping 11, GenuineIntel
Virtual Machine: Java 1.5.0_16-b06-284 with Apple Inc. Java HotSpot™ Client VM mixed mode, sharing
Default Encoding: ISO-8859-1

Fault Count: 1

Register State:
eax = 00000000 ebx = 32b02775
ecx = 00000000 edx = 329b6920
esi = 00000048 edi = 32b5109a
ebp = b0d1c438 esp = b0d1c420
eip = 32b051e6 flg = 00010282

Stack Trace:
[0] getCodecs.mexmaci:mexVersion~(0x33509000, 0xb0d1c47d, 7, 2) + 12838 bytes
[1] getCodecs.mexmaci:mexVersion~(0x33509000, 0, 0x329b688a “file://./Momotaro/M100616/M10061…”, 0) + 2054 bytes
[2] getCodecs.mexmaci:mexVersion~(0x329b688a “file://./Momotaro/M100616/M10061…”, 0x327d667c “ldobinary:file://./Momotaro/M100…”, 72, 0x32b12800) + 10589 bytes
[3] getCodecs.mexmaci:mexVersion~(0xb0d1cb4c, 0xb0d1ca4c, 0, 0x936dfa63) + 75350 bytes
[4] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0xb0d1c54c) + 75413 bytes
[5] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0) + 75447 bytes
[6] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0) + 75481 bytes
[7] getCodecs.mexmaci:mexVersion~(0xb0d1cb4c, 0xb0d1ca4c, 0, 0x32b1285d) + 75515 bytes
[8] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0x32b12871) + 75549 bytes
[9] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0x32b12885) + 75583 bytes
[10] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0x32b0d137) + 75645 bytes
[11] getCodecs.mexmaci:mexVersion~(0x32b53358, 0xb0d1ca4c, 0xb0d1cb4c, 0) + 75690 bytes
[12] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0x32b53358, 0x327cd868) + 134067 bytes
[13] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0x326de650, 0xa04126d8) + 65559 bytes
[14] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0xb0d1c728 “H«—∞R ±2L —∞LÀ—∞”, 0x32b22703) + 65586 bytes
[15] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0x32b2a90b, 0x32b2ab04) + 65612 bytes
[16] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0x936ab194) + 65648 bytes
[17] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0x32b10be0) + 65682 bytes
[18] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0x32b0d137) + 65716 bytes
[19] getCodecs.mexmaci:mexVersion~(0xb0d1ca4c, 0xb0d1cb4c, 0, 0x90debb48) + 65760 bytes
[20] getCodecs.mexmaci:mexVersion~(0xb0d1cb4c, 0xb0d1cb4c, 0xb0d1cae0, 1) + 45263 bytes
[21] getCodecs.mexmaci:mexVersion~(0xb0d1cb4c, 0xb0d1cb88, 0x32b377c0, 0x90e2420c) + 46487 bytes
[22] getCodecs.mexmaci:mexFunction~(1, 0xb0d1d22c, 1, 0xb0d1d28c) + 271 bytes
[23] libmex.dylib:mexRunMexFile(1, 0xb0d1d22c, 1, 0xb0d1d28c) + 107 bytes
[24] libmex.dylib:Mfh_mex::runMexFileWithSignalProtection(int, mxArray_tag**, int, mxArray_tag**)(0x32714ba0, 1, 0xb0d1d22c, 1) + 111 bytes
[25] libmex.dylib:Mfh_mex::dispatch_file(int, mxArray_tag**, int, mxArray_tag**)(0x32714ba0, 1, 0xb0d1d22c, 1) + 250 bytes
[26] libmwm_dispatcher.dylib:Mfh_file::dispatch_fh(int, mxArray_tag**, int, mxArray_tag**)(0x32714ba0, 1, 0xb0d1d22c, 1) + 256 bytes
[27] libmwm_interpreter.dylib:inDispatchFromStack(int, char const*, int, int)(750, 0x315f646c “getCodecs”, 1, 1) + 998 bytes
[28] libmwm_interpreter.dylib:inCallFcnFromReference(29, 0xffffffeb, 1, 1) + 198 bytes
[29] libmwm_interpreter.dylib:inInterp(inDebugCheck, int, int, opcodes, inPcodeNest_tag volatile*, int*)(1, 0, 32, 0) + 2130 bytes
[30] libmwm_interpreter.dylib:protected_inInterp(inDebugCheck, int, int, opcodes, inPcodeNest_tag*, int*)(1, 0, 2, 0) + 112 bytes
[31] libmwm_interpreter.dylib:inInterPcodeSJ(inDebugCheck, int, int, opcodes, inPcodeNest_tag*, int*)(0, 0x32a677d0 “†v£2∞Ne”, 0xb0d1d6b0, 0xb0d1d6b0) + 266 bytes
[32] libmwm_interpreter.dylib:inExecuteMFunctionOrScript(Mfh_mp*, bool)(0x3277ba10 “Ël∞”, 1, 0xb0d1db18, 0) + 932 bytes
[33] libmwm_interpreter.dylib:inRunMfile(int, mxArray_tag**, int, mxArray_tag**, Mfh_mp*, inWorkSpace_tag*)(0, 0xb0d1db18, 0, 0xb0d1db78) + 696 bytes
[34] libmwm_interpreter.dylib:Mfh_mp::dispatch_file(int, mxArray_tag**, int, mxArray_tag**)(0x3277ba10 “Ël∞”, 0, 0xb0d1db18, 0) + 56 bytes
[35] libmwm_dispatcher.dylib:Mfh_file::dispatch_fh(int, mxArray_tag**, int, mxArray_tag**)(0x3277ba10 “Ël∞”, 0, 0xb0d1db18, 0) + 256 bytes
[36] libmwm_interpreter.dylib:ResolverFunctionDesc::CallFunction(int, mxArray_tag**, int, mxArray_tag**)(0xb0d1e108, 0, 0xb0d1db18, 0) + 793 bytes
[37] libmwm_interpreter.dylib:Resolver::CallMFunction(int, int, _m_operand*, m_operand_storage*, int, _m_operand*, m_operand_storage*, int*)(0xb0d1dce4, 0, 1, 0x32a6b980) + 1446 bytes
[38] libmwm_interpreter.dylib:inResolveMFunctionCall(_m_function_desc*, int, int, _m_operand*, m_operand_storage*, int, _m_operand*, m_operand_storage*, int*, inMarshalType*, int, mpsTypeSequenceNlhs const*, mxArray_tag* ()(int))(0x32a37760, 0, 1, 0x32a6b980) + 474 bytes
[39] libmwm_interpreter.dylib:accelImpl::MFunctionCall(accelOp**)(0xb0d1e254 “»„—∞ƒ„—∞”, 0xb0d1e268, 0x32a668a0, 0x32772fc0 "∞¶2") + 269 bytes
[40] libmwm_interpreter.dylib:accelImpl::Exec()(0xb0d1e254 “»„—∞ƒ„—∞”, 1, 0, 0x32a661e4) + 199 bytes
[41] libmwm_interpreter.dylib:accelCode::Call(inMarshalType
, int*) const(0x32a2f200, 0xb0d1e3c8, 0xb0d1e3c4, 0x00b48e60 “Simple matass on struct array ny…”) + 100 bytes
[42] libmwm_interpreter.dylib:inJit::ExecuteHotSegment(inJitAccelInfo*, opcodes*, int*, int*)(0xb0d1e448 "∞¶2<‰—∞", 0xb0d1e458, 0xb0d1e454 “ˇˇˇˇ”, 0xb0d1e450) + 1338 bytes
[43] libmwm_interpreter.dylib:inExecuteMFunctionOrScript(Mfh_mp*, bool)(0x32a65fb0 “Ël∞”, 1, 0xb0d1e98c, 0) + 704 bytes
[44] libmwm_interpreter.dylib:inRunMfile(int, mxArray_tag**, int, mxArray_tag**, Mfh_mp*, inWorkSpace_tag*)(0, 0xb0d1e98c, 0, 0) + 696 bytes
[45] libmwm_interpreter.dylib:Mfh_mp::dispatch_file(int, mxArray_tag**, int, mxArray_tag**)(0x32a65fb0 “Ël∞”, 0, 0xb0d1e98c, 0) + 56 bytes
[46] libmwm_dispatcher.dylib:Mfh_file::dispatch_fh(int, mxArray_tag**, int, mxArray_tag**)(0x32a65fb0 “Ël∞”, 0, 0xb0d1e98c, 0) + 256 bytes
[47] libmwm_interpreter.dylib:inEvalPcodeHeaderToWord(_memory_context*, int, mxArray_tag**, _pcodeheader*, Mfh_mp*, unsigned int)(1518280, 0, 0xb0d1e98c, 0xb0d1e82c) + 252 bytes
[48] libmwm_interpreter.dylib:inEvalStringWithIsVarFcn(_memory_context*, char const*, EvalType, int, mxArray_tag**, inDebugCheck, _pcodeheader*, int*, bool ()(void, char const*), void*, bool, bool)(0, 0xb0d1e98c, 0, 0) + 1835 bytes
[49] libmwm_interpreter.dylib:inEvalCmdWithLocalReturn(char const*, int*, bool, bool, bool ()(void, char const*))(1, 0x00620b20, 0, 0) + 148 bytes
[50] libmwm_interpreter.dylib:inEvalCmdWithLocalReturn(0x03c7b400 “ExperimentAll_FormatSUAData\n”, 0, 0, 1) + 66 bytes
[51] libmwbridge.dylib:evalCommandWithLongjmpSafety(char const*)(0x03c7b400 “ExperimentAll_FormatSUAData\n”, 1, 0x32768ab8, 0x004b2707) + 108 bytes
[52] libmwbridge.dylib:mnParser(0xb0d1eb24, 0x03842000, 1, 0x02e5ca1c) + 666 bytes
[53] libmwmcr.dylib:mcrInstance::mnParser_on_interpreter_thread()(0x03842000, 1, 0x01010000, 0) + 43 bytes
[54] libmwmcr.dylib:boost::function0::operator()() const(0x32732794 “ˆN”, 0, 0xb0d1ec58, 1023921) + 41 bytes
[55] libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::NoResultInvocationRequest::run()(0x32732780, 0, 0xb0d1ebd8, 1023969) + 21 bytes
[56] libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::invocation_request_handler(long)(0x32732780, 0, 0xb0d1ec28, 0x00447de5) + 24 bytes
[57] libmwuix.dylib:uix_DispatchOrProcess(_XEvent*, _XtAppStruct*, int, bool)(0, 15, 1000000, 0x4e831087) + 476 bytes
[58] libmwuix.dylib:ws_ProcessPendingEventsHelper(int, int, bool)(1, 0xffffffff, 0, 1704553) + 469 bytes
[59] libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::process_events(boost::shared_ptrmcr::runtime::InterpreterThread::Impl const&)(0x03771750, 0xb0d1ee58, 0, 0x037716f0 “/Applications/MATLAB_R2009a.app/…”) + 376 bytes
[60] libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::run(boost::shared_ptrmcr::runtime::InterpreterThread::Impl const&, mcr::runtime::InterpreterThread::Impl::init_context*)(0x03771750, 0xb0d1ee58, 0xb009ec9c, 0x004b39ed) + 410 bytes
[61] libmwmcr.dylib:run_init_and_handle_events(void*)(0xb009ec9c, 0, 0, 0) + 52 bytes
[62] MATLAB:create_mcrInstance_and_run_mnParser(0xb0d1eef0 “@†N”, 8816, 0, 0) + 553 bytes
[63] MATLAB:start(2, 0xbffff4c0, 0, 0x90e13176) + -2223 bytes
[64] libmwmcr.dylib:runMcrMain(void*)(0xbffff430 “‡%”, 0xa016a6e0 “ADHT”, 0xb0d1f000 “DRHT”, 0x00800000) + 39 bytes
[65] libSystem.B.dylib:_pthread_start~(0xb0d1f000 “DRHT”, 12551, 0x004d75f0, 0xbffff430 “‡%”) + 321 bytes
[66] libSystem.B.dylib:thread_start~(0, 0, 0, 0x54485244) + 34 bytes

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 it is an official MathWorks function, please
follow these steps to report this problem to The MathWorks so we
have the best chance of correcting it:

The next time MATLAB is launched under typical usage, a dialog box will
open to help you send the error log to The MathWorks. Alternatively, you
can send an e-mail to segv@mathworks.com with the following file attached:
/Users/linuo/matlab_crash_dump.2010

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

A technical support engineer might contact you with further information.

Thank you for your help. MATLAB may attempt to recover, but even if recovery appears successful,
we recommend that you save your workspace and restart MATLAB as soon as possible.

Hi Nuo,

Good to hear from you!

I don’t see anything in the crash log that suggests the source of the problem. If you want to try again with the latest MWorks release (0.4.5), you can grab it from the downloads page.

Hopefully the new version will just work. If MATLAB still crashes, I’ll probably need a copy of your data file in order to debug the problem.

Chris

Hi Chris,

Thanks for getting back to me so quickly. I tried installing the
newest version of MWorks. Unfortunately, the only mac I have runs OS
10.5, the new MWorks seems to require 10.6.

The data I am trying to unpack was collected on a leopard machine. I
realize this is quite old (the data was collected in 2009 and 2010)
and my problem may be a very particular one since you guys have
already upgraded to Snow Leopard. Do you have something quick handy I
can try out?

Just to give you more information. Here is the link to two example
data file I am trying to unpack:
On the server (the files are too big to send):

/dicarlo/data/Nuo/Physiology Data/Tolerance Learning Reward/Neuronal
Data/Momotaro/M100616/M100616_01RS1.mwk
/dicarlo/data/Nuo/Physiology Data/Tolerance Learning FreeView Size/
Momotaro/M090917/M090917/M090917_01FS1.mwk

I am attaching the mex files I am using.

Thanks!

Nuo

Hi Nuo,

Sorry for the delay in responding. I’ve been out of the office since Wednesday afternoon.

Thanks for the data pointers. I was able to read your files using the current versions of getCodecs/getEvents and MATLAB R2010a. I tried using your mex files, but MATLAB gave me an “unsupported version” error, so presumably they’re too old to use with R2010a.

I’ve attached copies of the current mex files. They don’t depend on any MWorks libraries, so you should be able to use them without MWorks installed. Hopefully, these will work on your machine. If not, please let me know.

Chris

Hi Chris,

I tried the mex files you sent me. I still could not use them. Can I
quickly confirm the Matlab version with you? I am running Matlab
7.10.0.499 (R2010a), 64-bit (maci64). I am running it on Mac OS X
10.5.8

When run on Matlab 2010a, the matlab does not seem to acknowledge the
existence of the mex file, (I was in the directory of the mex file
when I made the call), I get the following error:

??? Undefined function or method ‘getCodecs’ for input arguments of
type ‘char’.

I tried quickly running it on Matlab 2009a, I get the following error:

??? Invalid MEX-file ‘/Users/linuo/Desktop/tmp/getCodecs.mexmaci’:
dlopen(/Users/linuo/Desktop/tmp/getCodecs.mexmaci, 1): no suitable
image found. Did
find:
/Users/linuo/Desktop/tmp/getCodecs.mexmaci: unknown required load
command
0x80000022.

Any suggestions? Thanks!

Nuo

Hey Nuo,

I am running Matlab 7.10.0.499 (R2010a), 64-bit (maci64). I am running it on Mac OS X 10.5.8

When run on Matlab 2010a, the matlab does not seem to acknowledge the
existence of the mex file

The files I sent previously are for 32-bit MATLAB. I’ve attached the 64-bit versions. Can you give these a try in 2010a?

Chris

Hi Chris,

I tried the new files, now I get this error:

??? Invalid MEX-file ‘/Users/linuo/Desktop/tmp/getCodecs.mexmaci64’:
dlopen(/Users/linuo/Desktop/tmp/getCodecs.mexmaci64, 1): no suitable
image found. Did
find:
/Users/linuo/Desktop/tmp/getCodecs.mexmaci64: unknown required load
command
0x80000022.

Nuo

I tried the new files, now I get this error:

OK, that’s probably because they were compiled for 10.6. I recall seeing similar errors in the past involving code compiled for 10.6 and run on 10.5.

At this point, I don’t know what to tell you, other than to suggest that you find a 10.6 machine to unpack these files on. We made the transition to 10.6 quite some time ago, and I no longer have the resources to support 10.5. Sorry!

Chris