On 29 July 2013 13:20,  <marti.ma...@littlecms.com> wrote:
> I'm taking a look on this. The cat's state may be caused by
> a serialization feature: a profile that has never been flushed
> to disk or memory, have a representation of internal data
> which may be different. Let me a day or two to do the
> necessary testing.

Great, thanks. A little more info: The bugs only seems to be triggered
when you do cmsSaveProfileToMem() to get the profile size, then
cmsSaveProfileToMem() again to populate the data blob. If you allocate
a 16Mb lump of memory, and then do cmsSaveProfileToMem() just once,
the bug doesn't seem to trigger.

To add to your worries, I tried to work around it by allocating a lump
of memory like above, and then calling cmsSaveProfileToMem() just
once. This writes the profile, but does not set BytesNeeded, so we
don't know how many bytes to write when saving the file. In colord to
get things working I've used cmsSaveProfileToFile and then reading
back the temp file. This sucks as this is much slower (although
writing profiles isn't in the hot path by any means) and I can't just
use cmsSaveProfileToFile() in libcolord as it writes using GFile,
which allows me to save files on remote shares and that kind of thing.

This is the colord workaround I've used:
https://github.com/hughsie/colord/commit/0baa06134a86b493a07156531ade5fc15b26618c
-- better ideas welcome.

Richard.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to