Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Users could help Toady debug, with the PDB  (Read 1645 times)

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Users could help Toady debug, with the PDB
« on: March 08, 2011, 04:22:33 pm »

It occurred to me that there are quite a few programmers in these forums.
If we had the PDB file for Dwarf Fortress, we could go through the Mantis bugs and get more detailed debugging information to present Toady, saving him the time from trying to re-create the bug in question and track down it's source.

This kind of debugging grunt work is usually the most boring part of debugging, so distributing the effort across the community would certainly benefit Dwarf Fortress stability and bug-fix turnaround time.

Even without source code, PDB debugging information in skilled hands is useful at finding what lead up to a bug, using freely available tools from Microsoft and elsewhere.
Is there any reason why Toady doesn't make the PDB file available?

Logged

Maklak

  • Bay Watcher
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #1 on: March 08, 2011, 07:08:12 pm »

Is there any reason why Toady doesn't make the PDB file available?
He doesn't like people reverse engineering the game. There were some issues with how people used debug version in the past.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #2 on: March 08, 2011, 08:08:10 pm »

The PDB file (a.k.a. symbols) can help unscrupulous types reverse-engineer the source code.  This happened last year when Toady accidentally included symbols in the 2010 release.
Logged

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #3 on: March 09, 2011, 06:11:56 am »

On the other hand using SetUnhandledExceptionFilter() and GenerateCrashDump() (in the Windows version at least) could get Toady crash dump files of any crashes, which might be helpful.

Still, most of the crashes are easily reproducible given a savegame.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #4 on: March 10, 2011, 02:33:48 pm »

*zilpin reads linked posts*

So somebody tried to make a DF clone using DF debug symbols as a reference?  That is just plain stupid.  Even from a purely self-absorbed unethical perspective, it's a stupid waste of time.  It is more work than writing your own project from scratch.
I can see how the symbols would be useful for peterix's DFHack library, but that is an auxiliary tool in no way detrimental to Toady's interests.  No ethics problems involved there.  Things like DwarfTherapist, Stonesense, and LazyNewb increase the value of the DF franchise, benefiting Toady.

*zilpin searches for information on Khazad*

That 3D view engine had promise.  There was talent there.  Shame he chose the behavior he did.

Unscrupulous types trying to reverse-engineer DF can not get the source code via PDB symbols.  Typical PDB files give function names and line number hints, but that is all.
Seems to me that excluding debugging symbols is a wee bit paranoid, but at least the paranoia is not arbitrary.  It had cause.  Once burned, all fires make one wary.

Oh well, my offer to assist in debugging is still open, if Toady wants it.
If not, that's fine too.

Cheers.
Logged

agatharchides

  • Bay Watcher
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #5 on: March 10, 2011, 03:29:22 pm »

I doubt a reverse engineering could be pulled off by one or two persons. Too much work without the years of dedication Toady has put into it, and too little community support. The pool of people who would like this game isn't that large. I wouldn't play or support a game that was obviously ripping him off and I doubt many others would. Without the ability to generate income, praise or interest it would die like the previous one.

 I'm no programmer and it is his game and his call, as zilpin says. Still, I have a hard time seeing how this could be pulled off in any way that would really do anything but embarrass the people trying to rip Toady off.
Logged
Memento Mori

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #6 on: March 10, 2011, 03:32:22 pm »

I don't think Toady is worried about wholesale reverse engineering per se.  I think he's just worried that the hints at program structure (function names and so on) would help people design a clone.
Logged

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #7 on: March 13, 2011, 11:47:27 pm »

I don't think Toady is worried about wholesale reverse engineering per se.  I think he's just worried that the hints at program structure (function names and so on) would help people design a clone.

I doubt Toady has this concern.  That would be irrational, and he is quite a logical man.
Even Microsoft publishes debugging libraries for Windows core libraries, for writing drivers (e.g. hardware manufacturers, but not limited to).  They are easy to get, with DDK.
MS has only given the Windows source code to two entities I know of: The People's Republic of China, and the United States Department of Defense.
They have more to lose from hints at structure & clones than he ever would, yet their debugging information is available with the DDK.
Time is infinite.  The debugging will get done eventually, and if he loves doing it, that is his business.
Plain and simple, Toady will release what he wishes as he wishes, his reasons or causes are unimpeachable, and that is fine.
DF is his; he shares it with us.

Cheers.
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: Users could help Toady debug, with the PDB
« Reply #8 on: March 14, 2011, 06:53:36 am »

The thing is, it's easier to just play the game for a while and design from scratch than to reverse engineer it.
So, nobody ever tried to make a DF clone using the debug symbols, because it WOULD BE stupid. And even when leaked, they are basically useless anyway. Hell, I can't use them even in dfhack. They got outdated very quickly and adding all that 'stuff' would just bite me in the rear, because I'd have to track it between DF versions.


About Khazad... well. It was fun while it was just a visualizer and I'll probably reuse some of the things I wrote for it in some later projects. I still like the z-level scrollbar control :P

Vigilant

  • Bay Watcher
    • View Profile
Re: Users could help Toady debug, with the PDB
« Reply #9 on: March 14, 2011, 02:15:20 pm »

Or you know, we could just do the thing i suggested, which doesn't require toady to do anything different at all and will save him some time in the long run : http://www.bay12forums.com/smf/index.php?topic=79423
Logged