# OSC block error - receiving OSC message from Kyma

**URL:** <https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695>\
**Category:** Uncategorized\
**Created:** [August 31, 2020, 5:01pm UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695 "2020-08-31T17:01:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucretio](https://avatars.discourse-cdn.com/v4/letter/l/8baadc/32.png) [@lucretio](https://discourse.libcinder.org/u/lucretio)\
**Post date:** [August 31, 2020, 5:01pm UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695/1 "2020-08-31T17:01:49Z")

</div>

hello everybody, I am new to Cinder and I already love it.  
I am trying to send OSC message from Symbolic Sound Kyma to a CinderApp. I am using the OSC block that comes from cinder.

I got this error:  
\*_|warning| void cinder::osc::ReceiverBase::dispatchMethods(uint8\_t , uint32\_t, const asio::ip::address &, uint16\_t)[1159] Message: /osc/response\_from doesn’t have a listener. Disregarding._

**|fatal | void cinder::app::AppBase::executeLaunch()[197] Uncaught exception, type: cinder::osc::Message::ExcNonConvertible, what: /posx: expected type: FLOAT, actual type: INTEGER\_32**

**libc++abi.dylib: terminating with uncaught exception of type cinder::osc::Message::ExcNonConvertible: /posx: expected type: FLOAT, actual type: INTEGER\_32**

#### 

I have tested Kyma/OSC sending with Processing/PureData/SuperCollider and I got no problems…  
thanks.  
d

---

<div class="post-metadata">

**Author:** ![lithium](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/lithium/32/38_2.png) [@lithium](https://discourse.libcinder.org/u/lithium)\
**Post date:** [September 1, 2020, 12:04am UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695/2 "2020-09-01T00:04:02Z")

</div>

The error seems to be in the client code, not the osc block itself. You’re apparently trying to retrieve a value from an `osc::Message` called “posx” as a float, but the server that’s sending the messages sent it as an int.

---

<div class="post-metadata">

**Author:** ![lucretio](https://avatars.discourse-cdn.com/v4/letter/l/8baadc/32.png) [@lucretio](https://discourse.libcinder.org/u/lucretio)\
**Post date:** [September 1, 2020, 4:23am UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695/3 "2020-09-01T04:23:58Z")

</div>

Thanks for your reply. I forgot to mention that the I am sending floats and not ints. Kyma only sends out floats. If I check it with another OSC client as PD or Processing, I can see floats arriving.

---

<div class="post-metadata">

**Author:** ![lithium](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/lithium/32/38_2.png) [@lithium](https://discourse.libcinder.org/u/lithium)\
**Post date:** [September 1, 2020, 4:37am UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695/4 "2020-09-01T04:37:53Z")

</div>

if you print out `osc::Message` directly you should see exactly what’s coming in.

```cpp
void yourListener ( const osc::Message& message )
{
    std::cout << message << std::endl;
}

```

My suspicion is that the processing client is being more forgiving about how it treats numeric types than cinder’s implementation is.

---

<div class="post-metadata">

**Author:** ![lucretio](https://avatars.discourse-cdn.com/v4/letter/l/8baadc/32.png) [@lucretio](https://discourse.libcinder.org/u/lucretio)\
**Post date:** [September 1, 2020, 4:52am UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695/5 "2020-09-01T04:52:01Z")

</div>

I will check it later. But in the server (Kyma), I can’t change anything because the OSC sender is a “native” module. Is there any workaround I can do in the C++ code to make it more “tolerant” ?

---

<div class="post-metadata">

**Author:** ![lithium](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.libcinder.org/lithium/32/38_2.png) [@lithium](https://discourse.libcinder.org/u/lithium)\
**Post date:** [September 1, 2020, 6:53am UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695/6 "2020-09-01T06:53:53Z")

</div>

You don’t need to change the sender, your client code is where the problem is - you’re asking for a float where an int is coming in. Can you show me your listener function? Are you perhaps asking for the wrong argument index?

Either way you have the source of the cinder osc implementation, so you’re free to modify it to be more tolerant, but i wholeheartedly don’t recommend that. In my experience when you bring to native programming the kind of “hack and hope” style that a lot of processing guys seem to have, you’re gonna have a bad time.

---

<div class="post-metadata">

**Author:** ![lucretio](https://avatars.discourse-cdn.com/v4/letter/l/8baadc/32.png) [@lucretio](https://discourse.libcinder.org/u/lucretio)\
**Post date:** [September 1, 2020, 8:59pm UTC](https://discourse.libcinder.org/t/osc-block-error-receiving-osc-message-from-kyma/1695/7 "2020-09-01T20:59:08Z")

</div>

thanks for helping me think about this, the problem was in the sample code for cinder:

mReceiver.setListener( “/mousemove/1”,  
[&]( const osc::Message &msg ){  
mCurrentCirclePos.x = msg[0].int32();  
mCurrentCirclePos.y = msg[1].int32();  
});  
the .int32() was actually the problem.
