Starcounter / DevTools

A browser extension that helps you debug Starcounter apps with ease
3 stars 1 forks source link

SDA crashes with Maximum call stack size exceeded #66

Closed Joltrix closed 6 years ago

Joltrix commented 6 years ago

Currently there is no steps to reproduce, only a stack trace:

Uncaught RangeError: Maximum call stack size exceeded
    at H (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at W (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at Sa.walk (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at new Sa (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at H (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at W (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at Sa.walk (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at new Sa (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at H (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
    at Sa.observeArray (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/ui-popup-build.js:1)
chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4 Uncaught RangeError: Maximum call stack size exceeded
    at JSON.stringify (<anonymous>)
    at i.updateListener (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at o (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at updateListeners.forEach (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at Array.forEach (<anonymous>)
    at Object.createRow (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at Object.onPatchSent (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at HTMLElement.fire (legacy-element-mixin.html:376)
    at HTMLElement.onPatchSent (palindrom-client.html:269)
    at w.send (palindrom-dom.min.js:2)
2chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4 Uncaught RangeError: Maximum call stack size exceeded
    at JSON.stringify (<anonymous>)
    at i.updateListener (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at o (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at updateListeners.forEach (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at Array.forEach (<anonymous>)
    at Object.createRow (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at Object.onPatchReceived (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at HTMLElement.fire (legacy-element-mixin.html:376)
    at HTMLElement.onPatchReceived (palindrom-client.html:262)
    at e.handleRemoteChange (palindrom-dom.min.js:2)
3chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4 Uncaught RangeError: Maximum call stack size exceeded
    at JSON.stringify (<anonymous>)
    at i.updateListener (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at o (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at updateListeners.forEach (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at Array.forEach (<anonymous>)
    at Object.createRow (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at Object.onPatchSent (chrome-extension://mpchkilmmalfopikamgellgdgoidhmnh/injected_script.js:4)
    at HTMLElement.fire (legacy-element-mixin.html:376)
    at HTMLElement.onPatchSent (palindrom-client.html:269)
    at w.send (palindrom-dom.min.js:2)
injected_script.js:4 Uncaught RangeError: Maximum call stack size exceeded
    at JSON.stringify (<anonymous>)
    at i.updateListener (injected_script.js:4)
    at o (injected_script.js:4)
    at updateListeners.forEach (injected_script.js:4)
    at Array.forEach (<anonymous>)
    at Object.createRow (injected_script.js:4)
    at Object.onPatchSent (injected_script.js:4)
    at HTMLElement.fire (legacy-element-mixin.html:376)
    at HTMLElement.onPatchSent (palindrom-client.html:269)
    at w.xhr (palindrom-dom.min.js:sourcemap:2)

image

cc @miyconst

alshakero commented 6 years ago

Thanks for reporting Dimitris! I'm looking at it. I think this is a duplicate of https://github.com/Starcounter/DevTools/issues/65.

alshakero commented 6 years ago

Fixed in https://github.com/Starcounter/DevTools/commit/e6c4cc3df5592d128b6e5f1a16ee075f241dc4d6. Poor Vue was filtering through 14.5K duplicated imports.

Released 3.1.0 for FF and Chrome. You should see it in your browser automatically by the morning. If the issue presists please make sure you're running 3.1.0, if it still persists even in 3.1.0 feel free to reopen this issue.

warpech commented 6 years ago

Is this normal that one app has 14.5K duplicated imports? I would expect hundreds, but not tens of thousands.... Did you evaluate why are there so many imports?

Joltrix commented 6 years ago

Im not sure if this is the same problem, but I am noticing some major lag issues when I have the debug aid open and try to navigate on a page

laaag (I have the debug aid in "Pop out" mode & have the Patches tab open)

If I close the debug aid, the lag disappears completely. @alshakero Should I reopen this issue, or create a new one? (or maybe its not an issue at all)

warpech commented 6 years ago

@Joltrix I guess it is fair question: What is the version of DevTools that you have?

miyconst commented 6 years ago

Today Heads also reported "major lags and hangs" for SDA, unfortunately without anything specific.

alshakero commented 6 years ago

Yes they're were a big motivation to release 3.1.0. Could you notify them about it? Even though Chrome and FF should do it auto.

I reopened for @Joltrix to maybe share some more information.

Joltrix commented 6 years ago

@warpech I'm using 3.1.0, as @alshakero said, it updated automatically without me having to do anything.

The only "sure way" of reproducing it that I know of is to open the debug aid as a pop out, open the patches tab, and leave it open, and then just click around on the page. on buttons / links / tabs etc. within a few seconds, it will start to lag

warpech commented 6 years ago

@alshakero did you manage to reproduce it?

alshakero commented 6 years ago

@warpech

Well yes, but it's I would say it's simply DevTools is rerendering a lot of stuff when the model mutates upon navigation. So I'm not sure if this is a bug or just bad performance that needs some enhancements that kinda take time.

@Joltrix is it just toleratable or downright useless? If it's the latter I can kill it with enough focus like the imports dupes thing. If it's toleratable I think we can focus of other stuff.

Joltrix commented 6 years ago

@alshakero Well, I haven't been using it that much as of late, but the times I've used it, I've managed to get the job done ;), So as you said, I think we can focus on other stuff and improve the debug aid at a later date :)

alshakero commented 6 years ago

I think I'll close this for the mean time then. Since it's not a bug or a failure. I have perf enhancements as a constant goal and this will get better with time.