Opened 22 years ago

Closed 22 years ago

Last modified 5 years ago

#251 closed defect (duplicate)

indy3: crash when fighting boxer

Reported by: (none) Owned by:
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Indiana Jones 3

Description

In indy3-256 ("Detected game 'Indiana Jones and the Last Crusade (256)', version 3.0.22"):

1. start the game 2. let the intro finish 3. once in the gym, walk into the locker room 4. walk in to the locker room again (another bug) 5. after entering the boxing ring, choose "I'm out of shape, go easy on me!"

result: first, I see this message in the output window: "WARNING: getResourceAddress Illegal Glob type String (7) num 16385!"

then, a crash.

investigation in the debugger shows:

Scumm::addMessageToStack(unsigned char * 0xda1aff30) line 570 + 17 bytes Scumm::unkAddMsgToStack5(int 0x00004001) line 706 + 30 bytes Scumm::addMessageToStack(unsigned char * 0x02c4b4c8) line 611 + 78 bytes Scumm::drawString(int 0x00000001) line 451 + 55 bytes Scumm::decodeParseString() line 2729 + 28 bytes Scumm::o5_print() line 1741 + 14 bytes Scumm::executeScript() line 280 + 14 bytes Scumm::runScriptNested(int 0x00000004) line 195 + 14 bytes Scumm::runScript(int 0x00000029, int 0x00000000, int 0x00000000, short * 0x0013fd58) line 66 + 30 bytes Scumm::o5_startScript() line 2261 + 78 bytes Scumm::executeScript() line 280 + 14 bytes Scumm::runScriptNested(int 0x00000002) line 195 + 14 bytes Scumm::runScript(int 0x00000023, int 0x00000000, int 0x00000000, short * 0x0013fdf4) line 66 + 30 bytes Scumm::o5_startScript() line 2261 + 78 bytes Scumm::executeScript() line 280 + 14 bytes Scumm::runAllScripts() line 583 + 14 bytes

The pointer passed into addMessageToStack is bogus. It comes from string.cpp, line 704. where getStringAddress is called on variable 16385. The resulting pointer is the bogus one.

Because the pointer is reading from a bogus pointer, there is a possibility this won't cause a crash on some machines/platforms and instead just behave oddly.

Ticket imported from: #555325. Ticket imported from: bugs/251.

Change History (3)

comment:1 by SF/ender, 22 years ago

Duplicate of 555317.

comment:2 by SF/ender, 22 years ago

Resolution: duplicate
Status: newclosed

comment:3 by digitall, 5 years ago

Component: Engine: SCUMM
Game: Indiana Jones 3
Note: See TracTickets for help on using tickets.