Opened 13 years ago

Closed 12 years ago

#3234 closed defect (fixed)

FW: crash in copier room

Reported by: SF/bramvandijk Owned by: cyxx
Priority: normal Component: Engine: Cine
Keywords: Cc:
Game: Future Wars

Description

-Scummvm 0.10.0pre June 8,
-From the savegame, walk into the secret passage which has already been reveiled. Then look at the "numbered keypad", then thype in the code, by operating the numbers. The code is 40315. It is best to use F1 for examine, and F5 for operate, otherwise, you'll have to be very fast.
After entering the code Scummvm crashes. The console says: Segmentatiefout (core dumped)

reproducable: always,
except when in debugmode. When --debuglevel=1 or 2 the crash does not happen.

-The version and language are: DOS/English
-Compiled myself on linux, G++ 4.1.2
-This doesn't happen in the SVN version of May 29th.

Ticket imported from: #1733238. Ticket imported from: bugs/3234.

Attachments (4)

fw.1 (3.1 KB ) - added by SF/bramvandijk 13 years ago.
scummvm00000.png (18.1 KB ) - added by SF/bramvandijk 13 years ago.
glitch
scummvm00000.2.png (31.7 KB ) - added by SF/bramvandijk 13 years ago.
scummvm00001.png (10.0 KB ) - added by SF/bramvandijk 13 years ago.

Download all attachments as: .zip

Change History (20)

by SF/bramvandijk, 13 years ago

Attachment: fw.1 added

by SF/bramvandijk, 13 years ago

Attachment: scummvm00000.png added

glitch

comment:1 by SF/bramvandijk, 13 years ago

Just played from the beginning, and now it didn't crash, still with the savegame it keeps on crashing in 0.10.0pre. This savegame works however in the snapshot from May 29th.

Another thing is that when it does not crash, there is a strange graphical glitch, see the attached screenshot. A sprite is shown in the top left corner. Again, this does not happen in the SVN version of May 29th.
File Added: scummvm00000.png

comment:2 by sev-, 13 years ago

Ah. That sprite glitch explains it. Apparently that save is pretty old and so-called incrustations do not get saved there. It was fixed quite long ago, but old saves are bad. We can do nothing with fixing them.

comment:3 by sev-, 13 years ago

Owner: set to sev-
Resolution: outdated
Status: newclosed
Summary: Future Wars crashesFW: crash in copier room

comment:4 by SF/bramvandijk, 13 years ago

No, I just made this save today with 0.10.0pre of today. Furthermore, this same savegame works with the may 29th snapshot, without the glitch...

comment:5 by SF/bramvandijk, 13 years ago

Furthermore, the glitch always happens with todays snapshot, unless it crashes. It also happened when I played from the beginning without saving.

comment:6 by eriktorbjorn, 13 years ago

I don't know why, but it looks like drawSprites() is called with a pointer that was freed earlier by o1_unloadMask0().

Furthermore, there's always an invalid read when the warning about the ceiling getting lower. Valgrind claims that drawOverlays() is accessing memory that was probably freed by drawDialogueMessage().

I agree with bramvandijk that this is a regression. I haven't tried to figure out the exact commit that caused it.

comment:7 by eriktorbjorn, 13 years ago

Owner: changed from sev- to cyxx
Priority: normalblocker
Resolution: outdated
Status: closednew

by SF/bramvandijk, 13 years ago

Attachment: scummvm00000.2.png added

comment:8 by SF/bramvandijk, 13 years ago

found 2 other points where the sprite glitch happens... attaching screenshots.
File Added: scummvm00000.png

by SF/bramvandijk, 13 years ago

Attachment: scummvm00001.png added

comment:9 by SF/bramvandijk, 13 years ago

Adding second screenshot.

Had another crash at the end of the the 1304 period. I was teleported away with the girl, and then it crashed. With my last savegame it was not reporoducable, so I did not attach it.
File Added: scummvm00001.png

comment:10 by sev-, 12 years ago

The problem is that I can not reproduce these patches probably because of different memory model in FreeBSD. I think making pointers NULL after releasing them in cyx's patch could help me with tracking this down.

comment:11 by bluegr, 12 years ago

Priority: blockernormal

comment:12 by bluegr, 12 years ago

I've added a workaround for this issue, which was caused by commit #27006. In object.cpp line 163 there was a commented out line, which freed the current list head and was uncommented, which caused the crash, like eriktorbjorn pointed out. I'm not sure why we would want to free the list head while the list is still being accessed, it looks very wrong to me.

Removing this line stops the game from crashing right after the introduction for me (at drawOverlays()), and makes the copier room playable

Lowering the priority of this bug

comment:13 by SF/bramvandijk, 12 years ago

Thanks, I'll this again when I get home...

comment:14 by SF/bramvandijk, 12 years ago

This fixed it for me, it doesn't crash, and doesn't show the sprite anymore in the top-left corner

comment:15 by bluegr, 12 years ago

Is there any reason for keeping this bug report open? Those crashes no longer occur, so the issue itself is fixed, and the problematic line was commented out before the changes anyway

comment:16 by sev-, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.