---
** [bugs:#1183] unpackOSC crahes when receiving (corrupted ?) blob**
**Status:** open **Group:** v0.46 **Created:** Mon Jan 05, 2015 04:30 PM UTC by Antoine Villeret **Last Updated:** Mon Jan 05, 2015 04:30 PM UTC **Owner:** Martin Peach
hello,
with two arduinos sending SLIP encoded data (mostly OSC blob) to Pd over USB (thanks to [comport]). I experienced crashes when I open 2 times the same port (yes this is weird and at first unwanted, but I did that, sorry :-) ).
I don't know how [comport] could open the same device twice, but I think this leads to corrupted data. [unpackOSC] says a lot of error like this :
~~~~ unpackOSC: DataAfterAlignedString: Incorrectly padded string unpackOSC: Bad message name string: Dropping entire message. unpackOSC: Packet size (217) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (146) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (278) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 176 in bundle (only 24 bytes left in entire bundle) unpackOSC: Packet size (275) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (137) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (95) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (214) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (130) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (133) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (126) not a multiple of 4 bytes: dropping packet unpackOSC: DataAfterAlignedString: Incorrectly padded string unpackOSC: Bad message name string: Dropping entire message. unpackOSC: Bad size count 23294720 in bundle (only 136 bytes left in entire bundle) unpackOSC: Packet size (94) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (150) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (273) not a multiple of 4 bytes: dropping packet unpackOSC: Path doesn't begin with "/", dropping message unpackOSC: Packet size (137) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (91) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (150) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (271) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (131) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (91) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (159) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (254) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (138) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (170) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (91) not a multiple of 4 bytes: dropping packet unpackOSC: Path doesn't begin with "/", dropping message unpackOSC: Packet size (253) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (150) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 60 in bundle (only 56 bytes left in entire bundle) unpackOSC: Packet size (126) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 1684825344 in bundle (only 156 bytes left in entire bundle) unpackOSC: Packet size (89) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 71 in bundle (not a multiple of 4) unpackOSC: Packet size (291) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (69) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (126) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (159) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (237) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (169) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 795046656 in bundle (only 136 bytes left in entire bundle) unpackOSC: DataAfterAlignedString: Unreasonably long string unpackOSC: Bad message name string: Dropping entire message. unpackOSC: Bad size count 745105769 in bundle (not a multiple of 4) unpackOSC: Packet size (147) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 60 in bundle (only 52 bytes left in entire bundle) unpackOSC: Packet size (130) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (327) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (23) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (131) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (306) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (111) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (249) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (25) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (125) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 1651863140 in bundle (only 136 bytes left in entire bundle) unpackOSC: Packet size (131) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (101) not a multiple of 4 bytes: dropping packet unpackOSC: Path doesn't begin with "/", dropping message unpackOSC: PrintHeuristicallyTypeGuessedArgs: indeterminate type: 0x6223692c xx unpackOSC: PrintHeuristicallyTypeGuessedArgs: indeterminate type: 0x6c646e75 xx unpackOSC: Bad size count 1694498816 in bundle (only 116 bytes left in entire bundle) unpackOSC: Packet size (179) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (121) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 60 in bundle (only 40 bytes left in entire bundle) unpackOSC: Packet size (166) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (131) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (298) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (165) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (103) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 1128988672 in bundle (only 108 bytes left in entire bundle) unpackOSC: Packet size (61) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (131) not a multiple of 4 bytes: dropping packet unpackOSC: Path doesn't begin with "/", dropping message unpackOSC: Packet size (307) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (111) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 60 in bundle (only 48 bytes left in entire bundle) unpackOSC: Packet size (125) not a multiple of 4 bytes: dropping packet unpackOSC: Path doesn't begin with "/", dropping message unpackOSC: Packet size (335) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (103) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (123) not a multiple of 4 bytes: dropping packet unpackOSC: DataAfterAlignedString: Incorrectly padded string unpackOSC: Bad message name string: Dropping entire message. unpackOSC: Packet size (301) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (182) not a multiple of 4 bytes: dropping packet unpackOSC: Path doesn't begin with "/", dropping message unpackOSC: Packet size (150) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (138) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (127) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (313) not a multiple of 4 bytes: dropping packet unpackOSC: DataAfterAlignedString: Incorrectly padded string unpackOSC: Bad message name string: Dropping entire message. unpackOSC: Packet size (106) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (93) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 20 in bundle (only 8 bytes left in entire bundle) unpackOSC: Packet size (266) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (137) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (133) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 60 in bundle (only 44 bytes left in entire bundle) unpackOSC: Packet size (250) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (141) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (142) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (250) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (170) not a multiple of 4 bytes: dropping packet unpackOSC: Path doesn't begin with "/", dropping message unpackOSC: Bad size count 75 in bundle (not a multiple of 4) unpackOSC: Packet size (130) not a multiple of 4 bytes: dropping packet unpackOSC: Bad size count 60 in bundle (only 28 bytes left in entire bundle) unpackOSC: Packet size (169) not a multiple of 4 bytes: dropping packet unpackOSC: DataAfterAlignedString: Incorrectly padded string unpackOSC: Bad message name string: Dropping entire message. unpackOSC: Packet size (313) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (155) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (131) not a multiple of 4 bytes: dropping packet unpackOSC: DataAfterAlignedString: Unreasonably long string unpackOSC: Bad message name string: Dropping entire message. unpackOSC: Bad size count 16777216 in bundle (only 120 bytes left in entire bundle) unpackOSC: Packet size (131) not a multiple of 4 bytes: dropping packet unpackOSC: Packet size (159) not a multiple of 4 bytes: dropping packet ~~~~
and then crashes with this backtrace :
~~~~ Program received signal SIGSEGV, Segmentation fault. 0x00007fffe0d263ec in ?? () from /home/antoine/Dropbox/das_Korperrauschen/dev/pd/test/../pd-externals/osc/unpackOSC.pd_linux (gdb) thread apply all bt
Thread 1 (Thread 0x7ffff7fbf740 (LWP 25736)): #0 0x00007fffe0d263ec in ?? () from /home/antoine/Dropbox/das_Korperrauschen/dev/pd/test/../pd-externals/osc/unpackOSC.pd_linux #1 0x00007fffe0d25a2d in ?? () from /home/antoine/Dropbox/das_Korperrauschen/dev/pd/test/../pd-externals/osc/unpackOSC.pd_linux #2 0x000000000047334a in outlet_list () #3 0x00007fffe0b21d91 in slipdec_dump () from /home/antoine/Dropbox/das_Korperrauschen/dev/pd/test/../pd-externals/mrpeach/slipdec.pd_linux #4 0x00007fffe0b22198 in slipdec_float () from /home/antoine/Dropbox/das_Korperrauschen/dev/pd/test/../pd-externals/mrpeach/slipdec.pd_linux #5 0x000000000047322f in outlet_float () #6 0x0000000000472481 in inlet_float () #7 0x000000000047322f in outlet_float () #8 0x00007fffe0f2ca51 in ?? () from /home/antoine/Dropbox/das_Korperrauschen/dev/pd/test/../pd-externals/comport/comport.pd_linux #9 0x00000000004817a6 in m_mainloop () #10 0x00007ffff6deeec5 in __libc_start_main (main=0x411ec0 <main>, argc=2, ---Type <return> to continue, or q <return> to quit--- argv=0x7fffffffde98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde88) at libc-start.c:287 #11 0x0000000000411eee in _start () (gdb) ~~~~
So I guess the crash is due to corrupted data, but a software should *never* crash, even though I put bananas under its feet and I send tomatoes in its face... :-)
I attached a small patch with which I can reproduce the crash.
---
Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to https://sourceforge.net/p/pure-data/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pure-data/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.