I have a K/N project that already compiles success...
# kotlin-native
p
I have a K/N project that already compiles successfully to JVM. If I run the MacOS tests however, it seems to kill the test.kexe file at some point. Some tests are passing though. Any ideas what could be causing this?
a
Hello! This might be a bug, can you share a reproducer?
p
Hey, are you talking about the code that will reproduce this? Do you also need os and/or versions?
a
Yes, I meant the piece of code that we could run on our side . But, as I can see from the thread below, you and Kevin managed to find out the reasons. So, let’s assume that my asking is irrelevant.
p
Well I’m not sure we have found them. I have one test that fails but if I comment it out, some tests still fail because the Event Loop was cancelled
I’m not sure how to interpret that
kotlin.IllegalStateException: Cannot execute task because event loop was shut down
This is the error message I get
And I also couldn’t figure out why that particular Tests leads to a segmentation fault
a
Ok then. If you can reveal some additional details over the
testTaskDelay()
, I will be able to say something more concrete.
p
I figured out what the problem was. The thread reached the end of its lifetime while the coroutine was still running
🎉 1
If I add a delay to the execution, it works
Do you know why this is not a problem in the JVM?
Is there a concept that I am missing. All those tests have passed without issue on the JVM
a
I’m not sure about the reason of it, but I got to mention that “correct Kotlin/JVM code” is not a synonym for “correct Kotlin common code”.
p
I think I have the reason for the segmentation fault, it is caused by the function measureTimeMillis
This is enough to cause a segmentation fault
a
I cannot reproduce the error on my side. If it’s possible, please make a small project to work with this issue.