zoid icon indicating copy to clipboard operation
zoid copied to clipboard

Stack overflow with object parameters on child-side vue v2.5.x

Open doublemarked opened this issue 6 years ago • 2 comments

xcomponent in the child frame is performing some sort of reactivity that is clashing with Vue's own reactivity for object parameters passed to the component. This appears to be only since Vue v2.5, but nonetheless, it is problematic that xcomponent could be interfering like this in client behavior.

The problem occurs within replaceObject, which implements a getter that modifies state. Vue's reactivity appears to respond to that state change in a way that ultimately calls the replaceObject getter again, spiraling into a stack overflow.

I've implemented a test which demonstrates this error, within the following branch on my fork of xcomponent,

https://github.com/krakenjs/xcomponent/compare/master...doublemarked:hm/vue-client-stack-overflow-error

doublemarked avatar May 06 '18 20:05 doublemarked

Are you still seeing this issue with the latest version?

bluepnume avatar Sep 02 '19 17:09 bluepnume

So, good news: I've ported my test case over to the latest zoid and can no longer reproduce it there. Later this week I'll revert the workaround we put in our main codebase and confirm whether it's gone there as well.

doublemarked avatar Sep 03 '19 10:09 doublemarked