Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [0.31.01] Worldgen Runtime Errors (Possible memory leak?)  (Read 1034 times)

Zombie

  • Bay Watcher
  • Ǵ̨̕o͘d͝d̡͢e̡̕s̷͟s̵͢ ͝of̴ ͡G͘͠a̧mi̶n̛͝g̨
    • View Profile
[0.31.01] Worldgen Runtime Errors (Possible memory leak?)
« on: April 02, 2010, 11:23:25 pm »

NOTE: To avoid wall of text complaints, I'm spoiler-ing each addendum. If you want to know what's going on, feel free to read each section! ;)

So I was super psyched to find 31.01 yesterday with the site update. So psyched, in fact, that I was sure it was an April Fool's joke! ;)

I grabbed my old 40d init file, my graphics, and my favourite tileset and configged 31.01 up all nice just to end up with a hang after selecting something on the main screen. I thought it wouldn't last long, but it lasted about a minute and a half and then a runtime error box popped up telling me that I had somehow killed DF with my insolence or whatever Microsoft is putting in those things nowaday.

I looked in the forums and it seems to have been the graphics set. Okay, so I turn that off. Well it gets to the world gen screen so I think all is well. It gets to around year 800 of history generation and then bam, another runtime error box.

I'm currently testing vanilla DF 31.01 to see if it still wants to crash. It's on year 430 or so, so I'll be back when it's done with my findings.

[ADDENDUMS 1-3]
Spoiler (click to show/hide)

[ADDENDUM 4]
Spoiler (click to show/hide)

[ADDENDUM 5]
Spoiler (click to show/hide)

[ADDENDUM 6]
It seems as if this is a memory issue. Every time I get a runtime error during worldgen, my memory usage is at 83%. I did some digging and a few people are reporting that it only happens with graphics on. I reverted to using the init file I posted in Addendum 5. I turned off graphics and noticed an immediate difference in memory use. I'm trying out genning a large island now.

Whew, it worked!

So, mem usage with graphics off... Before I started DF it was at 20%. With DF started after I chose the world gen choice on main menu, it was at 25%. At the end of world gen it was at 57%.

Mem usage with graphics on? Whew... Before I started DF it was at 20% again... Then I chose world gen. It skyrocketed to 68%. I already know it throws a runtime at around 83%.

It looks like this problem is some kind of memory leak. A quick workaround would be to disable graphics, gen your world, then re-enable them.

If DF is crashing with graphics on just from selecting a menu item, then it is probably looking to load the graphic set, yet encounters some problem when assigning graphics to specific creatures.
« Last Edit: April 03, 2010, 01:17:56 am by Zombie »
Logged
If I had a dollar for every dwarf whose feelings I didn't care about, I'd have seven dollars, with more coming in the fall.

Urist McSharpblade, Axe Sheriff cancels Justice: Needs more than an axe for this.

MULTI-THREADING - I'm talking about it!

Jehdin

  • Bay Watcher
    • View Profile
Re: [0.31.01] Win7 Runtime Errors
« Reply #1 on: April 02, 2010, 11:52:07 pm »

I'm running Windows 7 64-bit, I've had no crashes at all. I've changed the resolution and grid size in the init file, haven't bothered with graphics since it seems to be broken.

I have UAC turned off, though.
Logged

Zombie

  • Bay Watcher
  • Ǵ̨̕o͘d͝d̡͢e̡̕s̷͟s̵͢ ͝of̴ ͡G͘͠a̧mi̶n̛͝g̨
    • View Profile
Re: [0.31.01] Win7 Runtime Errors
« Reply #2 on: April 02, 2010, 11:59:34 pm »

World gen runs perfectly fine in vanilla with no init changes, yet doesn't in vanilla with init changes. Somewhere an init setting likes to mess with worldgen, so I'm attempting to figure it out. I'll update the main post as I go down the list of init files regularly changed.
Logged
If I had a dollar for every dwarf whose feelings I didn't care about, I'd have seven dollars, with more coming in the fall.

Urist McSharpblade, Axe Sheriff cancels Justice: Needs more than an axe for this.

MULTI-THREADING - I'm talking about it!

Zombie

  • Bay Watcher
  • Ǵ̨̕o͘d͝d̡͢e̡̕s̷͟s̵͢ ͝of̴ ͡G͘͠a̧mi̶n̛͝g̨
    • View Profile
Re: [0.31.01] Worldgen Runtime Errors (Possible memory leak?)
« Reply #3 on: April 03, 2010, 01:22:10 am »

Apologies for double posting, but I just wanted to make sure people got to see this and that it didn't float to the bottom without being noticed by people with problems.

Again, the workarounds are simple...

If DF crashes on selecting a main menu item and you have graphics on, you should remove all of the non-dwarf graphics references from the .txt file in the raw > graphics.

If DF crashes during worldgen (usually during history) and you have graphics on, turn graphics off for worldgen. You should be able to re-enable them to play, but they cause memory issues during worldgen.

Without initiating worldgen, DF was at 68% for me. Before history started, it got to around 73%. When history started it quite steadily climbed up at a fairly alarming rate to 83%, when it then threw a runtime error.
Logged
If I had a dollar for every dwarf whose feelings I didn't care about, I'd have seven dollars, with more coming in the fall.

Urist McSharpblade, Axe Sheriff cancels Justice: Needs more than an axe for this.

MULTI-THREADING - I'm talking about it!