[PD] Mysterious bug with [text]

IOhannes m zmölnig zmoelnig at iem.at
Fri Mar 4 00:02:59 CET 2016


On 03/03/2016 09:59 PM, Christof Ressi wrote:
> Dear list,
> 
> I have been experiencing mysterious bugs and crashes when using the [text] object. Most of the time it's working fine and I really enjoy the functionality. But sometimes the output of a certain operation is just wrong. And there have been several occasions where Pd would crash and close silently! Only once I got an error message in the Pd console and it said something about 'binbufs'. 
> 
> The bad thing is: I can't reproduce any of these errors. Right now I'm using Pd 0.46-6 on Windows 7.
> 
> My first question: Have you experienced silent crashes of Pd when using the [text] object?
> 
> My second question: Could you quickly try out the attached patch and tell me what happens for you? You only have to press 6 bangs and watch the Pd console.
> 

as with most "myterious bugs", this seems to be related to memory
corruption. (which explains everything from crashes to crop circles).

while i do get "symbol foo" when pressing (4) under "normal
circumstances", i get "1" when running under valgrind.
more interestingly valgrind bitterly complains when i first write
"symbol foo" into the [text] (3):

==17867== Invalid write of size 8
==17867==    at 0x4DE3CF: text_set_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x470BFA: pd_defaultsymbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x473B6B: outlet_symbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4739B8: outlet_bang (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x45A3B9: bng_newclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x455CC3: canvas_doclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47215F: pd_typedmess (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x485C23: socketreceiver_read (in
/home/zmoelnig/src/pd/src/pd)
==17867==    by 0x485076: sys_domicrosleep.constprop.4 (in
/home/zmoelnig/src/pd/src/pd)
==17867==    by 0x481CBE: m_mainloop (in /home/zmoelnig/src/pd/src/pd)
==17867==  Address 0x6a2b080 is 0 bytes inside a block of size 64 free'd
==17867==    at 0x4C2BDDF: realloc (vg_replace_malloc.c:785)
==17867==    by 0x4750B2: resizebytes (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47AAB2: binbuf_resize (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4DE989: text_set_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x470BFA: pd_defaultsymbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x473B6B: outlet_symbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4739B8: outlet_bang (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x45A3B9: bng_newclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x455CC3: canvas_doclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47215F: pd_typedmess (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==  Block was alloc'd at
==17867==    at 0x4C2BDDF: realloc (vg_replace_malloc.c:785)
==17867==    by 0x4750B2: resizebytes (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47AAB2: binbuf_resize (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4DE642: text_set_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x473BF9: outlet_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B6EF: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4739B8: outlet_bang (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x45A3B9: bng_newclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x455CC3: canvas_doclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47215F: pd_typedmess (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x485C23: socketreceiver_read (in
/home/zmoelnig/src/pd/src/pd)
==17867==
==17867== Invalid write of size 8
==17867==    at 0x4DE3D2: text_set_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x470BFA: pd_defaultsymbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x473B6B: outlet_symbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4739B8: outlet_bang (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x45A3B9: bng_newclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x455CC3: canvas_doclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47215F: pd_typedmess (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x485C23: socketreceiver_read (in
/home/zmoelnig/src/pd/src/pd)
==17867==    by 0x485076: sys_domicrosleep.constprop.4 (in
/home/zmoelnig/src/pd/src/pd)
==17867==    by 0x481CBE: m_mainloop (in /home/zmoelnig/src/pd/src/pd)
==17867==  Address 0x6a2b088 is 8 bytes inside a block of size 64 free'd
==17867==    at 0x4C2BDDF: realloc (vg_replace_malloc.c:785)
==17867==    by 0x4750B2: resizebytes (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47AAB2: binbuf_resize (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4DE989: text_set_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x470BFA: pd_defaultsymbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x473B6B: outlet_symbol (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4739B8: outlet_bang (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x45A3B9: bng_newclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x455CC3: canvas_doclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47215F: pd_typedmess (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==  Block was alloc'd at
==17867==    at 0x4C2BDDF: realloc (vg_replace_malloc.c:785)
==17867==    by 0x4750B2: resizebytes (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47AAB2: binbuf_resize (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4DE642: text_set_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x473BF9: outlet_list (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B6EF: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x4739B8: outlet_bang (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x45A3B9: bng_newclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x455CC3: canvas_doclick (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47215F: pd_typedmess (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x47B236: binbuf_eval (in /home/zmoelnig/src/pd/src/pd)
==17867==    by 0x485C23: socketreceiver_read (in
/home/zmoelnig/src/pd/src/pd)
==17867==


gmdsar
IOhannes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160304/fbf07dea/attachment.sig>


More information about the Pd-list mailing list