[vlc-devel] "equalizer-bands" corrupt/truncated occasionally

Rob rob at hobbyistsoftware.com
Fri Jun 17 16:23:22 CEST 2011


>> I'm not very sure, but the corruption seems to be happening in this
> line:
>>     const char *psz_values = values.toAscii().constData();
>>
>> the length of "values" is correct till just before this, but after
>> conversion, psz_values is often shorter than it should be
>
> QString::toAscii() creates a temporary anonymous object, which is garbage
> collected at the end of the statement, is that right? I wrote many times
> not to assign char pointers to temporary QString's...

Hi Remi,

Any chance of a suggestion on how to fix this?

Akash is using the output of this in the httpLua part of vlc for his gsoc  
project. He has narrowed the problem down to this area and it looks like  
you have identified the problem.

Unfortunately neither he nor I know anything about QT (and it isn't core  
to his project). Any chance of a pointer to the right way to do this? (or  
even a correct line of code)?

thanks in advance,

Rob



More information about the vlc-devel mailing list