nornagon / cdda-guide

The Hitchhiker's Guide to the Cataclysm
https://cdda-guide.nornagon.net
GNU General Public License v3.0
113 stars 27 forks source link

Recursion error #73

Open aMegaSloth opened 2 years ago

aMegaSloth commented 2 years ago

Not sure what is going on but there seems to be a recursion error that came up within the last 24 hours or so. I see it on most things, mostly items. The specific link/item I am looking at for example is the food processor

https://nornagon.github.io/cdda-guide/#/item/food_processor

There was a problem displaying this page. Not all versions of Cataclysm are supported by the Guide currently. Try selecting a different build.

too much recursion

Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173094
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173275
Tl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171806
kl/</<.loot<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171638
kl/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171611
kl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171522
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173967
Il/</<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173178
Il/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173162
Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173131
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173921
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174100
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174090
Tl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171806
kl/</<.loot<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171638
kl/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171611
kl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171522
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173967
Il/</<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173178
Il/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173162
Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173131
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173921
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174100
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174090
Tl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171806
kl/</<.loot<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171638
kl/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171611
kl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171522
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173967
Il/</<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173178
Il/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173162
Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173131
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173921
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174100
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174090
Tl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171806
kl/</<.loot<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171638
kl/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171611
kl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171522
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173967
Il/</<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173178
Il/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173162
Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173131
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173921
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174100
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174090
Tl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171806
kl/</<.loot<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171638
kl/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171611
kl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171522
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173967
Il/</<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173178
Il/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173162
Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173131
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173921
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174100
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174090
Tl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171806
kl/</<.loot<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171638
kl/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171611
kl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171522
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173967
Il/</<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173178
Il/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173162
Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173131
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173921
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174100
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174090
Tl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171806
kl/</<.loot<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171638
kl/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171611
kl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:171522
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173967
Il/</<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173178
Il/<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173162
Il@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173131
Rl@https://nornagon.github.io/cdda-guide/build/bundle.js:1:173921
Rl/o<@https://nornagon.github.io/cdda-guide/build/bundle.js:1:174100

image

Xtrem532 commented 2 years ago

Last working build seems to be "cdda-experimental-2022-05-21-1817", tho i didn't do any deep testing

Laraso commented 2 years ago

I am also experiencing this issue. I use this tool constantly while playing, so it's kind of a bummer that it's unusable ATM.

opy188 commented 2 years ago

it's probably a simple fix. Just a matter of the dev getting to it when they can

nornagon commented 2 years ago

Thanks, I'm aware of this! Haven't had time to fix yet, but hopefully will get to it in the next few days.

nornagon commented 2 years ago

okay, the problem here is that the aircraft_carrier_palette palette is recursive.

  1. aircraft_carrier_palette specifies that δ means crates_supplies_mechanics (sometimes)
  2. crates_supplies_mechanics uses aircraft_carrier_palette as a palette, though it only uses the Ж character

this results in infinite recursion trying to parse out the item probabilities for the aircraft_carrier_palette palette.

this could be fixed in the game's JSON by breaking this recursion and making the definition of crates_supplies_mechanics not depend on the aircraft_carrier_palette palette. i'm not sure yet how to resolve this in the Guide, maybe we need to parse palettes per-character instead of all at once? don't have time yet to dig into it, but if someone wants to fix the JSON in the game that should unbreak the Guide.

nornagon commented 2 years ago

hopefully 26b19d2 will stop the Guide from crashing, but it does not solve the underlying issue and will result in inaccurate spawn info for mapgens which use aircraft_carrier_palette.

opy188 commented 2 years ago

dang, that does seem like a bit of a complex issue. I would love to try and help with the issue if I was any sort of competent with c++

nornagon commented 2 years ago

@opy188 no C++ needed, the issue in the game is with the JSON only. The guide itself is written in TypeScript.

taatu commented 2 years ago

This seems to be fixed now

nornagon commented 2 years ago

It's hidden but not fixed; the spawn info is inaccurate for mapgens with aircraft_carrier_palette (or any other recursive palette)