#1000903

StackOverflowError when changing the log level and adding a console appender

    • Created on: Fri, Feb 10 (3 months ago)
    • Reported by: Iulian Dragos
    • Assigned to: Mirco Dotta
    • Milestone: Helium M1
    • Type: Defect
    • Version: 2.1.0-nightly-29
    • Operative System: -
    • Status: Fixed
    • Priority: Normal (3)
    • Component: Eclipse
    • Permission type: Public
    • Fixed in version: -
    • Eclipse version: Helios
    I changed the setting from WARN to DEBUG, and checked the box for appending the output in the console. I immediately hit a StackOverflowError. Looks like the stdout redirection is at fault.


    java.lang.StackOverflowError
    	at java.util.Date.getTime(Date.java:866)
    	at org.apache.log4j.helpers.ISO8601DateFormat.format(ISO8601DateFormat.java:67)
    	at java.text.DateFormat.format(DateFormat.java:316)
    	at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:443)
    	at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:65)
    	at org.apache.log4j.PatternLayout.format(PatternLayout.java:506)
    	at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
    	at org.apache.log4j.RollingFileAppender.subAppend(RollingFileAppender.java:276)
    	at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
    	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
    	at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
    	at org.apache.log4j.Category.callAppenders(Category.java:206)
    	at org.apache.log4j.Category.forcedLog(Category.java:391)
    	at org.apache.log4j.Category.info(Category.java:666)
    	at scala.tools.eclipse.logging.log4j.Log4JAdapter.info(Log4JAdapter.scala:22)
    	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$1.apply(PluginLogConfigurator.scala:65)
    	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$1.apply(PluginLogConfigurator.scala:65)
    	at scala.tools.eclipse.logging.StreamRedirect$Redirect.write(PluginLogConfigurator.scala:88)
    	at java.io.PrintStream.write(PrintStream.java:430)
    	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
    	at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
    	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
    	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:116)
    	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:203)
    	at java.io.Writer.write(Writer.java:140)
    	at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:48)
    	at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
    	at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
    	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
    	at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
    	at org.apache.log4j.Category.callAppenders(Category.java:206)
    	at org.apache.log4j.Category.forcedLog(Category.java:391)
    	at org.apache.log4j.Category.info(Category.java:666)
    	at scala.tools.eclipse.logging.log4j.Log4JAdapter.info(Log4JAdapter.scala:22)
    	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$1.apply(PluginLogConfigurator.scala:65)
    	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$1.apply(PluginLogConfigurator.scala:65)
    	at scala.tools.eclipse.logging.StreamRedirect$Redirect.write(PluginLogConfigurator.scala:88)
    	at java.io.PrintStream.write(PrintStream.java:430)
    	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
    	at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
    	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
    	at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:116)
    	at java.io.OutputStreamWriter.write(OutputStreamWriter.java:203)
    	at java.io.Writer.write(Writer.java:140)
    	at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:48)
    	at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
    	at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
    	at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
    	at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
    	at org.apache.log4j.Category.callAppenders(Category.java:206)
    	at org.apache.log4j.Category.forcedLog(Category.java:391)
    	at org.apache.log4j.Category.info(Category.java:666)
    	at scala.tools.eclipse.logging.log4j.Log4JAdapter.info(Log4JAdapter.scala:22)
    	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$1.apply(PluginLogConfigurator.scala:65)
    	at scala.tools.eclipse.logging.StreamRedirect$$anonfun$1.apply(PluginLogConfigurator.scala:65)
    	at scala.tools.eclipse.logging.StreamRedirect$Redirect.write(PluginLogConfigurator.scala:88)
    ....
  • Followers
     
    Ico-users Mirco Dotta (Assigned To) , Iulian Dragos 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on Feb 10, 2012 @ 03:37pm UTC * By Iulian Dragos

    Type set to Defect
    Version changed from 2.0.0-final-29 to 2.1.0-nightly-29
    Assigned to set to dotta
    User picture

          on Feb 16, 2012 @ 05:19am UTC * By Mirco Dotta

    Milestone set to Helium M1
    User picture

          on Feb 20, 2012 @ 06:47am UTC * By Mirco Dotta

    Status changed from New to Fixed
    (In revision:6959a85cf7e047fe8a3f7821710cb8f05a5dbacd) Temporarily remove the SysOut/Err redirects while attaching the Console Appender to the set of log appenders.

    It has been noticed that enabling the console appender was generating a stackoverflow exception. The reason
    was that the standard output/error is being redirected to the logger, and attaching a console appender was
    causing a recursion.

    To avoid the recursion it is sufficient to disable the standard output/error redirects while attaching the
    console appender.

    Fix #1000903.

    Branch: issue/stackoverflow-logger-1000903
    User picture

          on Feb 21, 2012 @ 06:21am UTC * By Mirco Dotta

    (In revision:5277af4a52775e01361acba81990bb18b9fbad73) Temporarily remove the SysOut/Err redirects while attaching the Console Appender to the set of log appenders.

    It has been noticed that enabling the console appender was generating a stackoverflow exception. The reason
    was that the standard output/error is being redirected to the logger, and attaching a console appender was
    causing a recursion.

    To avoid the recursion it is sufficient to disable the standard output/error redirects while attaching the
    console appender.

    Fix #1000903.

    Integrated comments from pull #71.

    Branch: issue/stackoverflow-logger-1000903
    User picture

          on Feb 21, 2012 @ 06:23am UTC * By Mirco Dotta

    (In revision:5277af4a52775e01361acba81990bb18b9fbad73) Temporarily remove the SysOut/Err redirects while attaching the Console Appender to the set of log appenders.

    It has been noticed that enabling the console appender was generating a stackoverflow exception. The reason
    was that the standard output/error is being redirected to the logger, and attaching a console appender was
    causing a recursion.

    To avoid the recursion it is sufficient to disable the standard output/error redirects while attaching the
    console appender.

    Fix #1000903.

    Integrated comments from pull #71.

    Branch: master
    User picture

          on Mar 11, 2012 @ 03:46am UTC * By Mirco Dotta

    (In revision:5277af4a52775e01361acba81990bb18b9fbad73) Temporarily remove the SysOut/Err redirects while attaching the Console Appender to the set of log appenders.

    It has been noticed that enabling the console appender was generating a stackoverflow exception. The reason
    was that the standard output/error is being redirected to the logger, and attaching a console appender was
    causing a recursion.

    To avoid the recursion it is sufficient to disable the standard output/error redirects while attaching the
    console appender.

    Fix #1000903.

    Integrated comments from pull #71.

    Branch: platform/juno
    Time Expenditure
    Loading