memory usage pegs after running gri

Help
Luke
2007-08-02
2013-04-24
  • Luke

    Luke - 2007-08-02

    I am running Ubuntu 7.04

    I tried running the sample xy plot given in the manual with a small .dat file with two columns (x and Y) with about 10 data points.  After I run "gri test.gri" on the command line it creates the .ps file but then my computer slows down and my mouse gets "jerky"  running the "top" command shows that a process "gs" is pegging my memory usage at about 80-90%, I can kill the process or wait about 5 minutes and then it goes away.  However, if I try and open the resulting .ps file (around 20kb in size) it pegs memory usage on the "gs" process again.  I have to kill that process to do anything and can never view the file.  Any ideas?

    thanks,
    Luke

     
    • Dan Kelley

      Dan Kelley - 2007-08-13

      Can you post the PS file that is created?

       
    • Marcus Ritt

      Marcus Ritt - 2007-09-12

      Same problem for me. I had gri2.12.9 and an older version of gv running without problems. Switching to Ubuntu 7.04, which comes with a gri 2.12.13 and gv 3.6.2, gv consumes huge amounts of memory when displaying gri output. A diff of an old postscript file and the current ones shows that the only change (except comments) is an additional

      /Century findfont dup length dict begin
        {1 index /FID ne {def} {pop pop} ifelse } forall
        /Encoding ISOLatin1Encoding def
        currentdict
      end
      /Century-ISOLatin1 exch definefont pop

      in the new postscript files. If you remove this, all is fine.

      Any ideas, how to fix that? I think the output of gri is ok, but what's the problem of gv with this font?

      -- Marcus

       
    • Dan Kelley

      Dan Kelley - 2007-09-12

      Based on the message just posted by cramus, this seems to be a problem with "gs", not "gri".

      Still, though, I'd like to offer some help.

      To be honest, I only added this "New Century" font because I was adding some other fonts.  I don't know that anyone actually *uses* the font.  Of course, there's no way for me to know that, so I'm a bit reluctant to delete support for the font.

      If you have the ability to build Gri on your system, the solution would be to comment out the lines in which the offending Postscript commmands are being printed to the file.  For the version on my machine, this would mean changing lines 88, 89 and 90 in grstring.cc from

          {gr_font_TimesBoldItalic, "Times-BoldItalic"},
          {gr_font_Century, "Century"},
          {gr_font_end_of_list, ""}

      to

          {gr_font_TimesBoldItalic, "Times-BoldItalic"},
      /*    {gr_font_Century, "Century"},*/
          {gr_font_end_of_list, ""}

       
    • Dan Kelley

      Dan Kelley - 2007-09-12

      Oh, wait a sec ... I see that gri is not adding the Century to the font list, near the end of the postscript file.  The third-last line of the file should be "%%DocumentFonts:" and then a space-separated list of fonts.

      I wonder, could someone who has this problem try adding the word

         Century

      to that font list, to see if the problem goes away?  If so, then the solution is really quick.

      Thanks in advance, to anyone who can do this test for us.

      Dan.

       
    • Marcus Ritt

      Marcus Ritt - 2007-09-12

      Unfortunately, adding Century to %%DocumentFonts does not help. You can find an example of a modified postscript at
      http://www.inf.ufrgs.br/~mrpritt/e4-1.ps
      -- Marcus

       
    • Marcus Ritt

      Marcus Ritt - 2007-09-12

      I also tried to comment out the Century in grstring.cc; i think you have to comment out line 403 of gr.cc

      create_font_encoding("Century");

      too. After that, works fine for me. -- Marcus

       
      • Dan Kelley

        Dan Kelley - 2007-09-12

        Thanks.  My plan is to delete support for the New Century font.  If that generates bug reports -- that is, if some Gri users would like to use this newly-added font -- then I'll return to the issue and try to figure out something more elegant.

        (I only added New Century because I was doing some other font work.  Personally, I'm happy with Helvetica for my work.)

        NOTE: I will initially do this only in the CVS stream, and not as a full release.  The reason for this is that I prefer to hold of on releases until I've fixed 3 or so bugs, or until a reasonable time interval has passed since the last bug fix.  This policy is for convenience; making a release takes quite a lot of time, for both me and the Debian packager, and users can be annoyed by new releases that occur every few days.  Having said all of this, if anyone on this thread wants a release (i.e. if they are not able to compile from CVS source), I'd be happy too make the release.  All of this will be on the weekend.

         

Log in to post a comment.