Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Stack level too deep #47

@satb

Description

@satb

See issue # 23 in which I was asked to open a new issue. This is still a problem.

Using JRuby 1.7.2 and rails 3.2.12. I am using the "closure_tree" gem that has some sort of recursion. Don't know if that is causing this.

SystemStackError - stack level too deep:
org/jruby/RubyProc.java:261:in call' org/jruby/RubyProc.java:249:incall'
org/jruby/RubyHash.java:681:in default' org/jruby/RubyHash.java:1070:in[]'
(gem) actionpack-3.2.12/lib/action_view/template/resolver.rb:127:in query' org/jruby/RubyArray.java:2595:inreject!'
org/jruby/RubyArray.java:2558:in reject' (gem) actionpack-3.2.12/lib/action_view/template/resolver.rb:126:inquery'
(gem) actionpack-3.2.12/lib/action_view/template/resolver.rb:117:in find_templates' (gem) actionpack-3.2.12/lib/action_view/template/resolver.rb:46:infind_all'
(gem) actionpack-3.2.12/lib/action_view/template/resolver.rb:77:in cached' (gem) actionpack-3.2.12/lib/action_view/template/resolver.rb:45:infind_all'
(gem) actionpack-3.2.12/lib/action_view/path_set.rb:65:in find_all' org/jruby/RubyArray.java:1613:ineach'
(gem) actionpack-3.2.12/lib/action_view/path_set.rb:64:in find_all' org/jruby/RubyArray.java:1613:ineach'
(gem) actionpack-3.2.12/lib/action_view/path_set.rb:63:in find_all' (gem) actionpack-3.2.12/lib/action_view/path_set.rb:58:infind'
(gem) actionpack-3.2.12/lib/action_view/lookup_context.rb:109:in find' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:79:insource'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:43:in digest' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:32:indigest'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:297:in fetch' (gem) activesupport-3.2.12/lib/active_support/cache.rb:520:ininstrument'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:296:in fetch' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:31:indigest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:85:in dependency_digest' org/jruby/RubyArray.java:2348:incollect'
org/jruby/RubyArray.java:2356:in collect' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:84:independency_digest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:43:in digest' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:32:indigest'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:297:in fetch' (gem) activesupport-3.2.12/lib/active_support/cache.rb:520:ininstrument'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:296:in fetch' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:31:indigest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:85:in dependency_digest' org/jruby/RubyArray.java:2348:incollect'
org/jruby/RubyArray.java:2356:in collect' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:84:independency_digest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:43:in digest' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:32:indigest'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:297:in fetch' (gem) activesupport-3.2.12/lib/active_support/cache.rb:520:ininstrument'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:296:in fetch' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:31:indigest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:85:in dependency_digest' org/jruby/RubyArray.java:2348:incollect'
org/jruby/RubyArray.java:2356:in collect' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:84:independency_digest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:43:in digest' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:32:indigest'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:297:in fetch' (gem) activesupport-3.2.12/lib/active_support/cache.rb:520:ininstrument'
(gem) activesupport-3.2.12/lib/active_support/cache.rb:296:in fetch' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:31:indigest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:85:in dependency_digest' org/jruby/RubyArray.java:2348:incollect'
org/jruby/RubyArray.java:2356:in collect' (gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:84:independency_digest'
(gem) cache_digests-0.2.0/lib/cache_digests/template_digestor.rb:43:in `digest'

Not having issues if I remove "cache_digests". It works without causing the "stack too deep" problem with just fragment caching

application.html.erb has:

<% root_children = Category.root.children %>
                    <% cache "menu" do %>
                        <ul class="nav">
                          <% root_children.each do |c| %>
                            <%= render partial: "categories/menu", locals: {category: c} %>
                          <% end %>
                        </ul>
                    <% end %>

category/_menu.html.erb

<% if not (category.leaf?) %>
    <li class="dropdown">
      <a data-toggle="dropdown" class="dropdown-toggle" href="#"><%= category.name %><span class="caret"></span></a>
      <ul class="dropdown-menu">
        <li>
            <%= link_to "All #{pluralize("", category.name)}'", items_path(category_id: category)  %>
        </li>
        <% category.children.each do |c| %>
            <%= render partial: "categories/menu", locals: {category: c} %>
        <% end %>
      </ul>
    </li>
<% else %>
    <%= render partial: "categories/menu_item", locals: {category: category} %>
<% end %>

category/_menu_item.html.erb

<li>
  <%= link_to "#{category.name}", items_path(category_id: category) %>
</li>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions