Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004538 [DCSS] Bug Report crash always 2011-09-13 21:31 2011-10-09 00:35
Reporter Tiber View Status public  
Assigned To KiloByte
Priority normal Resolution done  
Status resolved   Product Branch 0.10 ancient branch
Summary 0004538: Post-Tutorial crash
Description In 0.10-a0-673-g33a3bd5 on Windows Vista. Start a tutorial, then use Ctrl-Q to immediately exit. Then go back and create a character in the main game. Race doesn't seem to matter, but class does. Attempting to create characters of certain classes cause a crash with the message ERROR: range check error (-[some number] / 17). This seems to happen with most, but not all of the magic-using classes such as Arcane Marksman, Enchanter, Conjuror, Summoner, etc.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0014909)
kittel (reporter)
2011-09-28 21:39

Hi there,

I am not an expert, but this is what I found after confirming the issue on linux:

1) The reason for the crash is due to a screen update is triggered after the magic user gets a new spell assigned at startup, which triggers a call to get_skill_progress at a point where the skill level has been assigned but before the skill points have been assigned (=> flawed calculations => assert).

2) This early screen update only happens when crawl_state.need_save==true (see the redraw_screen code in stuff.cc), which it is after quitting from a tutorial but not when quitting from e.g. a normal game.

3) The reason the value is different when quitting from a tutorial rather than a normal game can be found in ouch.cc in the ouch(...) function. Here the line which sets crawl_state.need_save=false comes after an " if (crawl_state.game_is_tutorial()) { ... screen_end_game(""); } which actually returns from the function via an exception.

For what is the correct solution, I guess an experienced crawl developer knows better than me, but I tested that it seemed to work if one either put crawl_state.need_save=false inside ouch(..) just before the call to screen_end_game(), or if one put the line in _reset_game() in main.cc.

Hope it helps.

Cheers,
Thomas
(0015107)
KiloByte (manager)
2011-10-09 00:35

kittel: your diagnosis is correct, thanks!

- Issue History
Date Modified Username Field Change
2011-09-13 21:31 Tiber New Issue
2011-09-28 21:39 kittel Note Added: 0014909
2011-09-28 23:53 kittel Issue Monitored: kittel
2011-10-09 00:35 KiloByte Note Added: 0015107
2011-10-09 00:35 KiloByte Status new => resolved
2011-10-09 00:35 KiloByte Fixed in Branch => 0.10 development branch
2011-10-09 00:35 KiloByte Resolution open => done
2011-10-09 00:35 KiloByte Assigned To => KiloByte


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