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

Misalignment Tool Findings #538

Closed
10 of 22 tasks
20k opened this issue Jan 26, 2023 · 9 comments · Fixed by #539
Closed
10 of 22 tasks

Misalignment Tool Findings #538

20k opened this issue Jan 26, 2023 · 9 comments · Fixed by #539

Comments

@20k
Copy link
Contributor

20k commented Jan 26, 2023

  • caste_raw: expected 17144, real: 17160
  • plant_growth: expected 328, real 344
  • army_controller: expected 200, got 224
  • creature_raw: expected 9544, got 9552
  • building_furnacest.design: expected 48, got 32
  • building_weaponrackst: expected 360, got 336
  • unit_complaint: expected 12, got 8
  • entity_position: expected 904, got 944
  • historical_figure_info.T_personality.personality: expected 2656, got 2664 edit: possibly, let me check
  • descriptor_shape: expected 208, got 288? Does this have any derived types?
  • descriptor_color: expected 128, got 184
  • poetic_form_subject_target: expected 4, got 12
  • Our description for squad_schedule_entry is probably wrong (which also bears out my experience with it): expected 88, got 1056 ie its allocated as a big ol slab
  • historical_figure_info: masterpieces: expected 96, got 504
  • historical_figure_relationships.T_intrigues.T_unk12.T_unk_data.ptr_1: expected 12, got 16
  • rhythm_pattern.T_bars -> beat: expected 4, got 8
  • Unsure how unions work or if they're managed so: agreement_details::T_data.Citizenship: Expected 12, got 20. agreement_details::T_data.Residency expected 16, got 24. agreement_details.T_data.Parley expected 8, got 24. agreement_details.T_data.Location: expected 32, got 36

Possibly just invalid

  • army_controller.mission_report: expected 120, got 4 (?)
  • army_controller.mission_report -> campaigns is invalid. Might just be a bad army controller

Possibly just invalid:

  • world.buildings.other.ARMOR_STAND.1.relations.2.assigned_unit.status.current_soul.personality <type: unit_personality> -> memories expected 600 got 728

  • world.buildings.other.ARMOR_STAND.1.relations.2.assigned_unit.status.current_soul.personality.memories <type: unit_personality.T_memories> -> core_memories

  • likely barracks, entry in world.buildings.other.ANY_BARRACKS: expected 360, got 336

@20k
Copy link
Contributor Author

20k commented Jan 26, 2023

Different save:

  • historical_figure_relationships.T_intrigues.T_unk12.T_unk_data -> ptr_0 expected 16 got 12
  • agreement_details.T_data -> PlotAbduct expected 12 got 16 (see: union disclaimer)
  • <type: abstract_building_libraryst> -> scribeinfo expected 48 got 40
  • world.buildings.other.ANY_STORAGE vector<building*> -> 121 expected 360 got 336 (probably not the same thing as barracks. Has building* shrunk?)

@ab9rf ab9rf linked a pull request Jan 26, 2023 that will close this issue
@ab9rf ab9rf linked a pull request Jan 26, 2023 that will close this issue
@20k
Copy link
Contributor Author

20k commented Jan 26, 2023

Per request: all misaligned designs so far

  • type: building_water_wheelst -> design expected 48 got 32
  • type: building_bridgest -> design expected 48 got 32
  • type: building_screw_pumpst -> design expected 48 got 32
  • type: building_wellst -> design expected 48 got 32
  • type: building_tradedepotst -> design expected 48 got 32
  • type: building_archerytargetst -> design expected 48 got 32

@20k
Copy link
Contributor Author

20k commented Jan 26, 2023

unk_5 probably doesn't contain histfigs. This then OOM'd

  • world.history.unk_5 vector<historical_figure*> -> 38 expected 376 got 1024
  • world.history.unk_5.53 <type: historical_figure> -> entity_links

Edit: Something may have just gone wrong in worldgen here, the save looks pretty borked

Edit 2: Looks like there's a lot of stuff in memory after world gen that breaks everything

@20k
Copy link
Contributor Author

20k commented Jan 28, 2023

INVALID POINTER ALLOCATION SIZE (windows heap debugging)

  • world.army_controllers.all.739.data <type: army_controller.T_data> -> InvasionOrder expected 104 got 128

This is with updated XMLs

@quietust
Copy link
Member

How many of the old errors mentioned above are still present?

@20k
Copy link
Contributor Author

20k commented Jan 28, 2023

I haven't taken the latest army controller xml change yet, these are still showing up as invalid:

<type: agreement_details_data_citizenship>
<type: army_controller_invasion_order>
<type: historical_figure_relationships.T_intrigues.T_unk12.T_unk_data.T_ptr_1>
<type: beat>
<type: agreement_details_data_parley>
<type: descriptor_color>
<type: descriptor_shape>
<type: agreement_details_data_residency>
<type: historical_figure_info.T_masterpieces>
<type: unit_personality.T_memories>
<type: agreement_details_data_location>

<type: agreement_details_data_plot_abduct>
<type: location_scribe_jobs>
<type: agreement_details_data_location>
<type: historical_figure_relationships.T_intrigues.T_unk12.T_unk_data.T_ptr_0>

@quietust
Copy link
Member

quietust commented Jan 28, 2023

army_controller_invasion_order is one of the ones I fixed - I'll take a look at the others shortly.
Update: also got descriptor_color+shape and all of the agreement_details_data subtypes.

That leaves the following:

  • beat
  • historical_figure_info.T_masterpieces
  • historical_figure_relationships.T_intrigues.T_unk12.T_unk_data.T_ptr_0
  • historical_figure_relationships.T_intrigues.T_unk12.T_unk_data.T_ptr_1
  • location_scribe_jobs
  • unit_personality.T_memories

@myk002
Copy link
Member

myk002 commented Feb 12, 2023

Latest list of bad types:

  • <type: historical_figure_relationships.T_intrigues.T_unk12.T_unk_data.T_ptr_1> (expected 12 got 16)
  • <type: unit_personality.T_memories> (expected 600 got 728)
  • <type: beat> (expected 4 got 8)
  • <type: historical_figure_info.T_masterpieces> (expected 96 got 504)

@quietust
Copy link
Member

quietust commented Feb 12, 2023

Commit 785ffbd on my fork should fix everything.
Two of the "bad types" weren't actually bad:

  • intrigues.unk_12.unk_data is a tagged union which wasn't being recognized - I've adjusted the field names so hopefully it'll work better now
  • beat is actually part of a variable-length array, and the misalignment tool didn't recognize that

@myk002 myk002 closed this as completed Feb 12, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in 50.07-r1 Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants