There is a small flat array in unit named relationship_ids which only contains refs to 10 things like mother, father, pet, ridermount. These are the first 10 enums in unit_relationship_type.h. Perhaps that array is longer than currently defined, but it doesnt seem capable of containing multiple links of same type anyhow. Maybe its just a small cache of those first 10 rels.
It
cannot be longer than it is currently, because if that were the case, everything following it (including unit.job, unit.body, unit.counters, unit.status, and more) would be wrong, because it's a C array ("int32_t relationship_ids[10];" in df/unit.h).
Hmm, just had a sudden "hard close". Not exactly sure what caused it.
Has taverns or missions been tested with DFhack yet?
I think the word you're looking for is "crash". There aren't any other situations I can think of where DF would suddenly close except when it crashes.
As for your question, are you asking if DFHack not being tested with taverns/missions could be the cause of the crash? If so, the answer is almost certainly no, because if DFHack research hasn't been done on those things, nothing in DFHack can possibly touch them (unless layouts of globals like "world" are wrong, but those have been fixed for 0.44). Also, taverns were new in 0.42, so they're not likely to be a cause of any new bugs/crashes related to DFHack at this point.
I found a bugged save after a hard close can possibly be fixed by escaping immediately after load, selecting export local image, and cycling through the levels. Then the game might save again and be playable, to observe the hard close again...
If DF crashes, it will not touch the actual save folder itself at all (it saves temporary files to data/save/current, but ignores them when you restart DF). In other words, a crash (except when saving the game)
will not permanently affect your save. I highly doubt that exporting images has anything to do with a crash, because that feature pretty much only reads from the map and hasn't been changed in years. If you think you observed it affecting a crash in some way, then that crash is probably due to undefined behavior somewhere, which means that exporting a map
could affect it somehow, sometimes, if you're lucky, due to any number of semi-random factors (that could vary depending on your system, etc.). And I know I'm being pedantic, but please don't be afraid to use the word "crash" - it's a lot easier to search for.