Opened 13 years ago

Closed 12 years ago

#505 closed bug (fixed (in master))

OS X: Beachball crash for r754 opening v3.0.9 savefile with randarts

Reported by: roustk@… Owned by:
Milestone: 3.1.0 Keywords:


Simple sequence which reliably crashes [7f01f7f] (SVN r754) under MacOS 10.5.2:

  1. Open Angband v3.0.9 and create and save a new character (default options plus randarts).
  1. Open Angband v754 and open the saved character.
  1. Angband crashes in one of two modes:
    1. Beachball lockup (requiring force quit).
    2. Angband error popup saying "Out of memory!" while Angband window says
        Loading a 3.0.10 savefile...
        Incompatible random artifacts version!

Failing to open the file is correct behavior; crashing is not.

It appears that the problem lies in load.c in function old_load(). At line 2331, when loading fails, we return -1 into err and:

  if (err) what = "Cannot parse savefile";

Unfortunately, at line 2280, we defined:

  cptr what = "generic";

Why would this be a problem? cptr is a const char * -- we shouldn't assign things to what, and we *really* shouldn't assign a string longer than 7 characters. This causes the memory error, and probably causes the beachball.


Change History (2)

comment:1 Changed 13 years ago by takkaria

  • Summary changed from MacOS: Beachball crash for [7f01f7f] (SVN r754) opening v3.0.9 savefile with randarts to OS X: Beachball crash for [7f01f7f] (SVN r754) opening v3.0.9 savefile with randarts

comment:2 Changed 12 years ago by takkaria

  • Resolution set to fixed
  • Status changed from new to closed

should be fixed in [fa6992f] (SVN r966).

Note: See TracTickets for help on using tickets.