RCS file: /cvsroot/scummvm/scummvm/scumm/script.cpp,v
retrieving revision 1.240
diff -u -r1.240 script.cpp
|
|
|
356 | 356 | if (_currentScript == 0xFF) |
357 | 357 | return; |
358 | 358 | |
| 359 | _hangCounter = 0; // See o6_soundKludge() |
| 360 | |
359 | 361 | vm.slot[_currentScript].offs = _scriptPointer - _scriptOrgPointer; |
360 | 362 | } |
361 | 363 | |
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.460
diff -u -r1.460 script_v6.cpp
|
|
|
2250 | 2250 | } |
2251 | 2251 | |
2252 | 2252 | void ScummEngine_v6::o6_soundKludge() { |
| 2253 | // WORKAROUND: At least one of the CMI scripts will busy-wait while |
| 2254 | // piling up calls to soundKludge(). At best, this will cause |
| 2255 | // animations to freeze momentarily. On some platforms, it will cuse |
| 2256 | // ScummVM itself to freeze indefinitely. See bug #1398195. |
| 2257 | |
| 2258 | if (_gameId == GID_CMI && _hangCounter++ > 20) { |
| 2259 | warning("Detected possible hang in script %d", vm.slot[_currentScript].number); |
| 2260 | _scriptPointer--; |
| 2261 | o6_breakHere(); |
| 2262 | return; |
| 2263 | } |
| 2264 | |
2253 | 2265 | int list[16]; |
2254 | 2266 | int num = getStackList(list, ARRAYSIZE(list)); |
2255 | 2267 | |
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.671
diff -u -r1.671 scumm.h
|
|
|
614 | 614 | uint32 _localScriptOffsets[1024]; |
615 | 615 | const byte *_scriptPointer, *_scriptOrgPointer; |
616 | 616 | byte _opcode, _currentScript; |
| 617 | uint32 _hangCounter; |
617 | 618 | const byte * const *_lastCodePtr; |
618 | 619 | int _resultVarNumber, _scummStackPos; |
619 | 620 | int _vmStack[150]; |