[Kstars-devel] Problem with coordinate grid at high zoom

Jason Harris jharris at 30doradus.org
Sun Sep 2 19:07:34 CEST 2007


Hello,

I wanted to see which components were calling drawAllLines[Int|Float](), so I 
added the following debug statement to each function:

	//DEBUG
	kDebug() << this << skyMesh()->isZoomedIn() << endl;

I also added debugs to dump the addresses of all line components on startup, 
which gave this just now:

kstars(18788) SkyMapComposite::SkyMapComposite: Milky Way:  0x88aa50
kstars(18788) SkyMapComposite::SkyMapComposite: Coordinate Grid:  0x8bf990
kstars(18788) SkyMapComposite::SkyMapComposite: Constell Bounds:  0x8bfbc0
kstars(18788) SkyMapComposite::SkyMapComposite: Constell Lines:  0x8c24c0
kstars(18788) SkyMapComposite::SkyMapComposite: Equator:  0x8c2c80
kstars(18788) SkyMapComposite::SkyMapComposite: Ecliptic:  0x8c2dc0
kstars(18788) SkyMapComposite::SkyMapComposite: Horizon:  0x8c2b80

Then while zooming in and out, I got these debugs printed:
kstars(18788) SkyMapComposite::draw: ***===--->>> Coordinate grid:  0x8bf990
kstars(18788) LineListIndex::drawAllLinesFloat: 0x8c2c80 false
kstars(18788) SkyMapComposite::draw: ***===--->>> Coordinate grid:  0x8bf990
kstars(18788) LineListIndex::drawAllLinesFloat: 0x8c2dc0 true

As you can see, if the skyMesh is "zoomed in" ("true" in above debugs), then 
the Equator is calling drawAllLinesFloat(), but if the mesh is zoomed out, 
then the Ecliptic calls drawAllLinesFloat().

This is because of line 52 in ecliptic.cpp:

	if ( ! skyMesh()->isZoomedIn() ) {

That "!" should not be there.  In fact, this whole code block should just be 
replaced with NoPrecessIndex::draw(), like ecliptic::draw() does.

So the Ecliptic and Equator call drawAllLines*() at all times, I guess that 
was deemed necessary.  I had hoped to see that the coordinate grid was 
somehow trying to draw all of its segments, but it doesn't seem to be so.

Still digging...
Jason

On Sunday 02 September 2007 09:15:13 am Jason Harris wrote:
> Hello,
>
> KStars locks up at very high zoom levels.  I have traced the problem to the
> coordinate grid.  If you disable the grid in the toolbar, then zoom in
> everything's fine.  But if you re-enable the grid, the CPU immediately goes
> nuts and the program becomes totally unresponsive.
>
> I'm looking into it now...James, is there anything unique about the way the
> grid is handled compared to other linelist items like constellation
> boundaries?
>
> Jason
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel




More information about the Kstars-devel mailing list