#14601 closed defect (fixed)

ACCESS: File not closed after exit (Guardians of Eden)

Reported by: GandalfTheWhite80 Owned by: PushmePullyu
Priority: normal Component: Engine: Access
Version: Keywords:
Cc: GandalfTheWhite80 Game: Amazon: Guardians of Eden

Description (last modified by GandalfTheWhite80)

  • Start "Amazon: Guardians of Eden"
  • close the game after the intro with the "x"
  • the "TDROM\GAME\ETEXT1.DAT" won't be closed / there is a file lock on this file until closing scummvm
  • svummvm daily (2.8.0/Sep 3.2023)
  • win64 (win10)
  • Amazon: Guardians of Eden GOG Version

Change History (4)

comment:1 by GandalfTheWhite80, 15 months ago

Description: modified (diff)
Summary: ACCESS: File not closed after exitACCESS: File not closed after exit (Guardians of Eden)

comment:2 by GandalfTheWhite80, 15 months ago

Description: modified (diff)

comment:3 by PushmePullyu, 15 months ago

Thanks for the report!

This seems to be a file handle leak caused by the following code:
in engines/access/amazon/amazon_logic.cpp:
in void CampScene::mWhileDoOpen():

if (_vm->_conversation != 2) {
		// Cutscene at start of chapter 1
		screen.setPanel(3);
		_vm->startChapter(1); // <--------- this calls loadEstablish(int)
		_vm->establishCenter(0, 1); // <--- this also calls loadEstablish(int) 
	}

The first call to loadEstablish() assigns a new Resource to Access::Resource *Access::AccessEngine::_establish. This resource holds a file handle for "ETEXT1.DAT".
The second call now reassigns to _establish, so the Resource it pointed to previously is lost, including the file handle.

PR with fix is here: https://github.com/scummvm/scummvm/pull/5310

comment:4 by bluegr, 15 months ago

Owner: set to PushmePullyu
Resolution: fixed
Status: newclosed

Th PR has been merged. Thanks!

Note: See TracTickets for help on using tickets.