Fork me on GitHub
#aleph
<
2017-09-25
>
bbss03:09:01

I'm using aleph and manifold for communicating with the StarCraft II AI API. Yesterday I tried my hand at a run-loop and I completed one of the challenges using Clojure (yay!). I'm using alephs websocket to connect to the api which uses protobuf to communicate. And I utilize streams for the run-loop, but after around 100 steps into the game I get a memory leak notification which later makes the websockets requests fail.

Sep 25, 2017 12:26:19 PM io.netty.util.ResourceLeakDetector reportTracedLeak
SEVERE: LEAK: ByteBuf.release() was not called before it's garbage-collected. See  for more information.

bbss03:09:55

I'm not sure what could be causing it. I found https://groups.google.com/forum/#!msg/aleph-lib/-41TvS0uKVM/KF7PE_iOErwJ but that should now not happen with the defaults anymore.

bbss06:09:05

Not sure if the stacktrace is visible on slack, I don't have any storage space in my slack workspace suspect

miikka07:09:13

Hmmh. This is 0.4.2, right?

miikka07:09:17

Quickly browsing the code, I'm not sure what is supposed to release the bytebufs allocated by client.clj:420

bbss07:09:24

it might help to see what I am doing, might be doing stupid stuff: https://github.com/bbss/cljsc2/blob/master/src/cljsc2/clj/core.clj#L56 create a websocket connection to the starcraft 2 client https://github.com/bbss/cljsc2/blob/master/src/cljsc2/clj/core.clj#L33 put requests on the websocket connection

bbss07:09:44

@miikka uhm, not 0.4.2. it is 0.4.3.

miikka07:09:51

Uh, right. Could you try with 0.4.4-alpha4?

bbss07:09:01

okay, let me try

miikka07:09:07

0.4.4's changelog inculdes "fix memory lead in handling of binary websocket frames"

miikka07:09:26

which sounds promising

bbss07:09:11

that does sound very promising, I should have checked that out myself. Fingers crossed haha.

bbss07:09:30

kiitos @miikka the error seems to be gone!

ianbishop15:09:15

Has anyone had any experience with using status as a deferred? I'm looking to use aleph for a proxy-like service where the status will also be decided based off an asynchronous request

ianbishop15:09:42

I guess I can probably let-flow on the status in middleware