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

Farm Plots command on "No Seed" harvestable plot results in exception #38452

Closed
jkraybill opened this issue Feb 29, 2020 · 4 comments · Fixed by #38489
Closed

Farm Plots command on "No Seed" harvestable plot results in exception #38452

jkraybill opened this issue Feb 29, 2020 · 4 comments · Fixed by #38489

Comments

@jkraybill
Copy link
Contributor

jkraybill commented Feb 29, 2020

Describe the bug

If you have harvestable crops that are not currently in a farm plot, and then mark them as a farm plot with "No Seed" as the seed, when you do a "Farm Plots" command, they get harvested and tilled, but then you get an exception stating 'invalid recipe ""' when (presumably) the re-planting step occurs.

I expected that "No Seed" would allow me to have a plot that was only harvested, not tilled or planted, which seems like the correct behaviour to me.

Steps To Reproduce

  • mark a harvestable area of land (i.e. with mature fruited plants) as "Farm Plot" and select "No Seed" as the seed. Hold a tilling instrument like an entrenching tool or trowel.
  • O, and select "Farm Plots".
  • the plot will be harvested, and tilled, but there will be an exception after that.

Expected behavior

As stated above, I did this because I wanted to harvest a plot of land but not re-till or re-plant. That's what I think the behavior of a "No Seed" plot should be.

Screenshots

image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 1903
  • Game Version: 0.D-12681-ga92612b [64-bit]
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Beta National Guard Camp [national_guard_camp],
    More Locations [more_locations],
    Fuji's More Buildings [FujiStruct],
    More City Locations [cityside],
    Urban Development [Urban_Development],
    No Fungal Monsters [No_Fungi]
    ]

Additional context

This was not reliably reproducible in my farm plot, so it could be somewhat situational. I got it directly after marking the plot as No Seed, standing in the middle of a 3x3 area where all 9 plants were harvestable, and doing O - Farm Plots.

Full debug.log contents:

19:19:21.143 ERROR : (error message will follow backtrace)
#0
(dbghelp: @0x7c8356[cataclysm-tiles.exe+0x3c8356]),
(libbacktrace: Z21debug_write_backtraceRSo+0x56@0x7c8356),
(libbacktrace: 0x7c8356 [unknown src]:0 [unknown func]),
#1
(dbghelp: @0x7c8dea[cataclysm-tiles.exe+0x3c8dea]),
(libbacktrace: Z8DebugLog10DebugLevel10DebugClass+0x34a@0x7c8dea),
(libbacktrace: 0x7c8dea [unknown src]:0 [unknown func]),
#2
(dbghelp: @0x7cbb06[cataclysm-tiles.exe+0x3cbb06]),
(libbacktrace: Z12realDebugmsgPKcS0_S0_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x76@0x7cbb06),
(libbacktrace: 0x7cbb06 [unknown src]:0 [unknown func]),
#3
(dbghelp: @0x129aa5f[cataclysm-tiles.exe+0xe9aa5f]),
(libbacktrace: ZNK9string_idI6recipeE3objEv.part.943+0x1cf@0x129aa5f),
(libbacktrace: 0x129aa5f [unknown src]:0 [unknown func]),
#4
(dbghelp: @0xb36b4a[cataclysm-tiles.exe+0x736b4a]),
(libbacktrace: ZNK12Item_factory13find_templateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x35a@0xb36b4a),
(libbacktrace: 0xb36b4a [unknown src]:0 [unknown func]),
#5
(dbghelp: @0xab2936[cataclysm-tiles.exe+0x6b2936]),
(libbacktrace: ZN4item16count_by_chargesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x16@0xab2936),
(libbacktrace: 0xab2936 [unknown src]:0 [unknown func]),
#6
(dbghelp: IMG_LoadWEBP_RW+0x2526ac@0x198c8ac[cataclysm-tiles.exe+0x158c8ac]),
(libbacktrace: ZN16requirement_data9has_compsI9item_compEEbRK9inventoryRKSt6vectorIS5_IT_SaIS6_EESaIS8_EERKSt8functionIFbRK4itemEEi11craft_flags+0x12c@0x198c8ac),
(libbacktrace: 0x198c8ac [unknown src]:0 [unknown func]),
#7
(dbghelp: @0x12bac6d[cataclysm-tiles.exe+0xebac6d]),
(libbacktrace: ZNK16requirement_data23can_make_with_inventoryERK9inventoryRKSt8functionIFbRK4itemEEi11craft_flags+0x12d@0x12bac6d),
(libbacktrace: 0x12bac6d [unknown src]:0 [unknown func]),
#8
(dbghelp: @0x46fbbe[cataclysm-tiles.exe+0x6fbbe]),
(libbacktrace: ZL23are_requirements_nearbyRKSt6vectorI8tripointSaIS0_EERK9string_idI16requirement_dataER6playerRKS5_I13activity_typeEbS0_.constprop.2781+0x7ae@0x46fbbe),
(libbacktrace: 0x46fbbe [unknown src]:0 [unknown func]),
#9
(dbghelp: @0x4750bc[cataclysm-tiles.exe+0x750bc]),
(libbacktrace: ZL40generic_multi_activity_check_requirementR6playerRK9string_idI13activity_typeER20activity_reason_infoRK8tripointSA_RKSt13unordered_setIS8_St4hashIS8_ESt8equal_toIS8_ESaIS8_EE.constprop.2761+0x8dc@0x4750bc),
(libbacktrace: 0x4750bc [unknown src]:0 [unknown func]),
#10
(dbghelp: @0x47fd54[cataclysm-tiles.exe+0x7fd54]),
(libbacktrace: Z30generic_multi_activity_handlerR15player_activityR6player+0x394@0x47fd54),
(libbacktrace: 0x47fd54 [unknown src]:0 [unknown func]),
#11
(dbghelp: @0x4835dc[cataclysm-tiles.exe+0x835dc]),
(libbacktrace: ZNK13activity_type12call_do_turnEP15player_activityP6player+0xfc@0x4835dc),
(libbacktrace: 0x4835dc [unknown src]:0 [unknown func]),
#12
(dbghelp: @0x12164f9[cataclysm-tiles.exe+0xe164f9]),
(libbacktrace: ZN15player_activity7do_turnER6player+0xd9@0x12164f9),
(libbacktrace: 0x12164f9 [unknown src]:0 [unknown func]),
#13
(dbghelp: @0x90dfda[cataclysm-tiles.exe+0x50dfda]),
(libbacktrace: ZN4game16process_activityEv+0x8a@0x90dfda),
(libbacktrace: 0x90dfda [unknown src]:0 [unknown func]),
#14
(dbghelp: @0x95ccdb[cataclysm-tiles.exe+0x55ccdb]),
(libbacktrace: ZN4game7do_turnEv+0x2eb@0x95ccdb),
(libbacktrace: 0x95ccdb [unknown src]:0 [unknown func]),
#15
(dbghelp: IMG_LoadWEBP_RW+0x8fe9dc@0x2038bdc[cataclysm-tiles.exe+0x1c38bdc]),
(libbacktrace: main+0x10fc@0x2038bdc),
(libbacktrace: 0x2038bdc [unknown src]:0 [unknown func]),
#16
(dbghelp: @0x4013ed[cataclysm-tiles.exe+0x13ed]),
(libbacktrace: tmainCRTStartup+0x23d@0x4013ed),
(libbacktrace: 0x4013ed /home/narc/src/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-5.4.0.build
/mingw-w64-v5.0.2/mingw-w64-crt/crt/crtexe.c:336 _tmainCRTStartup),
#17
(dbghelp: @0x4014fb[cataclysm-tiles.exe+0x14fb]),
(libbacktrace: WinMainCRTStartup+0x1b@0x4014fb),
(libbacktrace: 0x4014fb /home/narc/src/mxe/tmp-gcc-x86_64-w64-mingw32.static/gcc-5.4.0.build
/mingw-w64-v5.0.2/mingw-w64-crt/crt/crtexe.c:186 WinMainCRTStartup),
#18
(dbghelp: BaseThreadInitThunk+0x14@0x7ffe7dba7bd4[KERNEL32.DLL+0x17bd4]),
(backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
(backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),
#19
(dbghelp: RtlUserThreadStart+0x21@0x7ffe7e8aced1[ntdll.dll+0x6ced1]),
(backtrace_syminfo failed: errno = -1, msg = no symbol table in PE/COFF executable),
(backtrace_pcinfo failed: errno = -1, msg = no debug info in PE/COFF executable),
Backtrace emission took 0 seconds.
src/recipe_dictionary.cpp:60 [const T& string_id::obj() const [with T = recipe]] invalid recipe id ""

@Funguss
Copy link
Contributor

Funguss commented Feb 29, 2020

Duplicate of #38159 but better written. 😛 It's something that happens with "no seed" in general, occasionally with butchering, too, but that may be due to Magiclysm's tainted blood.

I thought harvested plots reverted to pile of dirt on harvest? I find myself using No Seed a lot to till soil before planting, so I'd find losing that functionality a bit troubling. Maybe an explicit harvest zone would be better.

@jkraybill
Copy link
Contributor Author

@Funguss harvested plots revert to untilled soil and need to be re-tilled before planting.

I do plan on adding something like "till only", "plant only", and "harvest only" designations for farm plots in 0.F if it hasn't been otherwise addressed by then. Maybe as an option for existing farm plots instead of a full designation, as it would be nice to switch farming modes without having to re-define the plot each time.

@Funguss
Copy link
Contributor

Funguss commented Feb 29, 2020

Aha, like how custom filters work? That sounds like an excellent idea! Anything that reduces designation and zone list bloat is a good thing.

It would be nice to see some cohesion between zones and less redundancy. Rather than having a list of possible loot zones it would be tidier to have a single loot zone with category and material toggle lissts, with further filtering, priorities and fill goals. Refactoring zones into an object oriented style would help with this and UI implementation going forward, but I doubt you want to go that far. 😛 Of course, those changes would make zone painting a bigger problem. I guess it currently piggybacks some of the map editor code? All of it is a bit clunky and seems like one area mouse integration would actually be useful.

I'm getting carried away...

@jkraybill
Copy link
Contributor Author

Well I'm definitely not going to take it that far myself, but it would be great to eventually get to a system that works like how Rimworld handles stockpiles, where each zone has allowed inputs and a priority!

All I'm planning to do is to allow farm plots to specify which combo of till/plant/harvest they allow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants