{"action":"created","issue":{"url":"https://api.github.com/repos/knockout/knockout/issues/1934","labels_url":"https://api.github.com/repos/knockout/knockout/issues/1934/labels{/name}","comments_url":"https://api.github.com/repos/knockout/knockout/issues/1934/comments","events_url":"https://api.github.com/repos/knockout/knockout/issues/1934/events","html_url":"https://github.com/knockout/knockout/issues/1934","id":118745938,"number":1934,"title":"'deferUpdates', 'with' binding, new VM, and a validation extender - recursion","user":{"login":"petemill","id":741836,"avatar_url":"https://avatars.githubusercontent.com/u/741836?v=3","gravatar_id":"","url":"https://api.github.com/users/petemill","html_url":"https://github.com/petemill","followers_url":"https://api.github.com/users/petemill/followers","following_url":"https://api.github.com/users/petemill/following{/other_user}","gists_url":"https://api.github.com/users/petemill/gists{/gist_id}","starred_url":"https://api.github.com/users/petemill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petemill/subscriptions","organizations_url":"https://api.github.com/users/petemill/orgs","repos_url":"https://api.github.com/users/petemill/repos","events_url":"https://api.github.com/users/petemill/events{/privacy}","received_events_url":"https://api.github.com/users/petemill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-11-25T02:23:30Z","updated_at":"2015-11-25T22:02:45Z","closed_at":null,"body":"When using the latest version of knockout, v3.4 with knockout-validation v2.0.3, I get some crashes due to infinite recursion. I have narrowed it down to the following case, where a with: binding instantiates a new VM object containing an observable with a validation extender. The problem does not happen when the validation extender is removed. Apologies for cross-posting the issue to both knockout-validation and knockout, but I thought it's worth posting here too in case it's an issue requiring exploration in the core.\r\n\r\nHTML:\r\n```html\r\n<div data-bind=\"with: EditableRepVM($data)\">\r\n  <p data-bind=\"text: Name\"></p>\r\n</div>\r\n```\r\n\r\nJS:\r\n```javascript\r\nko.options.deferUpdates = true;\r\nclass ViewModel {\r\n  constructor(){\r\n    \r\n  }\r\n  \r\n  \r\n  EditableRepVM(nonEditableData) {\r\n    \r\n    console.debug('EditableRepVM called');\r\n    var newItem = {\r\n    };\r\n    newItem.Name = ko.observable('default name').extend({required: true});\r\n    return newItem;\r\n  }\r\n}\r\nko.applyBindings(new ViewModel());\r\n```\r\n\r\nWith the above, console output is:\r\n```\r\nEditableRepVM called\r\nEditableRepVM called\r\nEditableRepVM called\r\n...\r\nUncaught Error: 'Too much recursion' after processing 5000 task groups.\r\n@ processTasks\t@\tknockout-debug.js:1081\r\n```\r\n\r\nWhen removing the validation extender, 'EditableRepVM called' is only logged once, as expected and the page does not crash.\r\n\r\nHere is a codepen demonstrating this case. Remove the commented code to experience the issue:\r\nhttp://codepen.io/petemill/pen/GpaPOO?editors=101"},"comment":{"url":"https://api.github.com/repos/knockout/knockout/issues/comments/159741593","html_url":"https://github.com/knockout/knockout/issues/1934#issuecomment-159741593","issue_url":"https://api.github.com/repos/knockout/knockout/issues/1934","id":159741593,"user":{"login":"petemill","id":741836,"avatar_url":"https://avatars.githubusercontent.com/u/741836?v=3","gravatar_id":"","url":"https://api.github.com/users/petemill","html_url":"https://github.com/petemill","followers_url":"https://api.github.com/users/petemill/followers","following_url":"https://api.github.com/users/petemill/following{/other_user}","gists_url":"https://api.github.com/users/petemill/gists{/gist_id}","starred_url":"https://api.github.com/users/petemill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petemill/subscriptions","organizations_url":"https://api.github.com/users/petemill/orgs","repos_url":"https://api.github.com/users/petemill/repos","events_url":"https://api.github.com/users/petemill/events{/privacy}","received_events_url":"https://api.github.com/users/petemill/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T22:02:45Z","updated_at":"2015-11-25T22:02:45Z","body":"thanks @mbest . FYI, I've done this in the past mostly when creating a set of new observables to allow the user to edit some values without affecting the originals until the user saves (or cancels) the edit operation."}}