S
SolidJS13mo ago
alloyed

stack overflow internal to solidjs?

Exception has occurred: RangeError: Maximum call stack size exceeded
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:896:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
Exception has occurred: RangeError: Maximum call stack size exceeded
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:896:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
at runUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:891:5)
at completeUpdates (file:/c:/typescript/node_modules/solid-js/dist/dev.js:942:17)
This occurs in dev mode but not in production? I still need to narrow down what is causing this / make a minimal repro, but the stack here isn't super helpful in doing that :/
10 Replies
REEEEE
REEEEE13mo ago
might be somewhere you are reading and writing a signal in an effect
alloyed
alloyedOP13mo ago
the problem being "reading and writing to the same signal in a single effect"? or so cause that'd make sense, i guess the clue for that would be at the very bottom of the stack tho
REEEEE
REEEEE13mo ago
does it happen at a certain point or when an action is made on the site? Maybe you can track it through that
alloyed
alloyedOP13mo ago
happens at startup; this is the first time I've tried to run it after porting; the mistake could be anywhere in my ported code I can just go caveman mode and start throwing console.log()s at the start of every effect
REEEEE
REEEEE13mo ago
so possibly in the root route assuming you're using a router or the App.tsx and/or possibly in a context
alloyed
alloyedOP13mo ago
okok, back from investigating! the approach that was the most fruitful was dropping console.log() calls right at the top of each createEffect() or set() call that i suspected could've been an issue. the ones in the loop then megaspammed, which made it easy to pinpoint. unfortunately for me, it's in highly generic library code so I've got more investigating to do on my end. Right now, swapping the offending effect for createRenderEffect() seems to make the problem go away, but that isn't really a solution, so back into the debugging mines for me. thank you~
REEEEE
REEEEE13mo ago
if you could show the code for the effect, maybe we can come up with a different solution
alloyed
alloyedOP13mo ago
so this isn't a repro but it gives a good vibe for what's actually going on. createRemoteDataStoreSignal is the thing I swapped with a render effect. If this screams to you "this should be a resource", that's because it did for me too! but the promise-based nature of resources make it bad for subscription-based APIs like this. I at least wanted to get the signal-only version working before playing with weird stuff like a promise that never completes or something like that
alloyed
alloyedOP13mo ago
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
alloyed
alloyedOP13mo ago
the way this actually is breaking down i think i just a loop between the key we use to query the data and the data itself somewhere, but if there's a less error-prone way of doing the same thing I'd rather do that ofc
Want results from more Discord servers?
Add your server