Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Error running Rick's utilities  (Read 606 times)

Juunana

  • Escaped Lunatic
    • View Profile
Error running Rick's utilities
« on: December 24, 2007, 07:34:00 am »

"Failed to find Dwarf Fortress."  That message has been vexing me of late, especially when there was no trouble with it before.  In an attempt to determine the cause I've tried running other utility programs and they work fine, and I had a friend try out my setup on his computer with no problem.  A problem with the address for the ini file and my computer?  I have no experience with this, so I must turn to you for help!
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Error running Rick's utilities
« Reply #1 on: December 26, 2007, 12:41:00 am »

Okay, we need to know:
* the version of Dwarf Fortress.
* the utility name.
* the utility size in bytes (as a version check).
* the entire contents of the memory.ini you're using.
* what other utilities are working.

Due to a mistake of mine, the wiki's suggested .33g memory.ini was wrong for several hours.  If you are using .33g, deleting memory.ini and recreating it from the wiki page may work.

Logged

Juunana

  • Escaped Lunatic
    • View Profile
Re: Error running Rick's utilities
« Reply #2 on: December 29, 2007, 09:46:00 am »

But of course.  I am using version G of DF, and the related memory.ini file contents from the wiki page for reveal.exe and heal.exe.  Reveal is 129kb and heal is 145; both give the same error message.  In further testing, I was able to get the lava square and enable magma buildings utilities to work, as well as the wonderful regional prospector (which is basically what I was using reveal.exe for).  I am baffled.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Error running Rick's utilities
« Reply #3 on: December 29, 2007, 02:31:00 pm »

Well, it seems that you're up-to-date.  This is puzzling.

"Failed to find Dwarf Fortress."  Rick doesn't make his source code available, but this sounds like the FindWindow() call is failing.  Weird.  heal.exe uses the Unicode version FindWindowW() while my utilities use FindWindowA().  But that shouldn't make a difference.

code:
.text:00404D3C 04C                 push    offset aDwarfFortress_0 ; "Dwarf Fortress"
.text:00404D41 050                 push    offset aOpengl  ; "OpenGL"
.text:00404D46 054                 mov     [esp+54h+exception_level], 0
.text:00404D4E 054                 call    ds:FindWindowW
.text:00404D54 04C                 test    eax, eax
.text:00404D56 04C                 mov     [SELF+4], eax
.text:00404D59 04C                 jnz     short loc_404D80
(elided)
.text:00404D64 050                 mov     [esp+50h+var_3C], offset err1 ; "failed to find Dwarf Fortress"Dwarf Fortress"
(elided)
.text:00404D7B 054                 call    __CxxThrowException@8 ; _CxxThrowException(x,x)

There's nothing there to go wrong.

As a long shot, are you using the same user account to run the utilities as you use to start Dwarf Fortress?  (Vista, in particular, may switch users behind your back.)

As another long shot, what firewall do you use?  And what antivirus?  Do either of them complain about the utilities doing suspicious things?  I imagine they're not popping up warning boxes, but you should check their logs too.

(edit :) As a third long shot, are you using Windows 95, Windows 98, or Windows Millennium?

As for Regional Prospector, you're welcome!

[ December 29, 2007: Message edited by: 0x517A5D ]

Logged