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

StackOverflowError when creating asciidoctor object #299

Closed
pmagon opened this issue May 6, 2015 · 3 comments
Closed

StackOverflowError when creating asciidoctor object #299

pmagon opened this issue May 6, 2015 · 3 comments

Comments

@pmagon
Copy link

pmagon commented May 6, 2015

In asciidoctorj-1.6.0:

System.out.println ("CREATE");
Asciidoctor asciidoctor = JRubyAsciidoctor.create ();
System.out.println ("OK");

The second "System.out.println" breaks.... It seems that "System.out" has been changed on "create"
If I save and restore "System.out" after the call I get the same error on "asciidoctor.convertFiles"...

Robert Panzer said:

I think the StackOverflow comes from here:
https://github.com/asciidoctor/asciidoctorj/blob/asciidoctorj-1.6.0/asciidoctorj-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fasciidoctor%2Finternal%2FJRubyAsciidoctor.java#L40

This is what we already discussed about.
It does not occur in the gradle tests because Gradle injects its own JUL Logger which breaks the cycle between catching System.out and forwarding it to the default ConsoleHandler which again does a System.out.

@mojavelinux
Copy link
Member

mojavelinux commented May 6, 2015 via email

@robertpanzer
Copy link
Member

There is surely a reason for capturing System.out.
If it is a requirement to do so we should look if there is another solution for this.

@mojavelinux
Copy link
Member

There's already a solution coming. I really want to just remove the code and let it be handled the proper way once the change is made in core. See asciidoctor/asciidoctor#44. AsciidoctorJ shouldn't be trying to solve this problem, IMO.

robertpanzer added a commit to robertpanzer/asciidoctorj that referenced this issue May 7, 2015
lordofthejars added a commit that referenced this issue May 8, 2015
Fixes #299: Removed rerouting of System.out and System.err to JUL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants