Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 13

Author Topic: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-04-02  (Read 65576 times)

Catinthewall

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #60 on: January 15, 2009, 09:19:29 am »

okay, this is strange, DM .3 works fine with 40d, but 40d8 and 40d9 give the "Object Reference not set to an instance of an object." error.
Which is strange..
from the memorylayouts.xml: Name="v0.28.181.40d" CheckSum="0x032e4b67"
from HxD: Checksum-32: 257FC437
CRC-32: 9FD271D8
I can't figure out how DM is getting the checksum in a way that allows 40d to run, when HxD won't corroborate.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #61 on: January 15, 2009, 03:10:05 pm »

You lost me.  What is HxD?

Dwarf Foreman checksums the first 0x1000 bytes of the DF executable, which includes the .EXE PE header and some 0x0C00 bytes of code.  It does not checksum the entire DF executable.  Moreover, it does not use a widely-known algorithm like CRC32, but uses what appears to be a home-grown method.

Since Dwarf Manager's checksums are the same, it must use the same algorithm.
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #62 on: January 15, 2009, 03:18:48 pm »

Actually if you READ the license of DWARF FOREMAN the program you used code from, You MUST give everyone access to your source code otherwise you have no right to use it.

Note that if the author reimplements everything from scratch rather than actually cut-and-pasting or otherwise copying, the resulting program is not covered by the original program's license.

It can be hard to prove this, which is why serious projects that have a good chance of facing legal challenge do the reimplementation using the "clean-room" method -- one team does the reverse engineering, writing up every little detail in English, and sends their results to a second team which does the new coding.

Point is, there may not be any code reuse.  Given that Manger is in a different language than Foreman, that seems likely to me.
Logged

Catinthewall

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #63 on: January 15, 2009, 04:21:12 pm »

HxD is a freeware hex editor, which explains why I wasn't getting the checksums. Anyone have a quick utility to output this DFchecksum?

He did borrow code from DForeman. IANAL, but I would suggest releasing the 0.3 code ASAP, and 'cleaning up' the source for version 0.4.

As for the square sizes determining the skill level, could I suggest using numbers? 0 for not/dabbling, 1 for novice, etc. Maybe keep the squares for the jobs where skill only determines speed of the creation.


Edit: Clean  copies of DF 40d9 and DM 0.3, On an XP machine it works perfectly. on vista, it gives the error message again.  ???

Spoiler (click to show/hide)
« Last Edit: January 16, 2009, 04:26:35 am by Catinthewall »
Logged

profit

  • Bay Watcher
  • Finely Crafted Engravings... Or it didn't happen.
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #64 on: January 16, 2009, 02:46:22 pm »

Try disabling UAC on vista running it as an administrator, and see if it still throws this error.

i am betting it is not allowing memory injection of a separate process.


Logged
Mods and the best utilities for dwarf fortress
Community Mods and utilities thread.

Catinthewall

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #65 on: January 16, 2009, 03:45:39 pm »

Trying that now, will update if it works. I doubt it though, because 40d works fine as it is, it only refuses to work with the 40d8/9 builds.
Logged

codewright

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #66 on: January 16, 2009, 04:02:23 pm »

Funny thing is, I did not use any of the Foreman code, but rather looked at it for some initial inspiration. It is indeed hard to figure out what falls under GPL restrictions and what not, but even then that's a matter between me and Ben. And then the code needs to contain the GPL as well.

Try disabling UAC on vista running it as an administrator, and see if it still throws this error.

i am betting it is not allowing memory injection of a separate process.
As far as I know, you'll definitely need to do this. Vista is a bit stingy when programs try to modify the memory of other programs (which is, frighteningly, no problem in XP). But then, I guess, you'd get an error indicating an access violation.

Well, the exe name was part of my problem with Foreman.  After changing that I got further... and may have got something that may show where my issue with Manager is too.

After changing the name and running foreman, I get the "I am not sure this is the right version of Dwarf Fortress" message, but my check value from that message is fd3559a4, instead of the one listed on the discussion page of the wiki for 40d9 (01318B82).  Not sure if that explains anything... I only have a very basic knowlege of how Foreman works... but if it does, why are my values different than the ones other people have got?

Have you tried putting exactly that check-value into Foreman or Manager? Maybe the problem is indeed only with the checking of the right version, but I somehow doubt that. I'm mostly baffled by the fact that it works on older version. That means that there must be some change in the exe that provokes this new behaviour.
Logged

codewright

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-10
« Reply #67 on: January 16, 2009, 05:34:31 pm »

Phew, there we go. Migrated to sourceforge.net, code is in SVN. Version 0.4 released, but has only minor changes. Link to project page.

Version 0.4 [2009-01-16]
  * Added Dialog for unknown versions showing the checksum.
  * Added AboutBox

Plus, as a more experimental change, I added an memory layout with the checksum for 40d9 on vista as mentioned. It only has the other checksum, everything else is like the current 40d9 layout. If anybody can try this, who has currently troubles on vista, that would be fine. I assume you'll get a different error but an error nonetheless ;).
Logged

Hangfire

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-16
« Reply #68 on: January 16, 2009, 08:09:03 pm »

Yep.  Different error. 

Unknown DwarfFortress version (checksum is 0x1194d).

And here is the rest.

Spoiler (click to show/hide)

UAC is already off on my Vista PC.  Has been since I first loaded Vista.


Logged

codewright

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-16
« Reply #69 on: January 16, 2009, 09:25:15 pm »

Yep.  Different error. 

Unknown DwarfFortress version (checksum is 0x1194d).

And here is the rest.
Well, thats a different message, but sadly not a different error. Please open the MemoryLayouts.xml in some text editing tool and change the checksum in the following line:
Code: [Select]
<MemoryLayout Name="v0.28.181.40d9_vista" CheckSum="0xfd3559a4" Base="v0.28.181.40d8"/>to
Code: [Select]
<MemoryLayout Name="v0.28.181.40d9_vista" CheckSum="0x1194d" Base="v0.28.181.40d8"/>
In any case, it does look very strange as its far from the 'usual' numbers. I'm mostly interested on whether it's only the checksum thingy or a general thing.
Logged

Hangfire

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-16
« Reply #70 on: January 16, 2009, 10:40:39 pm »

Prepare to be even more confused.  I sure am.

Changing the checksum in the xml file resulted in another similar error.

Unknown DwarfFortress version (checksum is 0x1e4c804)

So I tried changing the xml file to meet the new checksum... Which resulted in the same error again with a new checksum.  So I tried just clicking continue on the error message then clicking the load button again.  Each time I do this I get a different checksum location.  I did it about 10 times, and I don't think it ever repeated checksum values.
Logged

TheMirth

  • Bay Watcher
  • Titan cancels smash, interrupted by baby
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-16
« Reply #71 on: January 16, 2009, 11:51:06 pm »

Ok I tested d9 with Vista. I get the checksum error as before. Then with Dwarf Fortress remaining running I swapped checksums and ran Dwaf Manager again. It shows "Connected to 1724(v0.28.181.40d9_vista) in the lower right hand corner but none of the data is loaded in the screen.

Downloaded the source and ran it from VS2008

MemoryAccess.ReadMemory - MemoryAccess.cs(86)
  int read = ReadMemory( address, buffer, length );
Spoiler (click to show/hide)

Dunno what's so different in 40d9 that Vista x64's handling the memory so differently than in 40d.

« Last Edit: January 17, 2009, 12:49:45 am by TheMirth »
Logged

Catinthewall

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-16
« Reply #72 on: January 17, 2009, 06:29:56 am »

Well, the new version lets me connect, but nothing pops up. I'm occationally seeing the checksum changing too, I wonder what's causing that. all the true checksums are 0x8 digits long, when it was going all funny, I'd get 0x6-0xA digits. odd.
Logged

GenericOverusedName

  • Bay Watcher
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-16
« Reply #73 on: January 19, 2009, 08:26:59 pm »

I did the checksum thing that the others did. I don't get a popup error anymore, but it doesn't load up any of the dwarves in the screen. It says in the bottom-right corner that it's connected to the process number, but like I said, nothing else occurs. I do have a few mods, but just graphics and some new creatures, so I doubt that'll affect this whatsoever.

I'm running .40d9 on Vista 32-bit. Seems like a common problem amongst us vista-users. :(
Logged

0x517A5D

  • Bay Watcher
  • Hex Editor‬‬
    • View Profile
Re: Dwarf Manager (Dwarf Foreman Reloaded) Updated 2009-01-16
« Reply #74 on: January 20, 2009, 04:41:32 pm »

Okay then.

Are there any Vista 32 or 64 users reading this that Manager does work for?  Please speak up.

I have changed my mind about suspecting a virus or other weirdness about the DF executable.

I now suspect that the problem is that the attempts to read the game's memory are all failing, and the checksum and other things get garbage.

Codewright, what development environment is needed to work on Manager?

(I can compile a working Foreman but the resulting executable is 36 megabytes before debug info is stripped, 3 megabytes after.  The distributed one is 600 kilobytes, so something is messed up.)
Logged
Pages: 1 ... 3 4 [5] 6 7 ... 13