python bindings GInitiallyUnowned issue



Hello, I find that calling ChamplainView object's set_map_source() with the result of champlain.file_cache_new_full() in python leads to errors..

        self.tilecache = champlain.file_cache_new_full( 1,
                                     '/home/rghosh/shared/test/jepp_osm',
                                     True )

        print "ref count 1", sys.getrefcount(self.tilecache)
        sys.stdout.flush()
        view.set_map_source( self.tilecache )
        print "ref count 2", sys.getrefcount(self.tilecache)

output:

ref count 1 2

** (cluttertest.py:25857): CRITICAL **: get_min_zoom_level: assertion `CHAMPLAIN_IS_MAP_SOURCE (next_source)' failed

** (cluttertest.py:25857): CRITICAL **: get_max_zoom_level: assertion `CHAMPLAIN_IS_MAP_SOURCE (next_source)' failed

** (cluttertest.py:25857): CRITICAL **: get_license: assertion `CHAMPLAIN_IS_MAP_SOURCE (next_source)' failed

** (cluttertest.py:25857): CRITICAL **: get_tile_size: assertion `CHAMPLAIN_IS_MAP_SOURCE (next_source)' failed

** (cluttertest.py:25857): CRITICAL **: get_tile_size: assertion `CHAMPLAIN_IS_MAP_SOURCE (next_source)' failed

** (cluttertest.py:25857): CRITICAL **: get_tile_size: assertion `CHAMPLAIN_IS_MAP_SOURCE (next_source)' failed
ref count 2 2

I wonder if it's due to reference count issues in the python bindings, since ChamplainFileCache inherits from GInitiallyUnowned ?

Ranen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]