Details
- 
    Bug 
- 
    Resolution: Fixed
- 
    Major 
- 
    1.1.2, 1.3.0-alpha0
- 
    None
- 
    All 
Description
If an exception with a circular-referenced-suppressed exception is logged, logback will throw a StackOverflowError:
Exception e1 = new Exception(); Exception e2 = new Exception(); e2.addSuppressed(e1); e1.addSuppressed(e2); LoggerFactory.getLogger("root").error("Error", e1);
Will throw the following:
Exception in thread "main" java.lang.StackOverflowError
	at java.lang.ReflectiveOperationException.<init>(ReflectiveOperationException.java:89)
	at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:72)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:69)
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:75)
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:75)
	...
A simple stack trace printout will produce the following:
java.lang.Exception at NewClass.main(NewClass.java:95) Suppressed: java.lang.Exception at NewClass.main(NewClass.java:96) [CIRCULAR REFERENCE:java.lang.Exception]
Attachments
Issue Links
- is duplicated by
- 
                    LOGBACK-1454 StackOverflow error -         
- Resolved
 
-         
- links to
| 1. | port to the 1.2 branch |  | Resolved | Logback dev list | 
