[PD-dev] pdstring's crashing

Bryan Jurish moocow at ling.uni-potsdam.de
Wed Jul 25 00:00:31 CEST 2007


moin [ij]ohannes, moin all,

egad...

obviously, you've had a look at the code (which I hadn't recently until
reading your mail)... looking at it now, all I can think of is that for
some reason, "text" hasn't actually got anything but junk in it
(although that would probably lead to "double-free or corruption"
errors... and "text" ought to be filled by the binbuf_gettext() call
[which should at least return getbytes(0) --> calloc(1,1) in
pathological cases] ... any2string_anything() adds the
"text"-terminating NUL itself, so strlen() oughtn't to be goofing up
either... so that's probably not it :-/)...

is there maybe anything fiendishly tricky about the strings you're
converting?

i've successfully used multiple concurrent parallel [any2string]s fed by
speech-rate sentence lists and feeding into a single [sendOSC] for hours
at a time without seeing anything like this -- and that patch tested ok
a few months ago (maybe for a 1/2 hour)... very strange...

... all that said, there's got to be a better way to do the conversion
than to delegate the conversion to binbuf_gettext(): all that allocation
and de-allocation at every message just makes my skin crawl... maybe we
should find a better way to do it... or just use Martin's string patches ;-)

marmosets,
	Bryan

On 2007-07-24 23:14:32, IOhannes m zmölnig <zmoelnig at iem.at> appears to
have written:
> moin
> 
> i get weird random crashes when using [any2string] of bryan's pdstrings
> library.
> 
> unfortunately i have not been able to reproduce them reliably
> (as a matter of fact it only crashes halfway through our performance :-()
> 
> we have spent some time now in tracking the error down, but to real avail.
> 
> the only thing that is rather sure is, that it crashes in the
> freebytes(text) call in any2string_anything() with
> "***glibc detected *** free(): invalid next size(fast): 0x0823e3f0 ***"
> 
> nevertheless i cannot find anything wrong.
> 
> has anybody else experienced this before? bryan?
> any insights would be helpful
> 
> i'll file a bug-report later...

-- 
Bryan Jurish                           "There is *always* one more bug."
jurish at ling.uni-potsdam.de      -Lubarsky's Law of Cybernetic Entomology




More information about the Pd-dev mailing list