Hi, everyone! Just released <Stacktrace-decoroutin...
# feed
r
Hi, everyone! Just released Stacktrace-decoroutinator 2.3.0. Library for recovering stack trace in Kotlin coroutines, supporting JVM and Android. This release includes a usage of JVM Instrumentation API for bytecode manipulation instead of generating separate classes.
👍🏻 1
👍 1
r
I tried this, but it breaks Ktor. Just stops accepting requests when enabled
r
Without throwing any exceptions?
r
yeah
Copy code
➜  ~ curl <http://localhost/health>    
curl: (52) Empty reply from server
nothing in the application
r
May I ask you some questions: 1. Did you call function
DecoroutinatorRuntime.load()
in your app?
r
Yes, it only happens when I call it. If I comment that line out, the app works normally
r
ok. 2. What version of SD and JVM and Kotlin?
r
SD 2.3.0 Amazon Corretto 17.0.2 Kotlin 1.6.21
and Ktor 2.0.1
r
Yeah. I reproduced the issue and will work on it. https://github.com/Anamorphosee/stacktrace-decoroutinator/issues/10. Until the fix you can try the older version "stacktrace-decoroutinator-legacy:2.3.1" which works with Ktor for me.
r
legacy fails for me
Copy code
Exception in thread "main" java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @1134affc
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at dev.reformator.stacktracedecoroutinator.jvmlegacy.Utils_jvm_legacyKt.getClassIfLoaded(utils-jvm-legacy.kt:11)
	at dev.reformator.stacktracedecoroutinator.runtime.DecoroutinatorRuntime.getState(runtime-jvm-legacy.kt:41)
	at dev.reformator.stacktracedecoroutinator.runtime.DecoroutinatorRuntime.load(runtime-jvm-legacy.kt:51)
	at dev.reformator.stacktracedecoroutinator.runtime.DecoroutinatorRuntime.load$default(runtime-jvm-legacy.kt:50)
Setting the system property you mentioned in the issue doesn't seem to help either
r
the system property works only for SD version 2.3.1
r
ah! yeah, now it works!
👍 1
r
@Ruben Holen fix for Ktor was releases in 2.3.2
🙌🏻 1
r
Thanks