Why does passing an invalid property to the WAITFOR function result in a segmentation violation in MATLAB 6.1 (R12.1)?

1 view (last 30 days)
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)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in MATLAB 6.5 (R13). If you are using a previous version, read the following:
There is a bug in MATLAB 6.1 in the way that the WAITFOR function handles arguments which specify invalid properties. To work around this issue, ensure that the WAITFOR function is called with valid object property arguments.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!