open-beat-control icon indicating copy to clipboard operation
open-beat-control copied to clipboard

Crashes when Max sends osc message

Open val-storm opened this issue 3 years ago • 4 comments

From Max I'm sending "/beats stream 17005"

Then this in the console

java.nio.channels.AsynchronousCloseException
        at java.base/java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:202)
        at java.base/sun.nio.ch.DatagramChannelImpl.endWrite(DatagramChannelImpl.java:1030)
        at java.base/sun.nio.ch.DatagramChannelImpl.send(DatagramChannelImpl.java:827)
        at overtone.osc.peer$chan_send.invokeStatic(peer.clj:224)
        at overtone.osc.peer$chan_send.invoke(peer.clj:216)
        at overtone.osc.peer$send_loop$fn__938.invoke(peer.clj:107)
        at overtone.osc.peer$send_loop.invokeStatic(peer.clj:102)
        at overtone.osc.peer$send_loop.invoke(peer.clj:84)
        at clojure.lang.AFn.applyToHelper(AFn.java:165)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invokeStatic(core.clj:665)
        at clojure.core$apply.invoke(core.clj:660)
        at overtone.osc.peer$sender_thread$fn__1005.invoke(peer.clj:212)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.base/java.lang.Thread.run(Thread.java:831)
Exception in send-loop:  #error {
 :cause nil
 :via
 [{:type java.nio.channels.AsynchronousCloseException
   :message nil
   :at [java.nio.channels.spi.AbstractInterruptibleChannel end AbstractInterruptibleChannel.java 202]}]
 :trace
 [[java.nio.channels.spi.AbstractInterruptibleChannel end AbstractInterruptibleChannel.java 202]
  [sun.nio.ch.DatagramChannelImpl endWrite DatagramChannelImpl.java 1030]
  [sun.nio.ch.DatagramChannelImpl send DatagramChannelImpl.java 827]
  [overtone.osc.peer$chan_send invokeStatic peer.clj 224]
  [overtone.osc.peer$chan_send invoke peer.clj 216]
  [overtone.osc.peer$send_loop$fn__938 invoke peer.clj 107]
  [overtone.osc.peer$send_loop invokeStatic peer.clj 102]
  [overtone.osc.peer$send_loop invoke peer.clj 84]
  [clojure.lang.AFn applyToHelper AFn.java 165]
  [clojure.lang.AFn applyTo AFn.java 144]
  [clojure.core$apply invokeStatic core.clj 665]
  [clojure.core$apply invoke core.clj 660]
  [overtone.osc.peer$sender_thread$fn__1005 invoke peer.clj 212]
  [clojure.lang.AFn run AFn.java 22]
  [java.lang.Thread run Thread.java 831]]}
stacktrace:  nil

Any thoughts?

val-storm avatar Jun 23 '21 04:06 val-storm

No, and unfortunately I don’t use OBC myself, so this is going to have to be something that a user picks up to maintain. Does this stack trace then prevent other things from working? Or is it just noise? A pull request with a fix would be most welcome.

brunchboy avatar Jun 23 '21 12:06 brunchboy

Skimming that stack trace, I don’t see any Open Beat Control code, you might want to inquire about this with Project Overtone, whose OSC library we’re using.

brunchboy avatar Jun 23 '21 12:06 brunchboy

The settings changes that prompted the output did not appear to work. I will look deeper into it and see what I can figure out.

Also note that this did not result in a crash. Partial functionality persisted.

val-storm avatar Jul 01 '21 04:07 val-storm

Ok! Again, none of my code appears in that stack trace, so you may have better luck asking Project Overtone to see if this is something they can fix in their OSC library. At a superficial level, it looks like they may be having problems with the way Max is closing the connection. But I am not familiar with their internals.

brunchboy avatar Jul 01 '21 04:07 brunchboy