diff options
author | Neil Moore <neil@s-z.org> | 2014-04-04 19:54:05 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-04-04 20:02:15 -0400 |
commit | f7e08864e5bdc9e44b19a6bf926ee9a665a0613d (patch) | |
tree | d8ddb8f7c019bfe0fab3f63d06b1fcf9682a5bde /crawl-ref/source/dbg-maps.cc | |
parent | fb3cfe924d6a09e984011a1527afca00d5311fa4 (diff) | |
download | crawl-ref-f7e08864e5bdc9e44b19a6bf926ee9a665a0613d.tar.gz crawl-ref-f7e08864e5bdc9e44b19a6bf926ee9a665a0613d.zip |
Don't crash when mapstat vault statistics generation is slow.
We turn on the watchdog during mapstat generation, but writing the log
could take some time because of the calls to mg_find_random_vaults
selecting 10000 random maps per level. Now we pet the watchdog before
writing each level's stats.
Diffstat (limited to 'crawl-ref/source/dbg-maps.cc')
-rw-r--r-- | crawl-ref/source/dbg-maps.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/dbg-maps.cc b/crawl-ref/source/dbg-maps.cc index d328d50aa0..48f659c984 100644 --- a/crawl-ref/source/dbg-maps.cc +++ b/crawl-ref/source/dbg-maps.cc @@ -249,6 +249,9 @@ static void _mapgen_report_available_random_vaults(FILE *outf) for (vector<level_id>::const_iterator i = places.begin(); i != places.end(); ++i) { + // The watchdog has already been activated by mg_do_build_level. + // Reporting all the vaults could take a while. + watchdog(); fprintf(outf, "\n%s -------------\n", i->describe().c_str()); mesclr(); mprf("Examining random maps at %s", i->describe().c_str()); |