Ok, so I cleaned it up "a little" (removed fixtures and globals) and I uncovered an interesting fact. When I got rid of the globals as in the example below, I do not see the error. But if you remove the "var" keyword from Volume and Policy, you will get the max callstack error.
- test("Max Callstack Exceeded", function() {var Policy = can.Model({id: 'name',attributes: {cacheDetails: 'Cache.model'},findAll: function() {var dfd = can.Deferred();setTimeout(function() {dfd.resolve([{"name": "S3 cached","cacheDetails": {"name": "Cache 0","dataVolumes": [{"name": "S3 volume",},{"name": "Water",}]},"volumes": [{"name": "S3 volume"},{"name": "Water"}]}]);}, 100);return dfd;},destroy: "DELETE /policies/{id}"}, {});var Cache = can.Model({id: 'name',attributes: {dataVolumes: 'Volume.models'}}, {});var Volume = can.Model({id: 'name',attributes: {cacheDetails: 'Cache.model'},findOne: function() {var dfd = can.Deferred();setTimeout(function() {dfd.resolve({"name": "Water","cacheDetails": {"name": "Cache 0"}});}, 100)return dfd;},destroy: function() {var dfd = can.Deferred();setTimeout(function() {dfd.resolve(true);}, 100)return dfd;}}, {getName: function() {}});can.view.ejs("ejs","name: <%= v.attr('name') %>")stop();Volume.findOne({id: 'Water'}).then(function(v) {// Comment this line out and no maximum call stack errorcan.$('#dummy').append(can.view('ejs', {v: v}))// Second call to Policy.findAll is what seems to trigger the issue// Comment this line out and no maximum call stack errorPolicy.findAll().then(function() {v.destroy().then(function() {start();equal(1,1, "We made it here so all good!");})});});});