Spine JS::RangeError:超出最大调用堆栈大小
问题
我正在导航到正在激活我的控制器的链接。 在我的控制器中执行以下行时超出了最大调用堆栈:@log(Model.all())
。
Model.all()
有 0 条记录 控制器是 4 个类中的 28 个函数,超过 200 行
问题
- 什么是 Spine/JS 术语中的调用堆栈:它是一个函数吗?一个班?一个模块?
- 调用堆栈限制是由浏览器、JS、JQuery 或 Spine 施加的吗? 可能的浏览器限制
- 这是一个常见问题吗?如果是,我该如何避免它使用 Spine JS 时?
Problem
I am navigating to a link which is activating my controller.
The maximum call stack is exceeded when executing the line: @log(Model.all())
within my controller.
Model.all()
has 0 records
The controller is 28 functions in 4 classes, over 200 lines
Questions
- What is a call stack in Spine/JS terms: is it a function? a class? a module?
- Are the call stack limits imposed by the Browser,JS, JQuery or Spine? possible browser limits
- Is this a common problem, and if so how can I avoid it while using Spine JS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果删除该行应用程序会继续运行吗?
否则,我认为对于那些小类/函数,您的代码更有可能出现问题。我认为某些函数不断调用自身,导致堆栈大小变得太大。
If you remove that line the app keeps working?
Otherwise I think with that little classes / functions it's more likely to be an issue with your code. I think some function keeps calling itself which causes the stacksize to become too big.