Skip to content
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

SystemStackError when updating from 3.6.9 to 3.6.10 #469

Closed
ghost opened this issue Aug 12, 2014 · 7 comments
Closed

SystemStackError when updating from 3.6.9 to 3.6.10 #469

ghost opened this issue Aug 12, 2014 · 7 comments
Milestone

Comments

@ghost
Copy link

ghost commented Aug 12, 2014

After updating I get:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/forwardable.rb:174: stack level too deep (SystemStackError)

Removed the tmp directory and the error changes to:

/Library/Ruby/Gems/2.0.0/gems/nanoc-3.6.10/lib/nanoc/base/checksummer.rb:25: stack level too deep (SystemStackError)

Same happens with 3.7.1.

Is there anything I can do to narrow down the issue?

@denisdefreyne
Copy link
Member

Can you share the full crash.log please?

@ghost
Copy link
Author

ghost commented Aug 12, 2014

Unfortunately crash.log isn't updated when this happens.

I've added pp(obj) at checksummer.rb:26 and now I get:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/prettyprint.rb:311: stack level too deep (SystemStackError)

During preprocessing I create index pages that reference sub-pages and those sub-pages in turn reference their index page. Could this be the cause?

@denisdefreyne
Copy link
Member

Using items in attributes directly is not supported. Instead of using items directly, you can use the identifier. For example:

# (in the preprocessor)

# Replace this:
@item[:something] = @items['/stuff/']

# With this:
@item[:something_identifier] = @items['/stuff/'].identifier

When you need the actual item itself at some point, you can find it using its identifier:

# Replace this:
the_item_i_want = @item[:something]

# With this:
the_item_i_want = @items[@item[:something_identifier]]

Let me know if this solves your problem.

nanoc doesn’t prevent items, layouts, … from being used in attributes, so that’s a bug. Needs a bit more thought on how to fix this properly though.

@denisdefreyne denisdefreyne added this to the 3.7.3 milestone Aug 17, 2014
@denisdefreyne denisdefreyne removed this from the 3.7.3 milestone Aug 31, 2014
@denisdefreyne
Copy link
Member

The fix for this won’t make it into 3.7.3, but I’ll tackle it later (3.7.4 hopefully).

@ghost
Copy link
Author

ghost commented Sep 3, 2014

Replaced all item references with item identifier strings and now everything works with 3.7.3.

Another thing came up while changing the code. I had images like this:

content/some/path/1.png
content/some/path/2.png

And would wrap HTML pages around them:

output/some/path/1.html
output/some/path/1.png
output/some/path/2.html
output/some/path/2.png

So I had two different items with the same identifier, one binary and one not. This worked fine as long as I was keeping a reference to the dynamically created non-binary item. Now, using identifiers I had to rename the images.

Thank you very much for your help.

@denisdefreyne
Copy link
Member

A fix for this, which allows items and layouts in attributes again, is in #518.

@denisdefreyne
Copy link
Member

Fixed by #518. This’ll go in 3.7.5.

denisdefreyne added a commit that referenced this issue Jan 11, 2015
denisdefreyne added a commit that referenced this issue Jan 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant