Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to increase the OSC packet size ? #388

Open
avilleret opened this issue Nov 18, 2015 · 4 comments
Open

how to increase the OSC packet size ? #388

avilleret opened this issue Nov 18, 2015 · 4 comments

Comments

@avilleret
Copy link
Contributor

when trying to send big TTBoolean array over OSC, I got :

terminate called after throwing an instance of 'osc::OutOfBufferMemoryException'

what(): out of buffer memory

looking at the code it seems that the buffer size is computed from message and argument,
so I'm wondering why it fails with that exception ?

there are 17683 boolean to send in one bundle, yes that's huge, but I hope not impossible to transmit :-)

@tap
Copy link
Member

tap commented Nov 18, 2015

I don't have the code/context to look at, but I'm curious what sizeof() TTBoolean is. On some systems sizeof(bool) == sizeof(int), in which case this is over 32K in memory.

Is this being allocated on the stack or the heap?

What architecture are you on? That could make a difference?

@avilleret
Copy link
Contributor Author

the size of the bundle doesn't seems to matter, I can't send 37 values in one shot either but I can send 2 int.

sizeof(TTBoolean) : 1   sizeof(TTInt) : 4

I'm on Ubuntu 64bit, but the code will run on RPi under Jessie soon.
And here is the code involved : https://github.com/avilleret/gorgone/blob/master/src/gorgone.cpp#L38-L61
Basically it iterates through an image and add a TTBoolean to the argument list for each pixel.

@avilleret
Copy link
Contributor Author

Now I'm using a return array to send the value to Max, but I have the same error.

@avilleret
Copy link
Contributor Author

Casting uchar to int fix the issue
But I do thing there is something wrong somewhere in the OSC buffer management

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants