F43nd1r
F43nd1r
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
yeah that's because my hello world isn't actually valid kotlin code 😂 I updated the demo with the new build and a bit of UI - https://f43nd1r.github.io/kotlin-compiler-cheerpj/ Not the fastest in the world, but it works! Impressive how you got that fixed so fast
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
oh, that's cool. Sure if you continue on your side I'll happily follow along!
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
Alright, I thought evaluating some kotlin would've been an impressive demo of cheerpj. Probably a bit too ambitious - at least I'm out of my depth here. I can see the kotlin compiler tries to figure out the memory layout of certain classes, I assume that's the part which is just different enough on cheerpj to not work out, but I have no idea how to debug or fix any of it. Thanks for the help either way 🙂
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
Continuing with chrome, I got to a stacktrace:
Stacktrace: java.lang.Error: java.lang.ArrayIndexOutOfBoundsException
at java.lang.Error.<init>(Unknown Source)
at org.jetbrains.kotlin.com.intellij.util.containers.ConcurrentLongObjectHashMap.<clinit>(Unknown Source)
at org.jetbrains.kotlin.com.intellij.util.containers.ContainerUtil.createConcurrentLongObjectMap(Unknown Source)
[...]
at kotlin.script.experimental.host.BasicScriptingHost.eval(Unknown Source)
at com.faendir.KotlinCompiler.eval(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at .(Unknown Source)
at java.lang.invoke.LambdaForm$DMH.invokeVirtual_LL_J(Unknown Source)
at .(Unknown Source)
... 31 more
Stacktrace: java.lang.Error: java.lang.ArrayIndexOutOfBoundsException
at java.lang.Error.<init>(Unknown Source)
at org.jetbrains.kotlin.com.intellij.util.containers.ConcurrentLongObjectHashMap.<clinit>(Unknown Source)
at org.jetbrains.kotlin.com.intellij.util.containers.ContainerUtil.createConcurrentLongObjectMap(Unknown Source)
[...]
at kotlin.script.experimental.host.BasicScriptingHost.eval(Unknown Source)
at com.faendir.KotlinCompiler.eval(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException
at .(Unknown Source)
at java.lang.invoke.LambdaForm$DMH.invokeVirtual_LL_J(Unknown Source)
at .(Unknown Source)
... 31 more
Looking at the source of ConcurrentLongObjectHashMap, the kotlin compiler seems to be accessing com.sun.misc.Unsafe using reflection here. Hard to tell which call exactly with no line numbers. I assume I can't turn on line numbers in cheerpj somewhere?
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
Oh, typical web development fun: only happens in firefox, chrome shows what you posted
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
Note that currently everything happens only on the console, nothing visible on the page
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
I'll set up gh pages, give me a minute
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
Oh, that is an interesting approach - I was trying to get the embedded compiler running instead of the standalone
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
26 replies
LTLeaning Technologies
Created by F43nd1r on 4/24/2024 in #support
How to debug class loading
https://cjrtnc.leaningtech.com/3_20240416_465/cj3loader.js
26 replies