Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X - Setting nickname + custom profession simultaneously causes corruption #15

Closed
ysgard opened this issue Apr 8, 2014 · 4 comments
Closed

Comments

@ysgard
Copy link

ysgard commented Apr 8, 2014

Related to issue #14 - Setting both a nickname and a custom profession on the same dwarf before committing can cause undefined behaviour. I've seen the following happen:

  1. Dwarf Fortress crashes on commit.
  2. The dwarf gets filed under a corrupted profession name in Dwarf Therapist.
  3. The dwarf shows up as ' under the correct profession, and using 'Set Nickname...' again shows the nickname to be a long series of non-ascii characters (clearly a chunk of memory with nothing to do with the nickname).

So far setting the nickname and committing, or setting the custom profession and committing; seems to work. But doing both is bad.

@ysgard
Copy link
Author

ysgard commented Apr 8, 2014

I just created a custom profession and assigned a dwarf to it, now the dwarf is read as belonging to the profession 'tE14search_genericS1_S3_EE'. :-/

I renamed the custom profession from 'MACHINIST' to 'ENGI', reassigned the dwarf and this time it worked.

Renaming it back to MACHINIST causes the problem to recur. I thought it might be a length issue, but I have a custom profession named 'LUMBERJACK' and it seems to work just fine.

Renamed it to 'ENGINEER', reassigned the dwarf and it got filed under an unreadable 1-character long profession name. Renamed it to 'ENGINEE' - works. Renamed it to 'ENGINEEE' and it works. But 'ENGINEER' gets corrupted.

@ysgard
Copy link
Author

ysgard commented Apr 8, 2014

This just appears to be a problem with the naming, the labours get set appropriately in all cases (except the times when dwarf fortress crashes). Dwarf fortress crashes rarely, but when it does it was running, not paused.

@splintermind
Copy link
Owner

Thanks for all the testing. Unfortunately I have no osx to debug on, so I'm going to have to disable the string writing again until someone figures out a fix, especially if it's crashing DF.

splintermind added a commit that referenced this issue Apr 25, 2014
- disabled the OSX changes for writing strings due to issue #15
- added a separate makefile for linux which was overwritten in previous
commits
@splintermind
Copy link
Owner

This should be resolved with #113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants