RSS/Atom feed Twitter
Site is read-only, email is disabled

Gimp swap file increase

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

20 of 20 messages available
Toggle history

Please log in to manage your subscriptions.

Gimp swap file increase Andrei Simion 12 Apr 17:38
  Gimp swap file increase Sven Neumann 12 Apr 22:01
   Gimp swap file increase Andrei Simion 19 Apr 05:29
    Gimp swap file increase Sven Neumann 19 Apr 22:42
     Gimp swap file increase Andrei Simion 19 Apr 22:45
      Gimp swap file increase Sven Neumann 19 Apr 22:49
       Gimp swap file increase Andrei Simion 19 Apr 22:58
       Gimp swap file increase Andrei Simion 20 Apr 00:11
        Gimp swap file increase Manish Singh 20 Apr 00:31
         Gimp swap file increase Andrei Simion 20 Apr 00:35
          Gimp swap file increase Carol Spears 20 Apr 00:41
           Gimp swap file increase Andrei Simion 20 Apr 00:47
          Gimp swap file increase Manish Singh 20 Apr 01:10
           Gimp swap file increase Andrei Simion 20 Apr 02:19
            Gimp swap file increase Bill Kendrick 20 Apr 02:41
            Gimp swap file increase Michael Schumacher 20 Apr 02:42
             Gimp swap file increase Andrei Simion 20 Apr 02:57
              Gimp swap file increase Manish Singh 20 Apr 03:12
Gimp swap file increase Michael Schumacher 20 Apr 11:23
  Gimp swap file increase Andrei Simion 20 Apr 15:57
Andrei Simion
2005-04-12 17:38:55 UTC (about 19 years ago)

Gimp swap file increase

Hi all,

I have a problem with my Gimp server which runs on Linux. Every time I create an image, the memory used by the Gimp increases. I tried to delete the image at the end of the Perl subroutine that creates it, but the memory usage still goes up and is never freed. As a result, I have to restart the gimp server periodically.

To delete the image I'm using gimp_image_delete. I also tried gimp_layer_delete, but I'm getting an error when I use it.

Am I missing something?

Thanks, Andrei

Sven Neumann
2005-04-12 22:01:14 UTC (about 19 years ago)

Gimp swap file increase

Hi,

Andrei Simion writes:

I have a problem with my Gimp server which runs on Linux. Every time I create an image, the memory used by the Gimp increases. I tried to delete the image at the end of the Perl subroutine that creates it, but the memory usage still goes up and is never freed. As a result, I have to restart the gimp server periodically.

If you can create a simple test case that shows the problem, we can try to help you debugging it. So far you didn't even tell us what version of GIMP you are using.

Sven

Andrei Simion
2005-04-19 05:29:39 UTC (about 19 years ago)

Gimp swap file increase

Hi,

Sven Neumann wrote:

Hi,

Andrei Simion writes:

I have a problem with my Gimp server which runs on Linux. Every time I create an image, the memory used by the Gimp increases. I tried to delete the image at the end of the Perl subroutine that creates it, but the memory usage still goes up and is never freed. As a result, I have to restart the gimp server periodically.

If you can create a simple test case that shows the problem, we can try to help you debugging it. So far you didn't even tell us what version of GIMP you are using.

You are right. Here is the script:

#!/usr/bin/perl

use Gimp ":auto"; use Gimp::Fu;

# create a footer image

sub newimage { my ($width, $height,
$texture,
$color1, $color2,
$blend_direction, $blend_offset) = @_;

# Create a new image $img = gimp_image_new($width, $height, RGB);

# Create a new layer $layer = gimp_layer_new($img, 725, 125, RGB, "Layer 1", 0, NORMAL_MODE);

# define the background colors $backgroundcolor = "#0000FF"; # blue $foregroundcolor = "#FF0000"; # red gimp_palette_set_background($backgroundcolor); gimp_palette_set_foreground($foregroundcolor);

# add the layer to the image gimp_image_add_layer($img, $layer, -1);

# gimp_selection_all($img); gimp_layer_add_alpha($layer);
gimp_drawable_fill($layer,BG_IMAGE_FILL); # gimp_selection_border($img, 3); #script_fu_addborder($img, $layer, 3, 3, "#000000", "100");

gimp_palette_set_background("#000000");

# define first region gimp_rect_select ($img, 0, 0, 725, 5, 2, 0, 0); # (x1, y1, x2, y2) # fill the region
gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0);

# define the second region gimp_rect_select ($img, 0, 120, 725, 125, 2, 0, 0); # fill the second region
gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0);

# define the left lateral region gimp_rect_select($img, 0, 0, 5, 125, 2, 0, 0); # fill the region
gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0);

# define the right lateral region gimp_rect_select($img, 720, 0, 725, 125, 2, 0, 0); # fill the region
gimp_bucket_fill($layer,BG_BUCKET_FILL,0,100,100,0,0,0);

my $text = "text"; my $font = qq{-*-agenda-medium-r-normal-*-24-*-*-*-*-*-*-*}; my $text_layer = gimp_text_fontname($layer, 0, 0, $text, -1, #border 1, #antialias 48, #size 0, #size type $font );

# determine the position of the text my $texty = $height/2 - $text_layer->height/2; my $textx = $width/2 - $text_layer->width/2;

# pull out text layer we were checking size and fonts on. gimp_image_remove_layer($img,$text_layer);

# create again the layer my $text_layer = gimp_text_fontname($layer, $textx, $texty, $text, -1, #border 1, #antialias 48, #size 0, #size type $font );

gimp_floating_sel_anchor($text_layer);

# draw the border (cannot define its width) # script_fu_addborder($img, $layer, 3, 3, "#000000", "1");

#$layer2 = gimp_layer_new($img, 725, 5, RGB, "Layer 2", 0, NORMAL_MODE);
#gimp_image_add_layer($img, $layer2, -1); #gimp_selection_all($img);
#gimp_layer_add_alpha($layer2); #gimp_drawable_fill($layer2,FG_IMAGE_FILL);

# Set the background to the required color # gimp_palette_set_foreground($color1); # gimp_palette_set_background($color2);

# Paint the layer #gimp_edit_fill($layer, BG_IMAGE_FILL); #gimp_edit_fill($layer2, FG_IMAGE_FILL);

# delete the image gimp_image_delete($img);

# Return the image # return $img;
}

register
"newimage2", # fill in name "Create a footer", # a small description "for sitesell gimp project", # a help text "Andrei Simion", # Your name "", # Your copyright
"2005-04-17", # Date "/Xtns/Perl-Fu/Tutorial/newimage", # menu path "*", # Image types [
[PF_INT, "width", "Img width", "725"], [PF_INT, "height", "Img height", "80"], [PF_STRING,"texture", "Background Pattern", "none"], [PF_COLOR, "color1", "background color", [255,0,0]], [PF_COLOR, "color2", "Blend color", [0, 0, 255]] ],
\&newimage;

exit main();

So, even though I delete the image, the swap file continues to increase.

You can solve the problem by restarting the Gimp server from time to time. But this is not an elegant way to solve the problem.

Andrei

Sven

Sven Neumann
2005-04-19 22:42:12 UTC (about 19 years ago)

Gimp swap file increase

Hi,

Andrei Simion writes:

If you can create a simple test case that shows the problem, we can try to help you debugging it. So far you didn't even tell us what version of GIMP you are using.

You are right. Here is the script:

You still didn't tell us what version of GIMP you are using. Looking at your script makes me think it might be GIMP 1.2. At least the way you select fonts is definitely an artefact from a script written for GIMP 1.2.

Sven

Andrei Simion
2005-04-19 22:45:00 UTC (about 19 years ago)

Gimp swap file increase

Hi,

Sven Neumann wrote:

You still didn't tell us what version of GIMP you are using. Looking at your script makes me think it might be GIMP 1.2. At least the way you select fonts is definitely an artefact from a script written for GIMP 1.2.

Yes, it is GIMP 1.2.

Andrei

Sven Neumann
2005-04-19 22:49:34 UTC (about 19 years ago)

Gimp swap file increase

Hi,

Andrei Simion writes:

You still didn't tell us what version of GIMP you are using. Looking at your script makes me think it might be GIMP 1.2. At least the way you select fonts is definitely an artefact from a script written for GIMP 1.2.

Yes, it is GIMP 1.2.

GIMP 1.2 is not any longer supported (for quite a while already). Your best bet is to update to GIMP 2.2. That will also give you the benefit that you don't any longer need to run an X server with it.

Sven

Andrei Simion
2005-04-19 22:58:54 UTC (about 19 years ago)

Gimp swap file increase

Thanks a lot!

Andrei

Sven Neumann wrote:

Hi,

Andrei Simion writes:

You still didn't tell us what version of GIMP you are using. Looking at your script makes me think it might be GIMP 1.2. At least the way you select fonts is definitely an artefact from a script written for GIMP 1.2.

Yes, it is GIMP 1.2.

GIMP 1.2 is not any longer supported (for quite a while already). Your best bet is to update to GIMP 2.2. That will also give you the benefit that you don't any longer need to run an X server with it.

Sven

Andrei Simion
2005-04-20 00:11:26 UTC (about 19 years ago)

Gimp swap file increase

Hi,

Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your best bet is to update to GIMP 2.2. That will also give you the benefit that you don't any longer need to run an X server with it.

The problem is that 2.2 doen't work with Red Hat and we cannot change the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 enough advanced to get rid of the problem with the swap file?

Thanks, Andrei

Manish Singh
2005-04-20 00:31:04 UTC (about 19 years ago)

Gimp swap file increase

On Tue, Apr 19, 2005 at 06:11:26PM -0400, Andrei Simion wrote:

Hi,

Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your best bet is to update to GIMP 2.2. That will also give you the benefit that you don't any longer need to run an X server with it.

The problem is that 2.2 doen't work with Red Hat and we cannot change the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 enough advanced to get rid of the problem with the swap file?

2.2 works with Red Hat just fine. So I don't know what the issue is. Just use 2.2.

-Yosh

Andrei Simion
2005-04-20 00:35:42 UTC (about 19 years ago)

Gimp swap file increase

Manish Singh wrote:

On Tue, Apr 19, 2005 at 06:11:26PM -0400, Andrei Simion wrote:

Hi,

Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your best bet is to update to GIMP 2.2. That will also give you the benefit that you don't any longer need to run an X server with it.

The problem is that 2.2 doen't work with Red Hat and we cannot change the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 enough advanced to get rid of the problem with the swap file?

2.2 works with Red Hat just fine. So I don't know what the issue is. Just use 2.2.

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

Thank you, Andrei

-Yosh

Carol Spears
2005-04-20 00:41:10 UTC (about 19 years ago)

Gimp swap file increase

On Tue, Apr 19, 2005 at 06:35:42PM -0400, Andrei Simion wrote:

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

perhaps you could paste the url to where the web site suggested that you download gimp-1.2?

carol

Andrei Simion
2005-04-20 00:47:11 UTC (about 19 years ago)

Gimp swap file increase

Carol Spears wrote:

On Tue, Apr 19, 2005 at 06:35:42PM -0400, Andrei Simion wrote:

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

perhaps you could paste the url to where the web site suggested that you download gimp-1.2?

http://gimp.org/unix/

Sorry for the confusion. They don't have 2.2 downloads that work with Red Hat. This is what I meant. Check out the link above.

Once again my appologies.

Andrei

Manish Singh
2005-04-20 01:10:00 UTC (about 19 years ago)

Gimp swap file increase

On Tue, Apr 19, 2005 at 06:35:42PM -0400, Andrei Simion wrote:

Manish Singh wrote:

On Tue, Apr 19, 2005 at 06:11:26PM -0400, Andrei Simion wrote:

Hi,

Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your best bet is to update to GIMP 2.2. That will also give you the benefit that you don't any longer need to run an X server with it.

The problem is that 2.2 doen't work with Red Hat and we cannot change the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 enough advanced to get rid of the problem with the swap file?

2.2 works with Red Hat just fine. So I don't know what the issue is. Just use 2.2.

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

If you're looking for binaries, Fedora Core 3 is listed, which would be a Red Hat. You can build from source on any Linux distro though.

-Yosh

Andrei Simion
2005-04-20 02:19:06 UTC (about 19 years ago)

Gimp swap file increase

Manish Singh wrote:

On Tue, Apr 19, 2005 at 06:35:42PM -0400, Andrei Simion wrote:

Manish Singh wrote:

On Tue, Apr 19, 2005 at 06:11:26PM -0400, Andrei Simion wrote:

Hi,

Sven Neumann wrote:

GIMP 1.2 is not any longer supported (for quite a while already). Your best bet is to update to GIMP 2.2. That will also give you the benefit that you don't any longer need to run an X server with it.

The problem is that 2.2 doen't work with Red Hat and we cannot change the OS. We can upgrade the GIMP to the version 2.0. Is it OK? Is 2.0 enough advanced to get rid of the problem with the swap file?

2.2 works with Red Hat just fine. So I don't know what the issue is. Just use 2.2.

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

If you're looking for binaries, Fedora Core 3 is listed, which would be a Red Hat. You can build from source on any Linux distro though.

It's not me the one who decides. If they haven't built and tested the 2.2 on the older versions of Red Hat, then this solution is not acceptable for us.

Andrei

Bill Kendrick
2005-04-20 02:41:31 UTC (about 19 years ago)

Gimp swap file increase

On Tue, Apr 19, 2005 at 08:19:06PM -0400, Andrei Simion wrote:

If you're looking for binaries, Fedora Core 3 is listed, which would be a Red Hat. You can build from source on any Linux distro though.

It's not me the one who decides. If they haven't built and tested the 2.2 on the older versions of Red Hat, then this solution is not acceptable for us.

Well then this is really a problem for Red Hat, and not the Gimp developers!

-bill!

Michael Schumacher
2005-04-20 02:42:53 UTC (about 19 years ago)

Gimp swap file increase

Andrei Simion wrote:

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

If you're looking for binaries, Fedora Core 3 is listed, which would be a Red Hat. You can build from source on any Linux distro though.

It's not me the one who decides. If they haven't built and tested the 2.2 on the older versions of Red Hat, then this solution is not acceptable for us.

Who are the "they" you are talking about? Just in case you didn't notice, there are no binaries on gimp.org, all the links point to external sites. No one from gimp.org explicitely tests GIMP on any platform, except that the developers run it on their own platforms, of course.

Michael

Andrei Simion
2005-04-20 02:57:49 UTC (about 19 years ago)

Gimp swap file increase

Michael Schumacher wrote:

Andrei Simion wrote:

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

If you're looking for binaries, Fedora Core 3 is listed, which would be a Red Hat. You can build from source on any Linux distro though.

It's not me the one who decides. If they haven't built and tested the 2.2 on the older versions of Red Hat, then this solution is not acceptable for us.

Who are the "they" you are talking about? Just in case you didn't notice, there are no binaries on gimp.org, all the links point to external sites. No one from gimp.org explicitely tests GIMP on any platform, except that the developers run it on their own platforms, of course.

I haven't downloaded anything from gimp.org so I didn't know the binaries come from other entities. I haven't intended to be disrespectful; if so, please accept my apologies.

But let's go back to my problem. There's a swap file increase every time I run a Perl script that creates an image on the GIMP 1.2. I tried to delete the image at the end of my script, just to see if the swap file stops increasing. The result was negative. I cannot change the OS on the server (I have other services running) and everything should be tested. I have to stick on Red Hat.

The question is whether you have encountered such a problem (swap file increase).

I hope everything is clear now.

Thank you, Andrei

Manish Singh
2005-04-20 03:12:08 UTC (about 19 years ago)

Gimp swap file increase

On Tue, Apr 19, 2005 at 08:57:49PM -0400, Andrei Simion wrote:

Michael Schumacher wrote:

Andrei Simion wrote:

At gimp.org they don't have downloads for 2.2. If you say it works, this is good. But why they don't say the same on the web site.

If you're looking for binaries, Fedora Core 3 is listed, which would be a Red Hat. You can build from source on any Linux distro though.

It's not me the one who decides. If they haven't built and tested the 2.2 on the older versions of Red Hat, then this solution is not acceptable for us.

Who are the "they" you are talking about? Just in case you didn't notice, there are no binaries on gimp.org, all the links point to external sites. No one from gimp.org explicitely tests GIMP on any platform, except that the developers run it on their own platforms, of course.

I haven't downloaded anything from gimp.org so I didn't know the binaries come from other entities. I haven't intended to be disrespectful; if so, please accept my apologies.

But let's go back to my problem. There's a swap file increase every time I run a Perl script that creates an image on the GIMP 1.2. I tried to delete the image at the end of my script, just to see if the swap file stops increasing. The result was negative. I cannot change the OS on the server (I have other services running) and everything should be tested. I have to stick on Red Hat.

So build 2.2 on whatever Red Hat distro you use. There is no reason 2.2 should not work on it.

The question is whether you have encountered such a problem (swap file increase).

There aren't any known problems like this in 2.2. There are in 1.2, along with hundreds of other problems.

-Yosh

Michael Schumacher
2005-04-20 11:23:07 UTC (about 19 years ago)

Gimp swap file increase

Andrei Simion wrote:

I haven't downloaded anything from gimp.org so I didn't know the binaries come from other entities. I haven't intended to be disrespectful; if so, please accept my apologies.

IMO you should at least have read it carefully... Some things don't fit here - on the one hand you're insisting on having everything tested, on the other hand you seem to be a bit sloppy when checking the sources (not the source code) where the things actually come from.

But let's go back to my problem. There's a swap file increase every time I run a Perl script that creates an image on the GIMP 1.2. I tried to delete the image at the end of my script, just to see if the swap file stops increasing. The result was negative. I cannot change the OS on the server (I have other services running) and everything should be tested. I have to stick on Red Hat.

The question is whether you have encountered such a problem (swap file increase).

I hope everything is clear now.

Well, lets clear it up:

- GIMP 1.2 is not longer maintained (even GIMP 2.0 isn't) - there will be no changes to GIMP 1.2 anymore, and thus no further releases - if you're still using 1.2, your're basically on your own

Compiling 2.2 yourself and testing it (if you don't have test cases, it would be a good idea to make some up with the current setup) is the best method to ensure it works fine. I'm actually a bit surprised that you'd rely on others to test the software you're using - do you want to blame someone else if it fails?

HTH,
Michael

Andrei Simion
2005-04-20 15:57:44 UTC (about 19 years ago)

Gimp swap file increase

Michael Schumacher wrote:

Well, lets clear it up:

- GIMP 1.2 is not longer maintained (even GIMP 2.0 isn't) - there will be no changes to GIMP 1.2 anymore, and thus no further releases - if you're still using 1.2, your're basically on your own

Compiling 2.2 yourself and testing it (if you don't have test cases, it would be a good idea to make some up with the current setup) is the best method to ensure it works fine. I'm actually a bit surprised that you'd rely on others to test the software you're using - do you want to blame someone else if it fails?

No. I'd only prefer to have a binary release for the OS I work on. Of course I'll compile and test it, but wouldn't be better if others would have tested it previously?

Anyway, I'd like to thank Manish for answering my questions.

Andrei