Haha... so I fixed the crash problem. I redirected the msvc2010 delete operator to a piece of code that checks to see if the memory belongs to me or dwarf fortress. If it belongs to me, it just returns but if it belongs to df it sends it to the real delete operator. This is actually perfect because it will result in 0 memory leaks AND get rid of the pesky undefined behavior of what happens when a program frees something it didn't allocate.
This might be useful to somebody someday.. or not. I'll be busy this weekend with my daughter, but I should be able to get a release out next week for sure now.
// one last EVIL dead to do. put the free operator at +FB0 and load our own goodie in there.
uint32_t realfree = readDWord(dfbase+0x67E2C0);
actionLog("Hooking into the free operator at " % QString::number(realfree,16));
uint32_t mystuff = readDWord(queuePointer);
writeDWord(mystuff+0xFB0, realfree);
realfree = mystuff+0xFB0;
uint8_t in[45];
in[0] = 0x55; // push ebp
in[1] = 0x89; in[2] = 0xE5; // mov ebp, esp
in[3] = 0x83; in[4] = 0xEC; in[5] = 0x18; // sub esp, 18
in[6] = 0xA1; memcpy(in+7, &mystuff, 4); // mov eax our memory
in[11] = 0x39; in[12] = 0x45; in[13] = 0x08; // cmp [ebp+08],eax
in[14] = 0x72; in[15] = 0x0F; // jump +15 if it isn't our memory
in[16] = 0xA1; memcpy(in+17, &mystuff, 4); // mov eax our memory
in[21] = 0x05; in[22] = 0x00; in[23] = 0x20; in[24] = 0x00; in[25] = 0x00; // add eax 0x2000
in[26] = 0x3B; in[27] = 0x45; in[28] = 0x08; // cmp eax, [ebp+08]
in[29] = 0x73; in[30] = 0x0C; // jae 12 it is our memory
in[31] = 0x8B; in[32] = 0x45; in[33] = 0x08; // mov eax, [ebp+08]
in[34] = 0x89; in[35] = 0x04; in[36] = 0x24; // mov [esp], eax
in[37] = 0xFF; in[38] = 0x15; memcpy(in+39, &realfree, 4); // use the real free operator
in[43] = 0xC9; // leave
in[44] = 0xC3; // ret
WriteProcessMemory(hDF, (void *)(mystuff+0xFC0), (void *) in, 45, 0);
writeDWord(dfbase+0x67E2C0, mystuff+0xFC0);