Closed tmcw closed 2 years ago
Thank you for the report. This looks concerning. @arv is going to look into it soon.
@tmcw Which version is this?
Assuming v10.0.0-beta.0
I get:
npx stacktracify out/replicache.mjs.map
RangeError: Maximum call stack size exceeded
at (../src/dag/lazy-store.ts:489:34)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
at (../src/dag/lazy-store.ts:489:26)
at (../src/dag/lazy-store.ts:498:15)
at Array.forEach
The only way I think this can happen based on looking at the code is that a chunk is referencing itself. Something that should never happen.
@tmcw I'm going to add some asserts and attach a tarball here that you can try
Attached is a new build with asserts as well as the sourcemap for that build.
Fixed
Encountering the below in prod:
It looks like there's some recursive code that isn't finding an end condition here.