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

Comments

Projects
None yet
1 participant
@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?

@ddfreyne

This comment has been minimized.

Copy link
Member

ddfreyne commented Aug 12, 2014

Can you share the full crash.log please?

@ghost

This comment has been minimized.

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?

@ddfreyne

This comment has been minimized.

Copy link
Member

ddfreyne commented Aug 15, 2014

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.

@ddfreyne ddfreyne added the bug label Aug 15, 2014

@ddfreyne ddfreyne added this to the 3.7.3 milestone Aug 17, 2014

@ddfreyne ddfreyne removed this from the 3.7.3 milestone Aug 31, 2014

@ddfreyne

This comment has been minimized.

Copy link
Member

ddfreyne commented Aug 31, 2014

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

@ghost

This comment has been minimized.

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.

@ddfreyne ddfreyne added the fix clear label Sep 6, 2014

@ddfreyne ddfreyne modified the milestone: 3.7.4 Sep 6, 2014

@ddfreyne ddfreyne referenced this issue Nov 15, 2014

Closed

release 3.7.4 #495

@ddfreyne ddfreyne removed this from the 3.7.4 milestone Nov 15, 2014

@ddfreyne ddfreyne modified the milestone: 3.7.5 Nov 29, 2014

@ddfreyne ddfreyne removed the fix is known label Dec 6, 2014

@ddfreyne

This comment has been minimized.

Copy link
Member

ddfreyne commented Jan 10, 2015

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

@ddfreyne

This comment has been minimized.

Copy link
Member

ddfreyne commented Jan 11, 2015

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

@ddfreyne ddfreyne closed this Jan 11, 2015

ddfreyne added a commit that referenced this issue Jan 11, 2015

ddfreyne 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
You can’t perform that action at this time.