[Ardour-Dev] Strange cleanup size results
John Emmas
johne53 at tiscali.co.uk
Wed Sep 14 06:30:04 PDT 2016
On 12/09/2016 12:20, John Emmas wrote:
> Hi guys,
>
> Last week I noticed that some Windows users (Mixbus users) are
> complaining about seeing bizarre "sizes" getting reported when they
> try to flush the wastebasket:-
>
> http://mixbus.harrisonconsoles.com/forum/thread-3252.html
>
> So this morning, I decided to see if I could reproduce the problem. My
> first thought was that it might be due to a g_stat() issue
>
I think I've concluded (i.e. made an educated guess) that this might be
due to an invalid path name - most likely happening in a non-English
locale. ARDOUR::Session::cleanup_sources() calls g_stat(), passing a
pathname string and the address of a GStatBuf. On Windows, the first
thing that happens in g_stat() is that the pathname gets converted fro
UTF8 to UTF16. If that conversion fails for some reason, g_stat() will
return an error status, leaving the statbuf uninitialized. Currently
however, we ignore this and carry on regardless. I think that's most
likely why users are seeing the weird figures.
I've pushed commit #83b48f5cc4. It's a small fix to check the returned
result from g_stat(). Hopefully that'll tell us if my guess was right...
John
More information about the Ardour-Dev
mailing list