Opened 6 years ago
Closed 4 years ago
#10643 closed defect (fixed)
CINE: FW - screen change crash
Reported by: | Paparazite | Owned by: | karisal |
---|---|---|---|
Priority: | normal | Component: | Engine: Cine |
Version: | Keywords: | ||
Cc: | Game: | Future Wars |
Description
On Amiga, DOS (Fr version and other ?) ScummVM crash when I found and open ''manhole cover' (2nd screen) in 4315 and I try to return left on 1st screen.
See joined saved game at this point.
Attachments (1)
Change History (7)
by , 6 years ago
Attachment: | fw-amiga-fr-1.1 added |
---|
comment:1 by , 4 years ago
Summary: | FW screen change crash → CINE: FW - screen change crash |
---|
follow-up: 3 comment:2 by , 4 years ago
follow-up: 4 comment:3 by , 4 years ago
Replying to karisal:
I think this may have been a memory corruption problem which got fixed already but not 100% sure.
No, it has not yet been fixed. Tried out the provided savegame with the French Amiga version of Future Wars and it surely crashed when walking to the left of the screen.
ScummVM crashes in FWRenderer::drawOverlays()
function on the renderOverlay(it);
line. Visual Studio 2017 on Windows 7 64-bit said "Access violation reading location 0x00000000.".
void FWRenderer::drawOverlays() { ... Common::List<overlay>::iterator it; for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) { renderOverlay(it); } }
So something to do with the overlay list or its iterator being vaporized/pointing to emptiness.
comment:4 by , 4 years ago
Replying to karisal:
Replying to karisal:
I think this may have been a memory corruption problem which got fixed already but not 100% sure.
No, it has not yet been fixed. Tried out the provided savegame with the French Amiga version of Future Wars and it surely crashed when walking to the left of the screen.
ScummVM crashes in
FWRenderer::drawOverlays()
function on therenderOverlay(it);
line. Visual Studio 2017 on Windows 7 64-bit said "Access violation reading location 0x00000000.".
void FWRenderer::drawOverlays() { ... Common::List<overlay>::iterator it; for (it = g_cine->_overlayList.begin(); it != g_cine->_overlayList.end(); ++it) { renderOverlay(it); } }So something to do with the overlay list or its iterator being vaporized/pointing to emptiness.
Actually it is here it borked:
void FWRenderer::renderOverlay(const Common::List<overlay>::iterator &it) { int idx, len, width; ObjectStruct *obj; AnimData *sprite; byte *mask; switch (it->type) { // color sprite case 0: if (g_cine->_objectTable[it->objIdx].frame < 0) { return; } sprite = &g_cine->_animDataTable[g_cine->_objectTable[it->objIdx].frame]; len = sprite->_realWidth * sprite->_height; mask = new byte[len]; memcpy(mask, sprite->mask(), len);
On the last line, the sprite->mask()
is NULL and that's used as a source for memcpy. So a possible fix could be to just fill the destination mask with zeroes if the source mask is NULL. Let's see...
comment:5 by , 4 years ago
The fix for this bug is waiting for this pull request to be merged into the 2.2.0 branch.
comment:6 by , 4 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
This has been merged.
I think this may have been a memory corruption problem which got fixed already but not 100% sure.