Michael Franzl
2008-Aug-31 14:24 UTC
[webgen-users] stack level too deep - an elusive bug?
I was experimenting with template chains and detected the following issue with webgen-0.5.3: Generating tree... An error has occurred: stack level too deep The weird thing is that after deleting `webgen.cache`, website compilation is successfully. When `webgen` is run immediately after this successful compilation (i.e. without changing any files), the error above shows up. After that, *every* compilation will end with this error, independent of source files changes. Deleting `webgen.cache` every time wouldn''t bother me much, but my website will have pretty big volume and I estimate computation times of up to a few minutes. Maybe you can reproduce the error. I started with a new project. Those are my files: begin default.template Formatted headers and abstracts of selected articles will be shown here <webgen:block name=''content'' chain="selected-aricles.template" /> end default.template begin selected-articles.template Those are the selected articles (article-a.html and article-b.html) <webgen:block name=''content'' chain="single-article.template;article-a.html" /> <webgen:block name=''content'' chain="single-article.template;article-b.html" /> end selected-articles.template begin single-article.template <some-html> <webgen:block name=''header'' /> </some-html> <some-html> <webgen:block name=''abstract'' /> </some-html> end single-article.template begin article-a.page --- name:content here comes the whole content of the article A, to be included elsewhere --- name:header just the header of the article A --- name:abstract just the abstract of the article A end article-a.page begin article-b.page (same as article A) end article-b.page Any hints appreciated, thanks a lot, Michael
Thomas Leitner
2008-Aug-31 17:49 UTC
[webgen-users] stack level too deep - an elusive bug?
Am Sun, 31 Aug 2008 16:24:42 +0200 schrieb Michael Franzl <m.franzl at aon.at>:> I was experimenting with template chains and detected the following > issue with webgen-0.5.3: > > Generating tree... > An error has occurred: stack level too deep > > The weird thing is that after deleting `webgen.cache`, website > compilation is successfully. When `webgen` is run immediately after > this successful compilation (i.e. without changing any files), the > error above shows up. After that, *every* compilation will end with > this error, independent of source files changes.I have found the problem and I''m working on a solution. Will keep you informed! -- Thomas
Thomas Leitner
2008-Sep-02 06:23 UTC
[webgen-users] stack level too deep - an elusive bug?
Am Sun, 31 Aug 2008 16:24:42 +0200 schrieb Michael Franzl <m.franzl at aon.at>:> I was experimenting with template chains and detected the following > issue with webgen-0.5.3: > > Generating tree... > An error has occurred: stack level too deep > > The weird thing is that after deleting `webgen.cache`, website > compilation is successfully. When `webgen` is run immediately after > this successful compilation (i.e. without changing any files), the > error above shows up. After that, *every* compilation will end with > this error, independent of source files changes. > > Deleting `webgen.cache` every time wouldn''t bother me much, but my > website will have pretty big volume and I estimate computation times > of up to a few minutes. > > Maybe you can reproduce the error. I started with a new project. > Those are my files:Thanks for providing the files. They helped in reproducing the error. It worked exactly like you said, or more specifically, it didn''t work, like you said :) The problem comes from checking if a node or its meta information has changed. If there are circular dependencies, you will get the `stack level too deep` error. I have now included a check that prevents from including one node multiple times in the same change check. After doing some more updates I will release the next webgen version with this bug fix at the end of this week. Thanks again for finding the bug! -- Thomas