Intermittent major memory leak

Description

We're getting a catastrophic memory leak in Sonic 3D Blast starting a special stage, and one time in lemmings when starting a level. Problem is intermittent. After successful debugging, it appears to be related to the remainingRenderTime variable, in this case in the SN76489 core, but would also affect YM2612. The remainingRenderTime variable appears to be ending up with a negative value somehow. This may occur because reg.GetNextWriteTime() returns a negative value, or it may be due to something else. At any rate, we cast the remainingRenderTime variable to an unsigned int, meaning we get a huge value if this number is negative. This needs to be investigated and fixed.

Environment

None

Status

Assignee

Roger Sanders

Reporter

Roger Sanders

Labels

None

Components

Priority

Blocker