Dwarf Fortress Bug Tracker - Dwarf Fortress
View Issue Details
0000002Dwarf FortressDwarf Mode -- Embark/Setuppublic2010-04-01 05:292010-06-09 06:45
drowfx 
Toady One 
normalcrashalways
closedfixed 
x86_64Windows 7Professional x64
 
0.31.04 
0000002: Crash when using site finder on large worlds (mem usage >2gb)
When using the site finder on a 257x257 world, the memory consumption rises constantly and when it reaches 2 GiB, DF crashes. I suspect this is because there is no virtual memory left.
1. Create a 257x257 map
2. Start playing, Fortress Mode, Use the site finder, search
3. Watch memory usage climb
4. crash
crash, memory, site finder
has duplicate 0000019closed Footkerchief Crashed during location select 
has duplicate 0000837closed Footkerchief Searching for "Medium Savagery" caused runtime error 
has duplicate 0001055closed Footkerchief Crash while looking for site with Find function 
has duplicate 0000958closed Footkerchief Microsoft Visual C++ Runtime Library Error 
has duplicate 0001221closed Footkerchief Huge RAM problem with site finder 
has duplicate 0001752closed Footkerchief Runtime error/crash when activating serch for an embark spot. 
has duplicate 0000283resolved Footkerchief Crash when searching for an embark location 
has duplicate 0000719resolved Footkerchief "Find desired location" extremly slow 
Issue History
2010-04-01 05:29drowfxNew Issue
2010-04-01 21:28Hyperion2010Issue Monitored: Hyperion2010
2010-04-02 00:00xyloIssue Monitored: xylo
2010-04-02 05:38TodestoolTag Attached: site finder
2010-04-02 12:34xyloNote Added: 0000261
2010-04-03 07:55FootkerchiefCategoryGeneral => Dwarf Mode -- Embark/Setup
2010-04-03 12:10AquillionTag Attached: crash
2010-04-04 06:04drowfxNote Added: 0000854
2010-04-05 12:44HuggzNote Added: 0001168
2010-04-05 14:53FootkerchiefRelationship addedhas duplicate 0000019
2010-04-06 14:27wizjanyNote Added: 0001583
2010-04-08 20:48FootkerchiefRelationship addedhas duplicate 0000837
2010-04-12 13:15FootkerchiefRelationship addedhas duplicate 0001055
2010-04-12 13:21FootkerchiefRelationship addedhas duplicate 0000958
2010-04-12 13:22FootkerchiefSummaryCrash due to memory leak when using site finder => Crash when using site finder on large worlds (mem usage >2gb)
2010-04-12 13:22FootkerchiefSticky IssueNo => Yes
2010-04-13 00:48Kaelem GaenNote Added: 0003217
2010-04-13 19:54ArkaaitoTag Attached: memory
2010-04-13 19:56ArkaaitoNote Added: 0003372
2010-04-13 20:15ArkaaitoIssue Monitored: Arkaaito
2010-04-14 03:55Toady OneNote Added: 0003443
2010-04-14 03:55Toady OneStatusnew => resolved
2010-04-14 03:55Toady OneFixed in Version => 0.31.04
2010-04-14 03:55Toady OneResolutionopen => fixed
2010-04-14 03:55Toady OneAssigned To => Toady One
2010-04-16 01:00FootkerchiefRelationship addedhas duplicate 0001221
2010-05-05 00:07FootkerchiefRelationship addedhas duplicate 0001752
2010-05-05 00:07FootkerchiefIssue Monitored: pollo2019
2010-06-02 13:07FootkerchiefSticky IssueYes => No
2010-06-09 06:45Toady OneStatusresolved => closed
2010-06-22 09:16FootkerchiefRelationship addedhas duplicate 0000283
2010-06-22 09:16FootkerchiefRelationship addedhas duplicate 0001886
2010-06-22 09:16FootkerchiefRelationship deletedhas duplicate 0001886
2010-07-20 09:04FootkerchiefRelationship addedhas duplicate 0000719

Notes
(0000261)
xylo   
2010-04-02 12:34   
The crash @2GB is expected. 32bit windows applications have a 4GB memory space, but only 2GB can be used (the other 2GB is reserved for system use [think stack, etc]). If you're on a 32bit platform, booting with /3GB will move you from a 2GB/2GB process space split to a 3GB/1GB split. This may be enough to work around the crash, as it seems to be close to completing the search -- but I cannot test that now to confirm.

If this is not a memory leak, df.exe either needs to be optimized to use less memory or recompiled to be a 64bit executable. (The 64bit recompile would be nice however :) )
(0000854)
drowfx   
2010-04-04 06:04   
I know that. While it is correct behavior for the application to terminate when its address space is used up, DF should not use that much memory. And using /3GB is not a solution because there are enough applications and drivers that crash and burn when used with it.
(0001168)
Huggz   
2010-04-05 12:44   
Confirmed. The site finder works fine in 40d, but in 0.31.01 it takes FAR longer, and then crashes (for me after around an hour at 200ish/257).
(0001583)
wizjany   
2010-04-06 14:27   
I can confirm this as well. However it's slightly different for me. Just as my memory is filled (2GB, Win7 32 bit) Windows gives me a runtime error: "This program has requested the runtime to terminate it in an unusual way."
(0003217)
Kaelem Gaen   
2010-04-13 00:48   
I can confirm, though I forgot to check the Memory usage. Odd considering I'm on a 64-bit system, but I guess 32bit emulation will still crash if it gets to high.

(I have 8 GB of memory)
(0003372)
Arkaaito   
2010-04-13 19:56   
Confirmed on 64-bit system (Win7 Ultimate).

See also http://www.bay12games.com/dwarves/mantisbt/view.php?id=136, [^] for when you reduce the overall map size just enough to make the finder not crash.
(0003443)
Toady One   
2010-04-14 03:55   
This should be handled for 0.31.04.