[gt-users] memory leak in callback
Sascha Steinbiss
steinbiss at zbh.uni-hamburg.de
Sat Dec 6 12:15:30 CET 2008
Brent Pedersen wrote:
> 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)
Oh, thanks. I will look into this later over the weekend.
>> 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...
Yes, I am actually aware of this (maybe some heuristic in the ctypes
package?). Valgrind/memcheck runs on an example case did not result in
lost memory, so I did not think of this as too acute. The failed
assertion is more important anyway, IMHO.
> 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.
Perfect, thanks a lot. I am also working on your variable bar
height/z-index requests, which may require some more work as this
complicates the drawing process.
I will report back as soon as I get something fixed. However, perhaps
may take a day or two...
-Sascha
More information about the gt-users
mailing list