qos-ch / logback

The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
Other
2.97k stars 1.28k forks source link

Stack Overflow in ThrowableProxy #830

Open jms72 opened 1 month ago

jms72 commented 1 month ago
            logger.warn(
                "Some text: ${proposalResponse.statusCode}",
                proposalResponse.exception,
            )

causes stack overflow:

     at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:78)
      …
      at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:78)
     at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:51)
     at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:145)
     at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:424)
     at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:386)
     at ch.qos.logback.classic.Logger.warn(Logger.java:697)

It seems to be somehow due to Kotlin to Java Throwable/Exception conversion, there's an infinite list of causes.

There seems to be a fix proposal already sitting around since 2016, why not merge it?