You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into a scenario where instead of seeing an exception that informs me of an issue with my bytecode generation, I see a StackOverflowError instead.
The repeating part of the overflow is:
at net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor$ForAttachment.onTypeVariable(TypeDescription.java:1973)
at net.bytebuddy.description.type.TypeDescription$Generic$OfTypeVariable$Symbolic.accept(TypeDescription.java:5931)
at net.bytebuddy.description.method.MethodDescription$Latent.getReturnType(MethodDescription.java:1489)
at net.bytebuddy.description.method.MethodDescription$AbstractBase.toSafeString(MethodDescription.java:1052)
at net.bytebuddy.description.TypeVariableSource$AbstractBase.findExpectedVariable(TypeVariableSource.java:174)
at net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor$ForAttachment.onTypeVariable(TypeDescription.java:2062)
at net.bytebuddy.description.type.TypeDescription$Generic$Visitor$Substitutor$ForAttachment.onTypeVariable(TypeDescription.java:1973)
Clearly, there is something wrong on my part with regards to a missing symbolic type variable (still investigating what exactly), but I would have expected to see the IllegalArgumentException thrown by findExpectedVariable:
I just ran into a scenario where instead of seeing an exception that informs me of an issue with my bytecode generation, I see a
StackOverflowError
instead.The repeating part of the overflow is:
Clearly, there is something wrong on my part with regards to a missing symbolic type variable (still investigating what exactly), but I would have expected to see the
IllegalArgumentException
thrown byfindExpectedVariable
:https://github.com/raphw/byte-buddy/blob/0a91a85d741c1e0b5d8eeef98f7842e5cbc1496e/byte-buddy-dep/src/main/java/net/bytebuddy/description/TypeVariableSource.java#L171C1-L178C1
Instead, the call to
toSafeString()
leads to an endless recursion. This has been observed with Byte Buddy 1.14.12.The text was updated successfully, but these errors were encountered: