Skip to content
This repository has been archived by the owner. It is now read-only.

java.lang.IndexOutOfBoundsException: null when access.transition is called too often in a short time #370

Closed
Zhen-hao opened this issue Mar 27, 2021 · 6 comments

Comments

@Zhen-hao
Copy link
Contributor

I have a stable way to reproduce this error.
does access has some kind of a lock? that could explain the null error. when access.transition is called, the previous call is still running and holding the lock.
Correct me if I'm wrong.

[info] [2021-03-27 19:22:16,594] [ERROR] [korolev.akka.util.LoggingReporter] [] [nt-ui-akka.actor.default-dispatcher-55] - Unhandled error {akkaAddress=akka://nt-ui@127.0.0.1:2551, sourceThread=nt-ui-akka.actor.default-dispatcher-55, akkaSource=korolev, sourceActorSystem=nt-ui, akkaTimestamp=18:22:16.594UTC}
[info] java.lang.IndexOutOfBoundsException: null
[info]  at java.base/java.nio.Buffer.checkIndex(Buffer.java:686)
[info]  at java.base/java.nio.HeapShortBuffer.get(HeapShortBuffer.java:169)
[info]  at levsha.IdBuilder.incId(IdBuilder.scala:57)
[info]  at levsha.impl.DiffRenderContext.openNode(DiffRenderContext.scala:101)
[info]  at korolev.server.internal.services.PageService$UpgradeHeadRenderContextProxy.openNode(PageService.scala:89)
[info]  at korolev.server.internal.services.PageService$UpgradeHeadRenderContextProxy.openNode$(PageService.scala:76)
[info]  at korolev.server.internal.services.PageService$$anon$1.openNode(PageService.scala:39)
[info]  at com.nt.front.UiWebService.$anonfun$config$160(UiWebService.scala:1197)
[info]  at com.nt.front.UiWebService.$anonfun$config$160$adapted(UiWebService.scala:1146)
[info]  at levsha.Document$Node$$anon$1.apply(Document.scala:36)
[info]  at korolev.server.package$.$anonfun$korolevService$2(package.scala:45)
[info]  at korolev.server.package$.$anonfun$korolevService$2$adapted(package.scala:45)
[info]  at levsha.Document$Node$$anon$1.apply(Document.scala:36)
[info]  at korolev.internal.ComponentInstance.applyRenderContext(ComponentInstance.scala:271)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$6(ApplicationInstance.scala:114)
[info]  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:78)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:66)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$5(ApplicationInstance.scala:108)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$1(ApplicationInstance.scala:105)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ApplicationInstance.onState(ApplicationInstance.scala:103)
[info]  at korolev.internal.ApplicationInstance.$anonfun$topLevelComponentInstance$2(ApplicationInstance.scala:84)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$4(ComponentInstance.scala:280)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$2(ComponentInstance.scala:279)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$1(ComponentInstance.scala:277)
[info]  at korolev.internal.ComponentInstance.$anonfun$unsafeInitialize$1(ComponentInstance.scala:365)
[info]  at korolev.effect.Stream.$anonfun$foreach$1(Stream.scala:308)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
[info]  at scala.concurrent.Promise.complete(Promise.scala:57)
[info]  at scala.concurrent.Promise.complete$(Promise.scala:56)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:104)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promise$1(Effect.scala:103)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promise$1$adapted(Effect.scala:103)
[info]  at korolev.effect.Queue.$anonfun$offerUnsafe$1(Queue.scala:98)
[info]  at korolev.effect.Queue.$anonfun$offerUnsafe$1$adapted(Queue.scala:98)
[info]  at scala.collection.immutable.List.foreach(List.scala:333)
[info]  at korolev.effect.Queue.aux$3(Queue.scala:98)
[info]  at korolev.effect.Queue.offerUnsafe(Queue.scala:118)
[info]  at korolev.effect.Queue.$anonfun$offer$1(Queue.scala:199)
[info]  at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.scala:17)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:78)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:66)
[info]  at korolev.effect.Queue.offer(Queue.scala:199)
[info]  at korolev.effect.Queue.aux$8(Queue.scala:207)
[info]  at korolev.effect.Queue.enqueue(Queue.scala:213)
[info]  at korolev.internal.ComponentInstance.applyTransition(ComponentInstance.scala:283)
[info]  at korolev.internal.ComponentInstance$browserAccess$.transition(ComponentInstance.scala:138)
[info]  at com.nt.front.components.TimePickerComponent$.$anonfun$create$84(TimePickerComponent.scala:586)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:48)
[info]  at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)
[info]  at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[info]  at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[info]  at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[info]  at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[info]  at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
@Zhen-hao
Copy link
Contributor Author

the real problem is that I use Future as the effect and
even with .recover(_ => ()) after access.transition, the page is still in a broken state whenever that error occurs.

@Zhen-hao
Copy link
Contributor Author

for the same problem, another stack trace is

[info] [2021-03-27 19:41:11,534] [ERROR] [korolev.akka.util.LoggingReporter] [] [nt-ui-akka.actor.default-dispatcher-41] - Unhandled error {akkaAddress=akka://nt-ui@127.0.0.1:2551, sourceThread=nt-ui-akka.actor.default-dispatcher-34, akkaSource=korolev, sourceActorSystem=nt-ui, akkaTimestamp=18:41:11.533UTC}
[info] scala.MatchError: 0 (of class java.lang.Byte)
[info]  at levsha.impl.DiffRenderContext.createLoop(DiffRenderContext.scala:379)
[info]  at levsha.impl.DiffRenderContext.diff(DiffRenderContext.scala:246)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$8(ApplicationInstance.scala:119)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$8$adapted(ApplicationInstance.scala:119)
[info]  at korolev.internal.Frontend.$anonfun$performDomChanges$1(Frontend.scala:189)
[info]  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:78)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:66)
[info]  at korolev.internal.Frontend.performDomChanges(Frontend.scala:187)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$7(ApplicationInstance.scala:119)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$5(ApplicationInstance.scala:108)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$1(ApplicationInstance.scala:105)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ApplicationInstance.onState(ApplicationInstance.scala:103)
[info]  at korolev.internal.ApplicationInstance.$anonfun$topLevelComponentInstance$2(ApplicationInstance.scala:84)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$4(ComponentInstance.scala:280)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$2(ComponentInstance.scala:279)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$1(ComponentInstance.scala:277)
[info]  at korolev.internal.ComponentInstance.$anonfun$unsafeInitialize$1(ComponentInstance.scala:365)
[info]  at korolev.effect.Stream.$anonfun$foreach$1(Stream.scala:308)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
[info]  at scala.concurrent.Promise.complete(Promise.scala:57)
[info]  at scala.concurrent.Promise.complete$(Promise.scala:56)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:104)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promise$1(Effect.scala:103)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promise$1$adapted(Effect.scala:103)
[info]  at korolev.effect.Queue.$anonfun$offerUnsafe$1(Queue.scala:98)
[info]  at korolev.effect.Queue.$anonfun$offerUnsafe$1$adapted(Queue.scala:98)
[info]  at scala.collection.immutable.List.foreach(List.scala:333)
[info]  at korolev.effect.Queue.aux$3(Queue.scala:98)
[info]  at korolev.effect.Queue.offerUnsafe(Queue.scala:118)
[info]  at korolev.effect.Queue.$anonfun$offer$1(Queue.scala:199)
[info]  at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.scala:17)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:78)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:66)
[info]  at korolev.effect.Queue.offer(Queue.scala:199)
[info]  at korolev.effect.Queue.aux$8(Queue.scala:207)
[info]  at korolev.effect.Queue.enqueue(Queue.scala:213)
[info]  at korolev.internal.ComponentInstance.applyTransition(ComponentInstance.scala:283)
[info]  at korolev.internal.ComponentInstance$browserAccess$.transition(ComponentInstance.scala:138)
[info]  at com.nt.front.components.TimePickerComponent$.$anonfun$create$84(TimePickerComponent.scala:586)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:48)
[info]  at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:48)
[info]  at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[info]  at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[info]  at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[info]  at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[info]  at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

@Zhen-hao
Copy link
Contributor Author

If I understand correctly, immediatePendingEffects.enqueue(effect) is used by the component.
is there a way to pass sync = true?

@Zhen-hao
Copy link
Contributor Author

with syncTransition, I got

[info] [2021-03-28 11:41:12,618] [ERROR] [korolev.akka.util.LoggingReporter] [] [nt-ui-akka.actor.default-dispatcher-51] - Unhandled error {akkaAddress=akka://nt-ui@127.0.0.1:2551, sourceThread=nt-ui-akka.actor.default-dispatcher-20, akkaSource=korolev, sourceActorSystem=nt-ui, akkaTimestamp=09:41:12.613UTC}
[info] java.nio.BufferOverflowException: null
[info]  at java.base/java.nio.Buffer.nextPutIndex(Buffer.java:665)
[info]  at java.base/java.nio.HeapShortBuffer.put(HeapShortBuffer.java:200)
[info]  at levsha.IdBuilder.reset(IdBuilder.scala:97)
[info]  at levsha.impl.DiffRenderContext.reset(DiffRenderContext.scala:164)
[info]  at levsha.impl.DiffRenderContext.swap(DiffRenderContext.scala:159)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$6(ApplicationInstance.scala:110)
[info]  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:78)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:66)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$5(ApplicationInstance.scala:108)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onState$1(ApplicationInstance.scala:105)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ApplicationInstance.onState(ApplicationInstance.scala:103)
[info]  at korolev.internal.ApplicationInstance.$anonfun$topLevelComponentInstance$2(ApplicationInstance.scala:84)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$4(ComponentInstance.scala:280)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$2(ComponentInstance.scala:279)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:276)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:140)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:86)
[info]  at korolev.effect.Effect$FutureEffect.flatMap(Effect.scala:66)
[info]  at korolev.effect.syntax$EffectOps.flatMap(syntax.scala:36)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyTransition$1(ComponentInstance.scala:277)
[info]  at korolev.internal.ComponentInstance.applyTransition(ComponentInstance.scala:282)
[info]  at korolev.internal.ComponentInstance$browserAccess$.syncTransition(ComponentInstance.scala:140)
[info]  at com.nt.front.components.TimePickerComponent$.$anonfun$create$91(TimePickerComponent.scala:604)
[info]  at scala.Function1.$anonfun$andThen$1(Function1.scala:85)
[info]  at korolev.internal.ComponentInstance.applyEvent(ComponentInstance.scala:294)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyEvent$1(ComponentInstance.scala:298)
[info]  at korolev.internal.ComponentInstance.$anonfun$applyEvent$1$adapted(ComponentInstance.scala:297)
[info]  at scala.collection.IterableOnceOps.forall(IterableOnce.scala:577)
[info]  at scala.collection.IterableOnceOps.forall$(IterableOnce.scala:574)
[info]  at scala.collection.AbstractIterable.forall(Iterable.scala:919)
[info]  at korolev.internal.ComponentInstance.applyEvent(ComponentInstance.scala:297)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onEvent$2(ApplicationInstance.scala:150)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onEvent$2$adapted(ApplicationInstance.scala:149)
[info]  at scala.collection.immutable.List.forall(List.scala:386)
[info]  at korolev.internal.ApplicationInstance.$anonfun$onEvent$1(ApplicationInstance.scala:149)
[info]  at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:78)
[info]  at korolev.effect.Effect$FutureEffect.delay(Effect.scala:66)
[info]  at korolev.internal.ApplicationInstance.onEvent(ApplicationInstance.scala:148)
[info]  at korolev.internal.ApplicationInstance.$anonfun$new$2(ApplicationInstance.scala:163)
[info]  at korolev.effect.Stream.$anonfun$foreach$1(Stream.scala:308)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:434)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:468)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
[info]  at scala.concurrent.Promise.complete(Promise.scala:57)
[info]  at scala.concurrent.Promise.complete$(Promise.scala:56)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:104)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promiseF$1(Effect.scala:113)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promiseF$1$adapted(Effect.scala:113)
[info]  at korolev.effect.Stream$$anon$8.$anonfun$pull$11(Stream.scala:260)
[info]  at korolev.effect.Stream$$anon$8.$anonfun$pull$11$adapted(Stream.scala:253)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:431)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:468)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
[info]  at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:468)
[info]  at korolev.effect.Effect$FutureEffect$$anon$1.execute(Effect.scala:69)
[info]  at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:393)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:302)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete0(Promise.scala:249)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:242)
[info]  at scala.concurrent.Promise.complete(Promise.scala:57)
[info]  at scala.concurrent.Promise.complete$(Promise.scala:56)
[info]  at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:104)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promise$1(Effect.scala:103)
[info]  at korolev.effect.Effect$FutureEffect.$anonfun$promise$1$adapted(Effect.scala:103)
[info]  at korolev.akka.util.KorolevStreamSubscriber.onNext(KorolevStreamSubscriber.scala:39)
[info]  at akka.stream.impl.VirtualProcessor.rec$5(StreamLayout.scala:341)
[info]  at akka.stream.impl.VirtualProcessor.onNext(StreamLayout.scala:370)
[info]  at akka.stream.impl.ReactiveStreamsCompliance$.tryOnNext(ReactiveStreamsCompliance.scala:100)
[info]  at akka.stream.impl.fusing.ActorGraphInterpreter$ActorOutputBoundary.onNext(ActorGraphInterpreter.scala:382)
[info]  at akka.stream.impl.fusing.ActorGraphInterpreter$ActorOutputBoundary.onPush(ActorGraphInterpreter.scala:407)
[info]  at akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:541)
[info]  at akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:423)
[info]  at akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:625)
[info]  at akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:502)
[info]  at akka.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:600)
[info]  at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:773)
[info]  at akka.stream.impl.fusing.ActorGraphInterpreter.akka$stream$impl$fusing$ActorGraphInterpreter$$shortCircuitBatch(ActorGraphInterpreter.scala:762)
[info]  at akka.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:789)
[info]  at akka.actor.Actor.aroundReceive(Actor.scala:537)
[info]  at akka.actor.Actor.aroundReceive$(Actor.scala:535)
[info]  at akka.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:691)
[info]  at akka.actor.ActorCell.receiveMessage(ActorCell.scala:577)
[info]  at akka.actor.ActorCell.invoke(ActorCell.scala:547)
[info]  at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
[info]  at akka.dispatch.Mailbox.run(Mailbox.scala:231)
[info]  at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
[info]  at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
[info]  at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
[info]  at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
[info]  at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
[info]  at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

@Zhen-hao
Copy link
Contributor Author

It seems something in levsha is not thread safe. I'm not sure...

@fomkin
Copy link
Owner

fomkin commented Mar 28, 2021

You right, Levsha is not thread safe, but there is a lock to Korolev level. I should check.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants