Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1462 closed bug (fixed (in master))

Crash loading a graphics .prf file in ascii mode

Reported by: nckmccnnll Owned by: noz
Milestone: 3.3.1 Keywords: crash pref graphics
Cc:

Description

  1. Enter graphics mode
  2. Go to interact with visuals, and dump char/attrs of any sort
  3. Revert to ascii and close the game
  4. Open game again
  5. Segfault!

Change History (11)

comment:1 Changed 8 years ago by nckmccnnll

This was in SDL; in OSX, it just makes stuff invisible.

comment:2 Changed 8 years ago by magnate

Doesn't happen for me in SDL on Linux. I followed your steps exactly, dumping monster attr/chars to the default file (charname.prf). Can you still reproduce it?

comment:3 Changed 8 years ago by nckmccnnll

Yep, I can reproduce it with latest master.

comment:4 Changed 8 years ago by nckmccnnll

From gdb:

Program received signal SIGSEGV, Segmentation fault.
0x00000000004cd51f in sdl_BuildTileset (win=0x737260) at main-sdl.c:3073
3073		ta = GfxSurface->w / info->width;

comment:5 Changed 8 years ago by takkaria

  • Milestone changed from Triage to 3.3.0
  • Status changed from new to confirmed

comment:6 Changed 8 years ago by noz

I can reproduce this. GfxSurface is 0 when not in graphics mode. Haven't got to the bottom of why char/attr with high-bit set are being drawn. I suspect we need to make the pref file loading dependent on the current setting of graphics tile set.

comment:7 Changed 8 years ago by noz

  • Owner set to noz
  • Status changed from confirmed to assigned

comment:8 Changed 8 years ago by magnate

  • Milestone changed from 3.3.0 to 3.4.0

Postponing to 3.4 per IRC

comment:9 Changed 8 years ago by magnate

Thanks to Blubaron for the fix.

comment:10 Changed 8 years ago by magnate

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

comment:11 Changed 8 years ago by magnate

  • Milestone changed from 3.4.0 to 3.3.1
Note: See TracTickets for help on using tickets.