when I execute the following code in MATLAB 6.1 (R12.1):
h_text=text(1,2,'here we go');waitfor(h_text,'TTT');
I receive a segmentation violation:
Register State: EAX = 00000000 EBX = 0264dd60 ECX = 0149ffb0 EDX = 00000000 ESI = 0149d268 EDI = 02633f68 EBP = 0149d07c ESP = 0149cfa8 EIP = 01529f41 FLG = 00010246 Stack Trace: [0] hg.dll:_hgWaitfor(0, 0x0149d0a0, 2, 0x0149d268) + 161 bytes [1] m_interpreter.dll:_inExecuteInternalFcn(61, 2, 0, 0) + 1122 bytes [2] m_interpreter.dll:_inInterPcode(2, 0x0149dce0, 0, 0) + 2320 bytes [3] m_interpreter.dll:_in_local_call_eval_function(0, 0x0177d840, 0x0149dce0, 0x0149dd74) + 174 bytes [4] m_interpreter.dll:_inEvalStringWithIsVarFcn(0x18361558 "waitfor(h_text,'TTT');\n", 23, 0, 0) + 340 bytes [5] m_interpreter.dll:_inEvalString(0x18361558 "waitfor(h_text,'TTT');\n", 23, 0, 0) + 50 bytes [6] m_interpreter.dll:_inEvalCmdWithLocalReturnandtype(0x18361558 "waitfor(h_text,'TTT');\n", 0, 2, 0x0149dea4) + 68 bytes [7] m_interpreter.dll:_inEvalCmdNoEnd(0x18361558 "waitfor(h_text,'TTT');\n", 0xb0b5389a, 0, 11) + 16 bytes [8] matlab.exe:_mnParser(3342387, 271314, 0, 39) + 980 bytes [9] matlab.exe:_WinMain@16(0x00400000 "MZ", 0, 271314, 1) + 3136 bytes [10] matlab.exe:_WinMainCRTStartup(3342387, 3670072, 0x7ffdd000, 0x8054a938) + 308 bytes [11] kernel32.dll:0x7c816d4f(0x0043e930, 0, 0x00905a4d, 3)
Best Answer