-
-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ember-source 3.13] Infinite loop causes stack overflow #659
Comments
While I reproduced this problem in tests it can also be seen in a running app. In my PR for demo purposes I've just added the following code to the <MyComponent @model={{model}}/> This also results in an infinite loop and stack overflow which breaks rendering but with what looks like a different path than the test
|
This should be fixed by emberjs/ember.js#18406 |
Fix has been released in https://github.com/emberjs/ember.js/releases/tag/v3.13.0 |
Environment
master
While preparing our app to be Ember 3.13-ready we've come across a number of infinite loops which cause our app to crash. I'm not exactly sure what the problem is but I think it has to do with the recent
@tracked
internal changes which are shipping with 3.13. The failing tests I've created in #660 here are passing in 3.12.0 but start failing when I bump to 3.13.0-beta.1.Steps to Reproduce
I have a component called
<MyComponent />
. It has a computed property which is based oncheese
which can be passed in and some validations on a passed in model,model.validations.isValid
. The validations are nothing special and in my reproduction case are just using what where being used for tests in the ember-cp-validations repo.If
cheese
isundefined
it seems to cause an infinite loop in themodel.validations.isValid
part of the computed property.console.log
-ing what is output on the_getPath
line shows that it seems to be stuck in some sort of loop trying to retrieve the validation for theusername
, before it throws a stack overflowStrangely, doing a few things here cause the infinite loop not to occur and the test to pass fine.
this.model.validations
orthis.model.validations.isValid
first beforethis.myProp
. Callingthis.model
doesn't resolve the infinite loop. Moving thethis.model....
call AFTERthis.myProp
also doesn't solve the infinite loop.and
computed property resolves the infinite loop. Having theundefined
cheese
property second solves the problem.The text was updated successfully, but these errors were encountered: