monome / serialosc

multi-device, bonjour-capable monome OSC server
http://monome.org/docs/serialosc/osc
Other
146 stars 32 forks source link

check the right ipc_msg length variable #33

Closed artfwo closed 6 years ago

artfwo commented 6 years ago

hey @wrl, i think this check was supposed to be msg_nbytes < 0. this fixes the segfault described in #22, because we no longer pass null messages to handle_device_msg.

the problem is that i'm getting a lot of "bad message, bailing out" errors now when replugging the grid, any tips on how to attack those?

tehn commented 6 years ago

@artfwo which edition grid do you have?

there's some firmware initialization slop in some editions unfortunately-- bytes queued up into the TX buffer upon powerup and when libmonome queries this device it'll fail because of the queued bytes.

but of course i'm talking about libmonome so if the failure is in serialosc then this may be irrelevant

wrl commented 6 years ago

@artfwo i think your judgement is right here and I typo'd the original check.

as for the "bad message, bailing out" errors... could you perchance add some code to dump the hex out on those? the nbytes in buf_cursor, specifically. i'm wondering whether a message is getting misaligned or whether there is something else going on.

i am very keen to nail this one down as i have largely been unable to reproduce this specific issue. i'll merge this PR and i'm interested to see what you unearth.

artfwo commented 6 years ago

@tehn the 128 grid kit, does it have this specific firmware problem?

artfwo commented 6 years ago

@wrl thanks, i'll be posting any new findings in the #22 discussion thread.