Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - orost

Pages: [1]
1
DF Adventure Mode Discussion / Re: Random soldiers chasing me around
« on: January 03, 2018, 03:13:23 pm »
@Cathar

Thanks. I figure you're right about them being bandits. I found a bug on Mantis about a crash that happens when you yield to muggers that matches what I saw so I figure those were muggers. I would have seen that if it hadn't crashed.

I'm not sure about the first group though. They just tried to kill me, which seems out of character for muggers.

2
DF Adventure Mode Discussion / Random soldiers chasing me around
« on: January 02, 2018, 06:44:47 pm »
Something odd happened to my latest adventurer.

At the end of my first day, not really having done anything yet, just travelling, I got attacked in a town by two soldiers, a dwarf recruit and a goblin lasher. They tried to stab me to death for no apparent reason. I beat them up until they yielded so I could talk to them, but I couldn't extract any useful information about why they attacked me. Asked about the attack, they gave me the "it was inevitable" line. Asked about me, they didn't know me. Asked why they were travelling, "I am on an important mission".

When I tried to leave, they wouldn't let me, "ambushing" me immediately when I tried to move on the travel screen, somehow, despite having broken legs. I had to walk a fair bit away normally before I could travel.

A few days later, after I killed some monsters and bandits, again in a town a different group of soldiers, mostly human, started beating on me. This time it was non-lethal, and they kept telling me to yield. When I did the game crashed, so I didn't get to investigate more.

Does anyone have any idea what might have happened? Why would random soldiers that don't know me want to kill me? I hadn't even done anything of note. And I was a human of the same civilization as the town, I started just a day's travel away from where that happened.

3
DF Gameplay Questions / Re: Gem setting problems
« on: December 17, 2017, 09:08:20 am »
I believe there is a bug that causes items in a bin to be unavailable while a hauling job involving the bin is active. So you might have the gems, but they're in a bin, and a dwarf is currently is hauling another gem to that bin, so they're not showing up on the list; or you might order a gem set while the gems are accessible, but by the time your jeweler goes to fetch the gem, the bin has become "busy", causing a job cancellation.

I think this applies to all items, but is far more noticeable in case of gems than anything else because there tends to be a fair bit of them moving around, because a bin can store many gems and because gem cutting/setting jobs tend to be queued manually.

Your options are to ignore it (knowing that no gems are actually going missing, and it's just being annoying) or to not use bins in gem stockpiles, at least ones that your workshops draw directly from.

4
That's not the same one that I have. I must have accidentally downloaded the wrong package back Friday. I re-downloaded and it works.

I'm sorry for wasting your time, PleaseBugMeNot.

5
Sorry, I should have been more specific. The one I pulled from the starter pack you posted on Friday, the one that runs but crashes on reading dwarves, that one is 32-bit. The two you posted today are both 64-bit.

6
It's definitely a 32-bit executable:

Code: [Select]
$ file DwarfTherapist.exe
DwarfTherapist.exe: PE32 executable (GUI) Intel 80386 (stripped to external PDB), for MS Windows

As for the debug versions, neither runs. The first:

Code: [Select]
(gdb) r
Starting program: /c/Users/szymon/Desktop/DT_with_debugsymb/DwarfTherapist.exe
[New Thread 1684.0xa04]
gdb: unknown target exception 0xc0000139 at 0x7ffa0fbacdd0
During startup program exited with code 0xc0000139.

(BTW - can you make Visual Studio output some sort of portable debug info format? GDB can't read PDB. I could probably get another debugger going but I'd rather not if possible)

(Alternatively I'll just build it myself if you give me the source)

The second wants ucrtbased.dll... I'm not sure what that is. Googling suggests it might be a Windows 10 thing, I'm on 8.1.

7
If you're asking me, I didn't compile it, I'm using PleaseBugMeNot's release. I don't know why it's 32-bit, but it's supposed to work with 64-bit DF.

8
@PleaseBugMeNot

I tried using your version on 0.43.05 64-bit (after importing the correct memory map) and it segfaults on reading dwarves. Here's a backtrace, if you get me a version with debug symbols I could get a better one.

Spoiler (click to show/hide)

9
I made an actual attempt to fix Windows support, and while I didn't get it working and probably can't, I think I made some useful progress.

Here is a summary of what I did. Unless noted otherwise the changes were made to dfinstancewindows.cpp

* I removed a stray include of non-existent memorysegment.h
* Wide strings were used in several places, even though the API functions it uses use regular strings. I changed those to regular strings.
* There were a handful of incorrect types (such as const uint instead of VIRTADDR) and missing casts.
* I redefined PID from int to DWORD in dfinstance.h
* enumWindowsProc was completely broken - I think it had never been finished. I fixed it. This fixed finding DwarfFortress.exe and determining its PID.
* I made DFInstanceWindows::get_last_error static to help with the above. I don't think it makes any difference to anything else. It looks to me like it could and maybe should be a free function, but I didn't want to make bigger changes than necessary.
* DFInstanceWindows::calculate_checksum generates checksums from the .exe timestamp, and it was confused by 64-bit timestamps in 64-bit executables, creating checksums padded with 32 bits worth of zeros (e.g. 0x00000000abcdefab instead of 0xabcdefab) which falsely tested as not equal to normal checksums. I adjusted it to skip the zeros. It would probably be better to fix the presentation and comparison logic for checksums but I couldn't figure it out.
* I added error logging to memory reads. A debugging aid, but I see no reason not to include it.

The current state is that DT builds, launches, connects to DF, picks the correct memory map, but disconnects immediately after that after a memory read fails. I'm afraid I am not able to take this any further. Hopefully this is of some use.

Diff:

Spoiler (click to show/hide)

10
Further on win64

Code: [Select]
[ 97%] Building CXX object CMakeFiles/DwarfTherapist.dir/src/dfinstancewindows.cpp.obj
D:/msys64/home/szymon/dt/src/dfinstancewindows.cpp:39:27: fatal error: memorysegment.h: No such file or directory
 #include "memorysegment.h"

That header doesn't exist and isn't referred to anywhere else, so I assumed it's a stray import and removed it. After that, there are several problems, most but not all relating to wide strings. I hacked it to work (well, launch, I don't have a memory layout to actually test it.) Here is the diff. It is not a patch, I don't really know what I'm doing (in particular I commented out the entirety of enumWindowsProc, because it calls and doesn't find get_last_error and I don't know what that's supposed to be), but hopefully it'll be helpful in actually fixing it.

Spoiler (click to show/hide)

11
I think someone was working on 64-bit Windows support, but I don't know if there's a build anywhere.

I'm not aware of any issues that would prevent my branch from working on Windows, as long as a suitable memory layout is provided. (but I haven't tried it, so it *probably* doesn't work.)

I tried building on Windows and it fails on dfinstance.cpp:

Code: [Select]
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp: In static member function 'static DFInstance* DFInstance::newInstance()':
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:127:34: error: invalid new-expression of abstract class type 'DFInstanceWindows'
     return new DFInstanceWindows();
                                  ^
In file included from D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:60:0:
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstancewindows.h:33:7: note:   because the following virtual functions are pure within 'DFInstanceWindows':
 class DFInstanceWindows : public DFInstance {
       ^~~~~~~~~~~~~~~~~
In file included from D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.cpp:24:0:
D:/msys64/home/szymon/Dwarf-Therapist/src/dfinstance.h:137:19: note:    virtual USIZE DFInstance::write_string(VIRTADDR, const QString&)
     virtual USIZE write_string(VIRTADDR addr, const QString &str) = 0;
                   ^~~~~~~~~~~~
CMakeFiles/DwarfTherapist.dir/build.make:302: recipe for target 'CMakeFiles/DwarfTherapist.dir/src/dfinstance.cpp.obj' failed
make[2]: *** [CMakeFiles/DwarfTherapist.dir/src/dfinstance.cpp.obj] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/DwarfTherapist.dir/all' failed
make[1]: *** [CMakeFiles/DwarfTherapist.dir/all] Error 2
Makefile:105: recipe for target 'all' failed
make: *** [all] Error 2

g++ 6.3 on MSYS2

12
DF Modding / Re: Mod request - difficulty mod for stress levels.
« on: August 09, 2016, 02:17:22 pm »
I'd love this too. I miss tantrums and wish I had an actual reason to make life better for my dwarves.

Pages: [1]