[gt-users] memory leak in callback

Brent Pedersen bpederse at gmail.com
Fri Dec 5 20:56:55 CET 2008


On Fri, Dec 5, 2008 at 11:09 AM, Brent Pedersen <bpederse at gmail.com> wrote:
> hi, i'm running gtpython from a web-server and occassionally see this
> message, though often, it'll refresh and work correctly:
>
> [Fri Dec 05 10:58:23 2008] [error] sys:1: RuntimeWarning: memory leak
> in callback function.
> apache2: src/core/bittab.c:187: gt_bittab_bit_is_set: Assertion `b &&
> bit < b->num_of_bits' failed.
> [Fri Dec 05 10:58:24 2008] [notice] child pid 26870 exit signal Aborted (6)
>
>
> i'm guessing the callback function is my track selector:
>
> def track_selector(b):
>    if b.get_type() == 'miRNA':
>        return b.get_type()
>    return b.get_strand()
>
>
> is there something i can add to make sure there's no mem leak? or let
> me know if/how i can provide more helpful info.
> it's intermittent, and i'm not able to find a small test-case...
>
> thanks,
> -brent
>

i found a good test case using the sketch_parsed.py in gtpython/

python sketch_parsed.py gt.style t.png grape.gff

with:
http://128.32.8.100/gt/gt.style
http://128.32.8.100/gt/grape.gff

gives:
$ python sketch_parsed.py /var/www/gt/gt.style t.png /var/www/gt/grape.gff
/opt/src/genometools/gtpython/gt/annotationsketch/layout.py:27:
RuntimeWarning: memory leak in callback function.
  self.layout = gtlib.gt_layout_new(diagram, width, style, err)
python: src/core/bittab.c:187: gt_bittab_bit_is_set: Assertion `b &&
bit < b->num_of_bits' failed.
Aborted

with default.style, it doesnt fail the assertion. but warns of memory leak.


More information about the gt-users mailing list