Hi,

I have recently upgraded to OS X 10.6. This seems to have broken the
MATLAB interface. MATLAB crashes on startup when called through
matlab.eval() (but runs fine if I run it directly through the
Terminal). This occurs for MATLAB 2008b and 2009a.

The root cause seems to be that this line:
os.execv('/Applications/MATLAB_R2009a.app/bin/matlab', ['/Applications/
MATLAB_R2009a.app/bin/matlab', '-nodisplay'])
will happily result in a running version of MATLAB when run through
the OS X built-in python (which is version 2.6.1). However, when the
same command is issued within Sage the resulting MATLAB process
crashes on startup (I've appended the MATLAB output to the end of this
message).

This problem does not occur if matlab in the path is a shell script
which uses ssh localhost to execute MATLAB which is how I am working
around it at the moment (I couldn't get "server=localhost" working for
me but that's probably because I don't understand it).

I am using Sage 4.1.1 binary build for OS X 10.5. I tried building
from source but that failed building readline.

I would be keen to help fix this probably if anyone had any pointers
about what might be going on.

Regards,
Jonny


--- MATLAB crash dump ---
sage: os.execv('/Applications/MATLAB_R2009a.app/bin/matlab', ['/
Applications/MATLAB_R2009a.app/bin/matlab', '-nodisplay'])

                            < M A T L A B (R) >
                  Copyright 1984-2009 The MathWorks, Inc.
                  Version 7.8.0.347 (R2009a) 32-bit (maci)
                             February 12, 2009

Opening log file:  /Users/jjh/java.log.14842


------------------------------------------------------------------------
             Bus error detected at Thu Sep  3 01:08:46 2009
------------------------------------------------------------------------

Configuration:
  MATLAB Version:   7.8.0.347 (R2009a)
  MATLAB License:   77603
  Operating System: Darwin 10.0.0 Darwin Kernel Version 10.0.0: Fri
Jul 31 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386
  Window System:    No active display
  Current Visual:   None
  Processor ID:     x86 Family 6 Model 7 Stepping 10, GenuineIntel
  Virtual Machine:  Java 1.6.0_15-b03-219 with Apple Inc. Java HotSpot
(TM) Client VM mixed mode
  Default Encoding:  ISO-8859-1

Fault Count: 1

Register State:
  eax = b0902bb4  ebx = 474e5543
  ecx = 432b2b00  edx = b0902cb4
  esi = b0902998  edi = b0902bb4
  ebp = b0902978  esp = b090295c
  eip = 00000003  flg = 00010286

Stack Trace:
  [0] 0x00000003(0xb0902bb4, 0xb0902998, 0, 0x03600020)
  [1] libSystem.B.dylib:_Unwind_GetLanguageSpecificData~(0xb0902bb4,
0x008f6c2b, 0xb0902a48, 0x00a9ec28) + 24 bytes
  [2] libstdc++.6.dylib:__gxx_personality_v0~(1, 2, 0x432b2b00,
0x474e5543) + 120 bytes
  [3] libgcc_s.1.dylib:_Unwind_RaiseException_Phase2~(0xb0902bb4,
0xb0902c34, 128, 0xb0902bb4) + 102 bytes
  [4] libgcc_s.1.dylib:_Unwind_Resume~(0x05010a30, 0x052d3094, 3,
0xffffffff) + 112 bytes
  [5] libmwm_interpreter.dylib:typeflowPcodeWalker::MathOp(int*, int,
int, int, int, bool)(0xb0902fa4, 0x052d3094, 0xffffffff, 502) + 1283
bytes
  [6] libmwm_interpreter.dylib:typeflowPcodeWalker::ScriptReference
(int*)(0xb0902fa4, 0x052d3094, 0x052d3094, 0) + 221 bytes
  [7] libmwm_interpreter.dylib:typeflowPcodeWalker::walkReport(int,
int*)(0xb0902fa4, 83, 0x052d3094, 0) + 157 bytes
  [8] libmwm_interpreter.dylib:inPcodeWalkerBase::walkPcode(int*)
(0xb0902fa4, 0x052d3088, 0x1601d020, 0xb09033d8) + 619 bytes
  [9] libmwm_interpreter.dylib:inTypeFlow(Mfh_mp*, inMatnumIterator&,
_jitSegInfo*, int)(0x16019030, 0xb09033d8, 0x1601d020, 2) + 82 bytes
  [10] libmwm_interpreter.dylib:inFlowAnalyzeHotSegment(Mfh_mp*,
_jitSegInfo*, bool, int, unsigned long long*)(1287, 0xb09038c0,
0x1601eab0, 0x9046c163) + 15651 bytes
  [11] libmwm_interpreter.dylib:inJit::ExecuteHotSegment
(_inJitAccelInfo*, opcodes*, int*, int*)(0xb0903978, 0xb0903988,
0xb0903984 "????", 0xb0903980) + 715 bytes
  [12] libmwm_interpreter.dylib:inExecuteMFunctionOrScript(Mfh_mp*,
bool)(0x16019030, 1, 0xb0903c5c, 0) + 704 bytes
  [13] libmwm_interpreter.dylib:inRunMfile(int, mxArray_tag**, int,
mxArray_tag**, Mfh_mp*, inWorkSpace_tag*)(0, 0xb0903c5c, 0,
0xb0903cbc) + 696 bytes
  [14] libmwm_interpreter.dylib:Mfh_mp::dispatch_file(int,
mxArray_tag**, int, mxArray_tag**)(0x16019030, 0, 0xb0903c5c, 0) + 56
bytes
  [15] libmwm_dispatcher.dylib:Mfh_file::dispatch_fh(int,
mxArray_tag**, int, mxArray_tag**)(0x16019030, 0, 0xb0903c5c, 0) + 256
bytes
  [16] libmwm_interpreter.dylib:inDispatchFromStack(int, char const*,
int, int)(561, 0x16017f34 "matlabrc", 0, 0) + 998 bytes
  [17] libmwm_interpreter.dylib:inDispatchCall(char const*, int, int,
int, int*, int*)(0, 0xb0903f88, 0x16017f28, 0x004ad580) + 152 bytes
  [18] libmwm_interpreter.dylib:inInterp(inDebugCheck, int, int,
opcodes, inPcodeNest_tag volatile*, int*)(0, 0, 0, 0) + 6161 bytes
  [19] libmwm_interpreter.dylib:protected_inInterp(inDebugCheck, int,
int, opcodes, inPcodeNest_tag*, int*)(0, 0, 0, 0) + 112 bytes
  [20] libmwm_interpreter.dylib:inInterPcodeSJ(inDebugCheck, int, int,
opcodes, inPcodeNest_tag*, int*)(0, 0x16018e30, 0xb090411c,
0x004d6be6) + 266 bytes
  [21] libmwm_interpreter.dylib:inInterPcode(0, 0, 0xb090424c, 0) +
127 bytes
  [22] libmwm_interpreter.dylib:inEvalStringWithIsVarFcn
(_memory_context*, char const*, EvalType, int, mxArray_tag**,
inDebugCheck, _pcodeheader*, int*, bool (*)(void*, char const*),
void*, bool, bool)(0, 0xb09043ac, 0, 0) + 2590 bytes
  [23] libmwm_interpreter.dylib:inEvalCmdWithLocalReturn(char const*,
int*, bool, bool, bool (*)(void*, char const*))(0, 0x004a3b20, 0, 1) +
148 bytes
  [24] libmwm_interpreter.dylib:inEvalCmdWithLocalReturn(0x0040e091
"matlabrc", 0, 1, 0) + 66 bytes
  [25] libmwm_interpreter.dylib:InterpBridge::EvalCmd(char const*,
bool)(0x03612f60, 0x0040e091 "matlabrc", 1, 291481) + 42 bytes
  [26] libmwm_interpreter.dylib:inEvalCmd(0x0040e091 "matlabrc", 1,
0x0032df60 "/Applications/MATLAB_R2009a.app", 0) + 41 bytes
  [27] libmwmcr.dylib:mnRunLoginScript()(0, 0x0382721c, 2011019,
0x0382721c) + 436 bytes
  [28] libmwmcr.dylib:mnRunPathDependentInitialization()(1, 1, 1,
0x0362b160) + 23 bytes
  [29] libmwmcr.dylib:mcrInstance::init_on_interpreter_thread
(MfileReader*, MexFileReader*)(0x03827200, 0x0362b120 "@?1",
0x0362b160, 0) + 941 bytes
  [30]
libmwmcr.dylib:boost::detail::function::function_obj_invoker0<boost::_bi::bind_t<bool,
boost::_mfi::mf2<bool, mcrInstance, MfileReader*, MexFileReader*>,
boost::_bi::list3<boost::_bi::value<mcrInstance*>,
boost::_bi::value<MfileReader*>, boost::_bi::value<MexFileReader*> >
>, bool>::invoke(boost::detail::function::function_buffer&)
(0x036e59c8, 0, 0, 0) + 68 bytes
  [31] libmwmcr.dylib:boost::function0<bool>::operator()() const
(0x036e59c4 "??@", 0x027ca020, 0xb0904ba8, 0x8fe11f5e) + 41 bytes
  [32]
libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::InvocationRequest<bool>::run
()(0x036e59b0, 0x04c2e1f0, 0xb0904b78, 1981026) + 21 bytes
  [33]
libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::invocation_request_handler
(long)(0x036e59b0, 0x04c2e180, 0, 0) + 24 bytes
  [34] libmwservices.dylib:eventqueue::ReadPipe(int)(7, 0, 0, 0) + 38
bytes
  [35]
libmwservices.dylib:eventqueue::UserEventQueueImpl::getNextEventOrBlock
()(0x04c2e190, 0, 0, 0x8fe11f5e) + 398 bytes
  [36] libmwuix.dylib:ws_ProcessPendingEventsHelper(int, int, bool)(1,
0xffffffff, 2199659, 0x00f1a930 "XTUM") + 288 bytes
  [37]
libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::process_events
(boost::shared_ptr<mcr::runtime::InterpreterThread::Impl> const&)
(0x0362b230, 0xb0904e68, 0, 0x0362b1d0 "/Applications/
MATLAB_R2009a.app/..") + 376 bytes
  [38] libmwmcr.dylib:mcr::runtime::InterpreterThread::Impl::run
(boost::shared_ptr<mcr::runtime::InterpreterThread::Impl> const&,
mcr::runtime::InterpreterThread::Impl::init_context*)(0x0362b230,
0xb0904e68, 0xb0984cac, 4033005) + 410 bytes
  [39] libmwmcr.dylib:run_init_and_handle_events(void*)(0xb0984cac, 0,
0, 0) + 52 bytes
  [40] MATLAB:create_mcrInstance_and_run_mnParser(0xb0904f00 "@?@",
8816, 0, 0) + 553 bytes
  [41] MATLAB:start(2, 0xbfffe570, 0xb0905000 "DRHT", 0xffffffff) +
-2223 bytes
  [42] libmwmcr.dylib:runMcrMain(void*)(0xbfffe4e0 "?%", 0x04000000,
1, 0) + 39 bytes
  [43] libSystem.B.dylib:_pthread_start~(0xb0905000 "DRHT", 8707,
4179440, 0xbfffe4e0 "?%") + 345 bytes
  [44] libSystem.B.dylib:thread_start~(0, 0, 0, 0x54485244) + 34 bytes

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 s...@mathworks.com with the following file
attached:
    /Users/jjh/matlab_crash_dump.14842

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.

Attempt to restart MATLAB? [y or n]>>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to