[Scummvm-git-logs] scummvm master -> 4e4cfe5494c8415bfbb9af39389dea72e316dd43

mduggan mgithub at guarana.org
Sun Apr 25 02:34:52 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4e4cfe5494 ULTIMA8: Ignore wait requests for terminated processes


Commit: 4e4cfe5494c8415bfbb9af39389dea72e316dd43
    https://github.com/scummvm/scummvm/commit/4e4cfe5494c8415bfbb9af39389dea72e316dd43
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2021-04-25T11:34:35+09:00

Commit Message:
ULTIMA8: Ignore wait requests for terminated processes

This fixes the end of the level in Crusader, but likely fixes some subtle
freeze bugs in U8 too.

The implies opcode was already checking for invalid process IDs (which happens
when speaking to children), but not terminated process IDs. There was a window
where a process could start waiting for an already-terminated process and never
get woken up.

Changed paths:
    engines/ultima/ultima8/kernel/process.cpp


diff --git a/engines/ultima/ultima8/kernel/process.cpp b/engines/ultima/ultima8/kernel/process.cpp
index 8f67e69b53..ec2495c19b 100644
--- a/engines/ultima/ultima8/kernel/process.cpp
+++ b/engines/ultima/ultima8/kernel/process.cpp
@@ -80,6 +80,10 @@ void Process::waitFor(ProcId pid) {
 		// add this process to waiting list of other process
 		Process *p = kernel->getProcess(pid);
 		assert(p);
+		if (p->is_terminated()) {
+			warning("Proc %d wait for proc %d which is already terminated", _pid, pid);
+			return;
+		}
 		p->_waiting.push_back(_pid);
 
 		// Note: The original games sync itemnum between processes




More information about the Scummvm-git-logs mailing list