Hi, my apologies for the cross post (already poste...
# arrow
k
Hi, my apologies for the cross post (already posted on gitter), just want to make sure this is seen, in case it is a bug in Fx. running this: https://gist.github.com/kartoffelsup/f749e2b1d0078a252204cfee82397463 I'm getting:
Copy code
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class arrow.core.Either$Left
	at arrow.core.Either$Companion.left(Either.kt:173)
 	at arrow.core.EitherKt.Left(Either.kt:196)
 	at arrow.effects.IORunLoop.loop(IORunLoop.kt:182)
 	at arrow.effects.IORunLoop.startCancelable(IORunLoop.kt:27)
 	at <http://arrow.effects.IO|arrow.effects.IO>$Companion$asyncF$1.invoke(IO.kt:58)
 	at <http://arrow.effects.IO|arrow.effects.IO>$Companion$asyncF$1.invoke(IO.kt:26)
 	at arrow.effects.IORunLoop$suspendInAsync$1.invoke(IORunLoop.kt:145)
 	at arrow.effects.IORunLoop$suspendInAsync$1.invoke(IORunLoop.kt:17)
 	at arrow.effects.IORunLoop.loop(IORunLoop.kt:211)
 	at arrow.effects.IORunLoop.start(IORunLoop.kt:20)
 	at arrow.effects.IO.unsafeRunAsync(IO.kt:112)
 	at arrow.effects.internal.Platform.unsafeResync(Utils.kt:62)
 	at <http://arrow.effects.IO|arrow.effects.IO>$Async.unsafeRunTimedTotal$arrow_effects_data(IO.kt:183)
 	at arrow.effects.IO.unsafeRunTimed(IO.kt:135)
 	at arrow.effects.IO.unsafeRunSync(IO.kt:132)
 	at NoClassDefReproKt.main(NoClassDefRepro.kt:55)
Is this a bug or am I doing it wrong?
p
I can’t compile this code, using arrow master, but modified like this it works
anyway, I’d guess I should use
delay
instead of
Thread.sleep
but it’s not possible….
k
Hmm, just pulled the latest master and built it locally after removing the old artifacts and it compiles fine. The strange thing is, that it crashed after around ~370 'iterations'. So that really makes me think it might be a bug.
The Thread.sleep is there to simulate a service call. At work (where I discovered this), this is not a Thread.sleep but a Rest call.
@pakoito @Paolo Gavočanov
After reducing the count to 500 and the Thread.sleep to 1ms, I found that most of the time, it throws a StackOverflowError and only sometimes the NoClassDefFound. I believe that it might be that the NoClassDefFound is thrown, when the StackOverFlow is somehow swallowed by something? Could that be the case?