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
buildingplan: planning mode builds fail sometimes - flags bitfield not initialized #1047
Comments
Is workflow active? Also, have you seen this in 0.43.03? If it's just in 0.43.05, is it in both builds or just the 64-bit build? |
I think workflow is enabled but not actually being used for anything. I haven't tested in 32-bit. I did not have this problem in 0.43.03. |
Confirmed in both builds of 0.43.05, and confirmed to work properly in 0.43.03. |
building.flags doesn't appear to be getting initialized, which is likely due to #1038. @dscorbett I'm using MallocScribble on OS X, which sets uninitialized heap memory to 0xAA:
I'm guessing a combination of |
Yeah, I ran a test with tile_designation in a standalone executable and confirmed that the bitfield is uninitialized. It would be nice to keep the lack of a default constructor, though. Maybe we could add bitfield initialization to the (generated) constructors of structures that contain bitfields, though. |
I'm trying to change this section to zero-initialize bitfields. The issue is that in library/include/df/codegen.out.xml, building::flags appears as: <ld:field name="flags" type-name="building_flags" ld:level="1" ld:meta="global"/> I'm not sure why ld:meta is "global". In theory, it would be possible to figure out that |
I couldn't figure out why ld:meta="global", but I did manage to get a proper ld:subtype attribute generated ("bitfield" in this case) by changing <compound name='flags' type-name='building_flags'/> to <bitfield name='flags' type-name='building_flags'/> I don't know if this will affect the Lisp tool, but the Perl scripts seem to be able to handle the change just fine, and generate code to initialize the bitfield in the constructor appropriately. |
This currently requires bitfields to be defined with the <bitfield> tag - currently, all bitfield fields with a type-name use <compound> instead. DFHack/dfhack#1047 (partial fix) DFHack/dfhack#1038 #169 #171
This reverts commit ce35b1d. Ref #169, #171, DFHack/dfhack#1047
This reverts commit 8a3a366. Ref #169, #171, DFHack/dfhack#1047
This should resolve the issue behind #169 and #171, as well as the issues created by that change (DFHack/dfhack#1047, DFHack/dfhack#1050, DFHack/dfhack#1052). This reverts commits 22819e2 and 2700f2e.
…thod Allows bitfields within unions (#1047, DFHack/df-structures#169)
Looks fixed to me. |
I made a burial room with space for 25 coffins. Placed 25 coffins (with 25 available in inventory) in planning mode. Promptly after unpause, seven of the planned coffins disappeared from the map, but the spaces where they were planned to be built are shown as "occupied". Seven more were cancelled, with cancellation notices; the spaces they were planned to be built are clear. Two were built. The remaining are pending building at this time.
I cannot discern any pattern to which ones were cancelled/ghosted/built/not built. I don't see any way to recover the "ghosted" squares.
Additional info: after the weird behavior, the following errors get spammed to the DFHack console on a recurring basis:
The text was updated successfully, but these errors were encountered: