Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007342 [DCSS] Bug Report crash always 2013-07-16 06:07 2013-07-25 04:11
Reporter Grandiloquent Gentleman View Status public  
Assigned To MarvinPA
Priority normal Resolution done  
Status resolved   Product Branch 0.13 ancient branch
Summary 0007342: ?/'ing 'M' ante causes invalid tile index assert
Description ASSERT(idx >= TILE_MAIN_MAX && idx < TILEP_PLAYER_MAX) in 'rltiles/tiledef-player.cc' at line 9447 failed.

To reproduce type '?/mante'
My guess is that it is trying to render Anteus on top of something else, but that is just speculation
Relevant part of the stack trace

0x0000000103b35643: write_stack_trace(__sFILE*, int) + 179
0x0000000103b3b138: do_crash_dump() + 792
0x0000000103b35b3d: _crash_signal_handler(int) + 589
0x00007fff8d00692a: _sigtramp + 26
0x0000000000000000: 0x0 + 0
0x0000000103b3b9c2: AssertFailed(char const*, char const*, int, char const*, ...) + 338
0x0000000103fe9644: tile_player_info(unsigned long long) + 68
0x0000000103fc3e53: TilesTexture::get_coords(unsigned long long, int, int, float&, float&, float&, float&, float&, float&, float&, float&, bool, int, int, float, float) const + 63
0x0000000103fc39c6: TileBuffer::add_unscaled(unsigned long long, float, float, int, float) + 138
0x0000000103fd583d: MenuRegion::_place_entries(int, int, int) + 1643
0x0000000103fd4da5: MenuRegion::render() + 31
0x0000000103fdc717: TilesFramework::redraw() + 119
0x0000000103fde370: TilesFramework::getch_ck() + 232
0x0000000103ce5bcb: _getch_mul(int (*)()) + 267
0x0000000103ce5d7d: getchm(KeymapContext, int (*)()) + 45
0x0000000103d5803d: Menu::do_menu() + 61
0x0000000103d53a9f: Menu::show(bool) + 203
0x0000000103b24914: _find_description(bool*, std::string*) + 4532
0x0000000103b258db: _keyhelp_query_descriptions() + 43
0x0000000103b26843: _keyhelp_keyfilter(int) + 19
0x0000000103d54ef4: formatted_scroller::process_key(int) + 28
0x0000000103d5804b: Menu::do_menu() + 75
0x0000000103d53a9f: Menu::show(bool) + 203
0x0000000103d54eab: formatted_scroller::show(bool) + 17
0x0000000103b2cdac: _show_keyhelp_menu(std::vector<formatted_string, std::allocator<formatted_string> > const&, bool, bool, int, std::string) + 1612
0x0000000103b2d349: list_commands(int, bool, std::string) + 169
0x0000000103cf936d: process_command(command_type) + 1277
0x0000000103cfa7c0: _input() + 976
0x0000000103cfb215: _launch_game() + 661
0x0000000103cfb3a5: _launch_game_loop() + 21
0x0000000103cfb5db: SDL_main + 347
Additional Information
Tags No tags attached.
Attached Files ? file icon 0001-Fix-a-tiles-crash-by-disallowing-look-up-of-unspawna.patch [^] (2,186 bytes) 2013-07-22 00:29 [Show Content]

- Relationships

-  Notes
(0023463)
Grandiloquent Gentleman (reporter)
2013-07-16 06:09

Sorry Not ^f should be ?/ Please change title
(0023519)
blackcustard (reporter)
2013-07-22 00:24
edited on: 2013-07-23 18:08

First of all it's Antaeus, not Anteus, and he has nothing to do with this bug. :p. Good guess though.

The search for "ante" was hitting on "antenna" in the description for MONS_SENSED (the dummy monster used to represent a monster that you have detected with demonspawn antenna but cannot see).

The commit message will explain the rest:
Fix a tiles crash by disallowing look up of unspawnable monsters.

The command /?m lets players look up monsters by name and description. Due
to an oversight, _find_description in command.cc sometimes returned the
dummy monster entries for sensed monsters (MONS_SENSED,
MONS_SENSED_FRIENDLY, etc.). When _find_description finds more than one
match, the matches are presented in a menu.

On console, this was strange but functional.

On tiles this resulted in a crash. The menu handling code in menu.cc
expects that all monster tiles are stored in the texture (sprite sheet)
player.png. The tiles for the sensed monster dummies are actually stored
in main.png. When the menu attempted to draw itself, it would essentially
look for the tile in the wrong place and trip this assertion in
tile_player_info in rltiles/tiledef-player.cc:
    "ASSERT(idx >= TILE_MAIN_MAX && idx < TILEP_PLAYER_MAX)"

Change: _find_description now filters out all M_CANT_SPAWN monsters from
the results. The monsters with M_CANT_SPAWN are: M_PROGRAM_BUG (which was
already being explicitly filtered), axed monsters who's data is being
preserved for save compatibility (which were being implicitly filtered
because they did not have descriptions), and base type monsters like
MONS_DRAKE, MONS_MERGED_SLIME_CREATURE and MONS_PLAYER (which also lacked
descriptions).


So I fixed the bug, but there is still some ugliness:

1. When you get an exact match, but you also get a bunch of partial matches, you are presented with the exact match first and are shown the menu only if you press space. The description's footer is supposed to be "?This entry is an exact match for 'FOO'. To see non-exact matches, press space.". If the monster has an extended description, then the footer is supposed to be "Press '!' or Right-click to toggle between the overview and the extended description.". On tiles both footers appear. On console only the second does.

2. The menu driving code in menu.cc is responsible for knowing what texture(/sprite sheet) various tiles(/sprites) are stored in. EDIT: The menu code and the tiles code is really confusing and messy.

(0023522)
Grandiloquent Gentleman (reporter)
2013-07-22 05:20

Yeah, I realised I had Misspelled Antaeus some time afterwards. Thanks!
(0023552)
MarvinPA (developer)
2013-07-25 04:11

Pushed, thanks for the patch!

- Issue History
Date Modified Username Field Change
2013-07-16 06:07 Grandiloquent Gentleman New Issue
2013-07-16 06:09 Grandiloquent Gentleman Note Added: 0023463
2013-07-16 12:45 Medar Summary ^F'ing 'M' ante causes invalid tile index assert => ?/'ing 'M' ante causes invalid tile index assert
2013-07-22 00:24 blackcustard Note Added: 0023519
2013-07-22 00:29 blackcustard File Added: 0001-Fix-a-tiles-crash-by-disallowing-look-up-of-unspawna.patch
2013-07-22 05:20 Grandiloquent Gentleman Note Added: 0023522
2013-07-23 18:08 blackcustard Note Edited: 0023519
2013-07-25 04:11 MarvinPA Note Added: 0023552
2013-07-25 04:11 MarvinPA Status new => resolved
2013-07-25 04:11 MarvinPA Fixed in Branch => 0.13 development branch
2013-07-25 04:11 MarvinPA Resolution open => done
2013-07-25 04:11 MarvinPA Assigned To => MarvinPA


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker