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

Unhelpful/broken mapgen error message #65316

Open
PatrikLundell opened this issue Apr 26, 2023 · 0 comments
Open

Unhelpful/broken mapgen error message #65316

PatrikLundell opened this issue Apr 26, 2023 · 0 comments
Labels
Code: Debug Debugging and troubleshooting the game, also includes the debug menu Map / Mapgen Overmap, Mapgen, Map extras, Map display (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@PatrikLundell
Copy link
Contributor

Describe the bug

DEBUG : Requested argument 1 but input has only 1 at: "update_mapgen %s used for blueprint, but has %zu| versions, where it should have exactly one"

FUNCTION : calculate_all_blueprint_reqs
FILE : C:\Cataclysm-DDA\src\recipe.cpp
LINE : 473
VERSION : 0.G-1601-g01203da51d

Attach save file

N/A. There is no save as this is triggered by JSON under development.

Steps to reproduce

  1. Screw up JSON definitions such that the same update_mapgen_id is used twice (in my case by accidentally using the same name for the construction of a building segment as for the equipment built inside of it).
  2. Get error message trying to load a save intended to test the changes.

Expected behavior

"%s" is probably intended to provide the name of the mapgen that's either duplicated or missing. "%zu" is probably intended to display the number of copies present (I assume possibly zero, if there's a name mismatch).

The code around line 473 is:

    if( funcs.size() != 1 ) {
        debugmsg( "update_mapgen %s used for blueprint, but has %zu versions, where it should have exactly one",
                  funcs.size() );
        return result;
    }

I guess the string parameter is missing from the debugmsg,, throwing the parameters out of sync.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.2846 (22H2)
  • Game Version: 0.G-1601-g01203da51d [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

No response

@PatrikLundell PatrikLundell added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Apr 26, 2023
@Maleclypse Maleclypse added (S2 - Confirmed) Bug that's been confirmed to exist Map / Mapgen Overmap, Mapgen, Map extras, Map display Code: Debug Debugging and troubleshooting the game, also includes the debug menu and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Debug Debugging and troubleshooting the game, also includes the debug menu Map / Mapgen Overmap, Mapgen, Map extras, Map display (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

No branches or pull requests

2 participants