#913 closed defect (fixed)
[PATCH] Crash starting game on Oasis II
Reported by: | vts | Owned by: | Michael D. Hafer |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 7 |
Component: | Core engine | Keywords: | |
Cc: | Patch: |
Description
Starting a game on Oasis II crashes the game. An PSERROR_File_InvalidType exception is thrown in ps/trunk/ps/FileIo.cpp at line 138, because the file size recorded in the the maps/scenarios/Oasis II.pmp file header does not add up to the actual file size.
Commit [9921] last updated the file to 659.456 bytes, but apparently the filesize recorded in the header did not get updated accordingly. This value should be the total file size minus the header size (which is 12) in little-endian order, so this can be fixed by setting bytes 8-12 to F4 0F 0A 00 (=659.444).
Assigned to Mythos_Ruler as he requested for this to be looked at on IRC. No patch attachment since this is a binary edit.
Change History (6)
follow-up: 3 comment:1 by , 13 years ago
comment:2 by , 13 years ago
Milestone: | Backlog → Alpha 7 |
---|
comment:3 by , 13 years ago
Replying to historic_bruno:
Shouldn't we make some attempt to recover files like this? Maybe notify the user, but continue trying to load the map anyway.
The most common situation will probably be loading files that aren't map files at all, and they'll likely result in crazy memory allocations and nasty crashes if we continue trying to load them, so it's probably better not to do that until we're confident the map loader is robust. Also it would mask whatever error causes invalid files to get generated, so it's probably better to complain fatally about them so we're motivated to find and fix the real problem.
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 8 years ago
Keywords: | review removed |
---|
Eh? This is an interesting problem. Shouldn't we make some attempt to recover files like this? Maybe notify the user, but continue trying to load the map anyway.