-
Notifications
You must be signed in to change notification settings - Fork 470
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
Strange items.other/items.bad misalignment (0.47.04 linux64) #1576
Comments
Win64: This is what the pull produced:
Thus, something in that set changed DF from (apparently?) working to crashing. My primary (uneducated) guess would point to library/include/DataDefs.h, followed by BitArray.h and LuaTypes.cpp. |
It's actually something in library/xml - the size of the |
I switched world.items.other back to a static-array and now I'm getting a segfault on accessing world.machines (which also has a vtable). (Also when accessing world.cur_savegame, but that's later on.) I'm not sure what's going on here, since buildings.other was definitely the right size, but I'm inclined to roll back the df-other-vectors additions so we have a working develop build in the meantime. |
Partially reverts #402 but keeps the type definitions around for future use Addresses DFHack/dfhack#1576 for now
I rolled back some of the changes for now. Now that I think about it, one likely cause could be |
…building_type item for alignment Ref DFHack/dfhack#1576
|
I question whether |
Yeah, I'm probably going to get rid of |
Since #1558 was merged, various fields of
world
have been misaligned, at least on linux64. To paraphrase my (and @BenLubar's) findings on IRC:world.items.other.BAD
andworld.items.bad
were actually the same vector, they just overlapped before (items_other_id
was one larger than the size of the<static-array>
). Now that the static-array is one larger, things afteritems
are misaligned. Notably, immediately afteritems
areartifacts
andjobs
, and the latter (due to having a vtable) causes crashes on world load inbuildings_onUpdate()
.world.items.bad
causes DF to segfault on startup becausecur_savegame
is misaligned. But strangely, the position ofjobs
is correct compared to 0.47.04-r1,, andjobs
is well beforecur_savegame
. The size ofitems
also matches 0.47.04-r1 after this change. I'm not really sure how this is possible.BAD
from theitems_other_id
enum (the only way I see to shrink the<static-array>
at this point) because there's ajob_item_vector_id::BAD
item that depends on it. I don't know ifjob_item_vector_id::BAD
is really necessary, though.Basically, I have no idea what was causing the weird alignment issues I was seeing later on in
world
after fixing the size ofitems
. Any help would be appreciated.The text was updated successfully, but these errors were encountered: