Opened 14 years ago
Closed 14 years ago
#5275 closed defect (fixed)
SCI: Bug in file read/write operations
Reported by: | OmerMor | Owned by: | wjp |
---|---|---|---|
Priority: | normal | Component: | Engine: SCI |
Version: | Keywords: | ||
Cc: | Game: | Hoyle's Classic Card Games |
Description
Game version: 2.00/DOS/English ScummVM version: 1.2.0svn52211 Platform: Windows7 32bit
I start a game (crazy eights), select characters (graham, pepper, willy), the game shows a b/w picture and then crashes. The following is printed to the console: picture resource 913 not found!
In DosBox the game works fine so It's not a faulty game.
Ticket imported from: #3049360. Ticket imported from: bugs/5275.
Attachments (2)
Change History (16)
comment:1 by , 14 years ago
Summary: | Crash when starting a game → Hoyle4: Crash when starting a game |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Owner: | set to |
---|
comment:4 by , 14 years ago
Renaming this, it's a general issue with the way we read/write custom game files. Examples are Hoyle 3, Hoyle 4 and Phantasmagoria
comment:5 by , 14 years ago
Summary: | Hoyle4: Crash when starting a game → SCI: Bug in file read/write operations |
---|
by , 14 years ago
Attachment: | hoyle4-game.opt added |
---|
by , 14 years ago
Attachment: | GAME.OPT.zip added |
---|
comment:6 by , 14 years ago
I added game.opt (zipped) from the game folder, and hoyle4-game.opt from scummvm save folder. the problem seems to be that both are present. If only one is present the game works. however, if the file is present in the game folder, than the second one is generated by scummvm in the save folder, and next time the game is started the bugs occurs again.
comment:7 by , 14 years ago
Fixed in rev #52298 (we weren't checking for end of file, or file read errors)
comment:8 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:9 by , 14 years ago
Status: | closed → new |
---|
comment:11 by , 14 years ago
Resolution: | fixed |
---|
comment:12 by , 14 years ago
It looks like this may be caused by fgets_wrapper reading 1 byte if maxsize is 1. If I do *dest = 0 in that case instead of readByte(), the string in game.opt seems to be read more sensibly, and the crash is then gone.
(The current behaviour was added in r47575)
comment:13 by , 14 years ago
After discussing it with thebluegr and m_kiewitz, I've committed this as r52396. Could you verify if that fixes it for you? (I'm leaving comment posting open on this ticket, so you should be able to reply without starting a new ticket this time.)
comment:14 by , 14 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
Status: | new → closed |
It seems you got an invalid game.opt file (which contains the game options that the game saves). Search your game folder (game.opt), or your saves folder (hoyle4-game.opt) and rename it, and please attach it to this bug report