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

Porting the decompose/compose plugin

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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Porting the decompose/compose plugin "Alexander H 14 Aug 21:11
  Porting the decompose/compose plugin Kevin Cozens 15 Sep 16:33
"Alexander H
2011-08-14 21:11:29 UTC (over 13 years ago)

Porting the decompose/compose plugin

Hi there,

i'm currently porting the decompose/compose plugins to use babl, but i'm bumping into the following error:

decompose.c:

Including "babl/babl.h"

and simply defining

const Babl *rgb = babl_format ("RGB u8");

in the function extract_hsv without doing anything else brings me to:

fatal error: segmentation fault Gimp-Base-WARNING **: 4 tile managers leaked unref tile manager 0xa99e150 (900 x 595) unref tile manager 0xa991460 (900 x 595) unref tile manager 0xa869580 (900 x 595) unref tile manager 0xa991400 (900 x 595)

after using the plugin to decompose an image into HSV!

What do I have to do to stop the leaking? I don't see the connection!

Thx!

Alex

Kevin Cozens
2011-09-15 16:33:58 UTC (about 13 years ago)

Porting the decompose/compose plugin

On 11-08-14 05:11 PM, Alexander Hämmerle wrote:

decompose.c:

Including "babl/babl.h"

and simply defining

const Babl *rgb = babl_format ("RGB u8");

in the function extract_hsv without doing anything else brings me to:

fatal error: segmentation fault Gimp-Base-WARNING **: 4 tile managers leaked

[snip]

What do I have to do to stop the leaking? I don't see the connection!

If the code seg faulted it wouldn't have had the chance to do proper clean up. From what I seen in the babl sources babl_format() allocates new memory. You need to call a routine to get rid of the structure when you are done with it.

Run your program with debugging enabled so you can get a backtrace when the code seg faults. If the code is seg faulting when your program is terminating it might be due to your not having called babl_init(). I'm not an expert on babl so I could be a little off here. You should check the babl docs or talk to Pippin (on IRC).