I've just ran into this or something similar with throwable.getSuppressed()[0].getCause() == throwable.
Sure, such a cycle is a bug itself, but how am I supposed to fix it, when all I get is

java.lang.StackOverflowError: null
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:66)
        at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:60)
        at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:60)
        at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:60)
        at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:72)

with the last two lines repeated again and again?

To be constructive: It'd be nice if logback would not only detect such a situation, but also print some information like
throwable.getSuppressed()[0].getSuppressed()[0] == throwable
for the originally reported case or
throwable.getSuppressed()[0].getCause() == throwable
for my case. It may be helpful sometimes.

While I know the cycle and can reproduce the problem, I still have no idea how it actually happens.

Regards, Martin.


On Sat, Jan 20, 2018 at 7:35 AM, QOS.CH (JIRA) <noreply-jira@qos.ch> wrote:
Ceki Gülcü commented on Bug LOGBACK-1027
 
Re: Circular Referenced Suppressed Exception Throws StackOverflowError

My apologies, your CLA was already in file.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.1#73012-sha1:68837e3)
Atlassian logo

_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev