Opened 3 years ago

Closed 3 years ago

#12922 closed defect (fixed)

AGS: Assertion error in Time Gentlemen Please and Ben There Dan That

Reported by: tag2015 Owned by: dreammaster
Priority: normal Component: Engine: AGS
Version: Keywords:
Cc: Game:

Description

The latest Steam versions of said games crash with the same message:
Assertion failed: amin <= amax, file /data/src/master/common/util.h, line 74

In "Ben There..." this occurs when entering the first world after the warp animation.
Steps to reproduce:

  1. Click on the open portal

In "Time gentlemen..." this occurs during the initial cutscene, after our heroes build the replacement aerial. This does NOT occur if the intro is skipped.

Attachments (1)

bentheredanthat.002 (641.4 KB ) - added by tag2015 3 years ago.

Download all attachments as: .zip

Change History (4)

by tag2015, 3 years ago

Attachment: bentheredanthat.002 added

comment:1 by antoniou79, 3 years ago

The error message comes from CLIP() calls. It means its parameter limits (amin and amax) are not ordered properly.

However, the real issue here seems to be that a video loop is loaded(?) with 0 number of frames, which then, in conjunction to certain parts of code assuming that num of frames are > 0, results to unforeseen "-1" values. eg. in Object_SetView() (engines\ags\engine\ac\object.cpp)

(int)_G(views)[vidx].loops[loop].numFrames - 1

evaluates to -1

I don't know why the faulty loop has 0 number of frames though.

comment:2 by dreammaster, 3 years ago

More than likely original game errors. The earlier interpreter versions were a bit more sloppy about detecting errors, and tended to simply do array overruns and either crash or not silently. I passed it onto the upstream AGS team. See https://github.com/adventuregamestudio/ags/issues/1412

Once they've come up with a solution, I'll port it to ScummVM master and release branch.

comment:3 by dreammaster, 3 years ago

Owner: set to dreammaster
Resolution: fixed
Status: newclosed

They fixed the problem in upstream, and I've backported the fix to master & the release branch.

Note: See TracTickets for help on using tickets.