Ah, I'm somehow relieved I'm not the only one getting this behaviour! Now I got a bit closer:
a) I usually get '1' when I run the patch for the first time *after a system restart* and only if I don't specify a certain line number first. After just reopening the patch or Pd I don't necessarily get these errors.
b) If I get a wrong output from [text] AND start the metro (triggering random writes into [text]) AND after some time try to create a new object I get the following error messages in the console (for every metro bang):
"pd resizebytes() failed - out of memory"
So you're probably right with your guess about memory corruption
Gesendet: Freitag, 04. März 2016 um 00:02 Uhr Von: "IOhannes m zmölnig" zmoelnig@iem.at An: pd-list@lists.iem.at Betreff: Re: [PD] Mysterious bug with [text]
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
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list