Opened 18 years ago

Closed 16 years ago

#600 closed defect (fixed)

FT: regression segfault in minefield

Reported by: SF/khalek Owned by: fingolfin
Priority: high Component: Engine: SCUMM
Keywords: Cc:
Game: Full Throttle

Description

right.. this is a special case, and shouldn't be taken as an indication FT is in any way supported..

to reproduce.. place a bunny on the minefield

scummvm: scumm/script_v2.cpp:405: int Scumm::readArray(int, int, int): Assertion `base >= 0 && base < ah->dim1_size * ah->dim2_size' failed. Aborted

Ticket imported from: #645711. Ticket imported from: bugs/600.

Attachments (1)

ft.s05 (48.6 KB ) - added by SF/khalek 18 years ago.
save

Download all attachments as: .zip

Change History (7)

by SF/khalek, 18 years ago

Attachment: ft.s05 added

save

comment:1 by SF/khalek, 18 years ago

commenting an assertion in readArray fixes this for the time being. closing

comment:2 by SF/khalek, 18 years ago

Owner: set to SF/khalek
Status: newclosed

comment:3 by fingolfin, 16 years ago

I un-uncommented the assert some time ago, and at least with the provided savegame, the problem is still there. At least now we got a better error message:

(95:2010:0x92AF): readArray: array 447 out of bounds: [-1,-1] exceeds [14,27]

Hmm... it tries to access field -1,-1 ??? Strange. I couldn't get hold of a dump of script 95-2010 yet, so I couldn't look into this. If anybody got that one, please attach it to this report. Thanks!

comment:4 by fingolfin, 16 years ago

Owner: changed from SF/khalek to fingolfin
Priority: normalhigh
Status: closednew

comment:5 by fingolfin, 16 years ago

Resolution: fixed
Status: newclosed

comment:6 by fingolfin, 16 years ago

OK, this seems to be a clear script bug: ... [03A7] (5D) if (isAnyOf(array-447[localvar13][localvar14],[0,4])) { [03BD] (5D) if ((localvar13 != -1) && (localvar14 != -1)) { [03CF] (B6) printDebug.begin() [03D1] (B6) printDebug.msg("set last to visited") ... So they first access the array, and only afterwards check the array indices for not being -1 ... ouch! I added a specific workaround to CVS.

Note: See TracTickets for help on using tickets.