Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#6728 closed defect (fixed)

BS1: Crash loading a save game using ScummVM menu while in Bull's head location

Reported by: criezy Owned by: criezy
Priority: normal Component: Engine: Sword1
Version: Keywords:
Cc: Game: Broken Sword 1

Description

ScummVM crashes systematically on both Linux and Mac when loading a save game to a different location while in the lower part of the bull's head.

Some details: This only happens when loading from the ScummVM GUI and not when using the original game load dialog. The location of the load game we load doesn't seem to matter as long as this is not the bull's head. This is with the current ScummVM master (but also happens with version 1.7.0). This is the mac version of the game but the crash happens in some code that is not specific to this version. So it probably crashes as well with the Windows version.

I attached two save game files. To reproduce load the 20 (titled Bug?). The load the other one.

The crash is here:

0 0x08e7d162 in Sword1::Screen::renderParallax (this=0xb6aa250, data=0xb8ebda8 "PARALLAX LAYER")

at engines/sword1/screen.cpp:717

717 if (uint8 skip = src++) { (gdb) p src $1 = (uint8 ) 0xbf8fbe6

Also valgrind doesn't report anything before it gets there.

I don't have the time to look at this now and don't want it to be lost, thus the bug report. But if nobody beats me to it I will have a look at this in a few days.

Ticket imported from: bugs/6728.

Attachments (2)

sword1.019 (1.0 KB ) - added by criezy 10 years ago.
sword1.020 (20.0 KB ) - added by criezy 10 years ago.

Download all attachments as: .zip

Change History (7)

by criezy, 10 years ago

Attachment: sword1.019 added

comment:1 by wjp, 10 years ago

Did you forget to upload the saves?

comment:2 by criezy, 10 years ago

That tracker confuses me. I did select the attachments yesterday but somehow they were not added.

comment:3 by wjp, 10 years ago

Looks like _oldScrollX and _oldScrollY are still set to invalid values by the time it gets to renderParallax() in the new screen for the first time. I'm not sufficiently familiar with Sword1 rendering to say where this should be fixed.

(But maybe reset _oldScrollX and _oldScrollY in newScreen() ? )

comment:4 by wjp, 10 years ago

P.S. "invalid values" = valid for previous screen, invalid for new one.

comment:5 by criezy, 10 years ago

Resolution: fixed
Status: newclosed

comment:6 by criezy, 10 years ago

This was indeed caused by _oldScrollX and _oldScrollY holding invalid values for the new scene. When reloading from the GMM the engine "forgot" to update the screen parameters. This is fixed with commit b783d75f83.

Note: See TracTickets for help on using tickets.