[argyllcms] Re: Can't create LUT profile on Linux

  • From: Graeme Gill <graeme@xxxxxxxxxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Mon, 23 Apr 2012 12:07:33 +1000

Florian Höch wrote:
> I can confirm this also when running colprof directly, with Argyll CMS 1.3.5 
> up to 1.4.0 (tested
> x86_64 version under Ubuntu 11.10) when using the -tla option. The program 
> exits with a segfault.
> 1.3.4 works ok with -tla.

Attached is a patch for gamut/gammap.c that I think fixes this. -tla isn't one 
of
the usual ICC aligned intents though - is there a particular reason it's being 
used ?

Graeme Gill.
*** Argyll_V1.4.0/gamut/gammap.c        Thu Apr 19 16:29:32 2012
--- Argyll_V1.4.1_beta/gamut/gammap.c   Mon Apr 23 10:57:04 2012
***************
*** 479,485 ****
        cow lpnts[10];          /* Mapping points to create grey axis map */
        int revrspl = 0;        /* Reverse grey axis rspl construction */
        int ngreyp = 0;         /* Number of grey axis mapping points */
-       cow *gpnts;                     /* Mapping points to create gamut 
mapping */
        int ngamp = 0;          /* Number of gamut mapping points */
        double xvra = XVRA;     /* Extra ss vertex ratio to src gamut vertex 
count */
        int j;
--- 479,484 ----
***************
*** 1162,1167 ****
--- 1161,1167 ----
        /* Create all the 3D->3D gamut mapping points and 3D rspl, */
        /* if there is any compression or expansion to do. */
        if (gmi->gamcpf > 1e-6 || gmi->gamexf > 1e-6) {
+               cow *gpnts = NULL;      /* Mapping points to create gamut 
mapping */
                int nspts;              /* Number of source gamut surface 
points */
                int rgridpts;   /* Number of range surface grid points */
                int i, j;
***************
*** 2198,2203 ****
--- 2198,2204 ----
  #endif /* PLOT_3DKNEES */
  
  
+               free(gpnts);
                free_nearsmth(nsm, nnsm);
  
        } else if (diagname != NULL && verb) {
***************
*** 2211,2217 ****
        sc_gam->write_trans_vrml(sc_gam, "gmsrc.wrl", 1, 0, map_trans, s);
  #endif
  
-       free(gpnts);
        if (sil_gam != scl_gam)
                sil_gam->del(sil_gam);
        scl_gam->del(scl_gam);
--- 2212,2217 ----

Other related posts: