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

Invalid or misplaced field name "baby_type" in JSON data #76337

Closed
alef opened this issue Sep 10, 2024 · 4 comments
Closed

Invalid or misplaced field name "baby_type" in JSON data #76337

alef opened this issue Sep 10, 2024 · 4 comments
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@alef
Copy link
Contributor

alef commented Sep 10, 2024

Describe the bug

Invalid or misplaced field name "baby_type" in JSON data when loading a game.

Maybe #76266 ?

Attach save file

N/A

Steps to reproduce

Load any game.

Expected behavior

No errors.

Screenshots

See debug.log

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.4780 (22H2)
  • Game Version: 6dc777e [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

debug.log

@alef alef added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Sep 10, 2024
@GuardianDll
Copy link
Member

Your version of the game is from 3 days ago, 76266 was merged only 17 hours ago
Seems to be mismatch between your code and your json

@PatrikLundell
Copy link
Contributor

PatrikLundell commented Sep 11, 2024

There is something wrong in master (and I don't really care which PR brought it in).
This is from the failure of "General build matrix / Basic Build and Test (Clang 10, Ubuntu, Curses) (pull_request)" of #76340:
Error: (all_mods)=> Invalid or misplaced field name "baby_egg" in JSON data

"anger_triggers": [ "STALK", "PLAYER_WEAK", "HURT", "PLAYER_CLOSE" ],
"flags": [ "SEES", "SMELLS", "HEARS", "CLIMBS", "PATH_AVOID_FIRE", "PATH_AVOID_FALL" ],
"reproduction": { "baby_egg": "caff_gum", "baby_count": 10, "baby_timer": 5 },
                            ▲▲▲
"armor": { "bash": 4, "cut": 8, "bullet": 6 }

},

(all_mods)=> 23:44:54.498 INFO : Game data loaded, running Catch2 session:
(all_mods)=> Filters: [force_load_game]

It can be noted that the code compiled for that PR did not fail on load, and the above malformed JSON does not exist in the branch uploaded to that PR.

It can be noted all the 152 instances of "baby_egg" in that branch's JSON follow this pattern:
"reproduction": { "baby_type": { "baby_egg": "egg_vocal_frog" }, "baby_count": 12, "baby_timer": 20 },
i.e. a "baby_type" entry enclosing the "baby_egg" one.

Edit:
A master from a couple of hours ago does not contain this issue, so I would assume it has been fixed.

@alef
Copy link
Contributor Author

alef commented Sep 14, 2024

it fixed somehow in b35342f or earlier

@alef alef closed this as completed Sep 14, 2024
@GuardianDll
Copy link
Member

in #76349

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants