Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6078 closed defect (fixed)

TEENAGENT: teenagent.dat considered as a savegame

Reported by: misterhands Owned by: digitall
Priority: normal Component: Engine: TeenAgent
Keywords: Cc:
Game: TeenAgent


Latest win 32 build
Teenagent freeware from GOG

The teenagent.dat file is considered as a savegame.
The symptom is the presence of a phantom savegame (called ,;ØÀéÒ) lurking at the bottom of the save list.
It is associated with savegame 0 meaning that :
- when you save over the phantom, savegame 0 will be overwritten
- when you try to delete it in the save/load dialog, it will actually delete savegame 0, but the phantom won't be deleted.
After that, trying to load the phantom savegame will result in a crash :
Assertion failed: idx < _size, file ./common/array.h, line 157

The cause for this bug is the fact that the names of the save files teenagent.xx and teenagent.dat are very close.
They also both use the same gzip compression, which might be a factor ?

I do have my savegames in the main SCUMMVM directory.
From the user perspective there are 2 simple fixes for this :

Move the savegames elsewhere
remove/rename the teenagent.dat file.

I did the latter and the problem disappeared.
The game did however start normally, so I suspect that the engine data files are now embedded in the SCUMMVM executable.
In that case, I wonder why keep bundling SCUMMVM with these files ?
That's redundant, and also it creates this issue if you have the savegames in the SCUMMVM directory.

Anyway quite an annoying little bug that one, especially at first, before I figured out what was going on.
I'm sure there are some quick and easy ways to fix this though.

Thanks !

Ticket imported from: #3539774. Ticket imported from: bugs/6078.

Change History (9)

comment:1 Changed 7 years ago by lordhoto

This bug is caused by the teenagent engine not doing any validation for savegames, when listing the available savegames.

It lists it's savefiles with a "target.*" mask, which also fits "teenagent.dat", for the default target. Furthermore it uses "atoi" to extract the slot number from the suffix. atoi does not do any error report however, thus the data file will be detected as slot 0.

The easy fix would be to do some proper suffix validation at least, i.e. check it's exactly 2 characters (could be done by using a "target.??" mask) and then checking that the suffix are numeric characters. This would fix the behavior reported in this bug.

comment:2 Changed 7 years ago by lordhoto

Summary: Teenagent : teenagent.dat considered as a savegameTEENAGENT : teenagent.dat considered as a savegame

comment:3 Changed 7 years ago by digitall

Owner: set to digitall
Resolution: fixed
Status: newpending
Summary: TEENAGENT : teenagent.dat considered as a savegameTEENAGENT: teenagent.dat considered as a savegame

comment:4 Changed 7 years ago by digitall

misterhands: Fixed in commit efb1d96d98e7bc856522772bbcdb266e11e26a29. Please confirm with the next daily build.

comment:5 Changed 7 years ago by misterhands

tdhs: it is fixed. Thank you !

before closing this, care to answer my question on the inclusion of engine data files in the scummvm binary ? just curious :-)

comment:6 Changed 7 years ago by digitall

No, you are wrong. The engine data is _not_ embedded in the main executable... hence why the datafile is required.


comment:7 Changed 7 years ago by digitall

Status: pendingclosed

comment:8 Changed 7 years ago by lordhoto

The engine data and theme files are indeed embedded in the ScummVM executable on Windows for some time. There is no reason why they are still kept in the distribution.

comment:9 Changed 7 years ago by misterhands

Thank you my lord for confirming ! :-)

Note: See TracTickets for help on using tickets.