First of all I finally got my act together and created a complete bug tracking wiki-article on the World Wind site. This page has a table containing general information and priority to bugs, then for each bug I created a section in the bottom half of the page for more detailed description and comments. It probably took me an hour or two to develop this, it's not secure and has a lot of manual editing to update anything, but its something. Its the first time I've been on this project we have been able concretely state what we know needs to get done and to say who is doing what. I have not gotten a whole lot of response, but so far one other active developer has stepped up and begun fixing items from that list. I've picked up another item as well.
Setting up that page was one thing, the second task was to populate it with data. I spent most of this morning reading and replying to threads in the WW Bug Reports Forum. From this I tried to glean the data to see what issues had been found by users but never addressed. The sad thing was a number of threads more than a year old with no replies where I could see no fix was ever made. Ok, I've been at it for 6 months and have not fixed many bugs myself, so I can understand it. I don't like it too much though.
Maybe I enjoy "process", but I feel I am not alone when finding things like proper defect tracking help software development rather than are a burden. I have taken the initiative to provide this data and calling it out. I am not quite sure what the reaction will be from more senior developers, hopefully there will be more positive responses so I will continue.
On the front of fixing bugs, I took a look at two Issues I came across with "Plug-in" code. The first I looked at was the "Starfield" plugin. The issue with this plugin is that it loads by default on start up. However, if you try to uncheck it from the Layer Manager, it will not unload the visible background stars. I would like to go into the Plug-in architecture more later. But basically there is a single Stars3d.cs file containing the Plugin code plus some initialization and data files that get stored in a Plug-ins directory in the application folder. After some trial and error I got this to work by a simple line change in the Stars3DLayer class's Render(DrawArgs) method, approx inserted after line 151
if (!this.IsOn)
return;
IsOn is an inherited property of the RenderableObject base class for the layer. It gets set true or false by the LayerManager when the check/uncheck happens, there seems to be no other hook to the plugin itself when that event is handled in the LayerManager UI.
I made a further enhancement so that the SaveSettings(),ReadSettings(),Dispose() methods would actually save the sate of that check, either On or Off so that if you check it off, the next time you start WorldWind it will stay off (but still loaded).
Open Questions: I'm not sure if there is a some other way that the WW is supposed to know not to render a layer if IsOn == false?
Is there a "business" reason why they wouldn't want the plugin's last state (checked or unchecked) to be persistent?
The second issue I stumbled upon when trying to understand how the LayerManager worked by looking at other plugin code. I tried one called Atmosphere.cs which didn't seem to do anything but repeatedly cause System.NullReferenceException. I traced through this and found a fix pretty quickly. A summary of what I found and my fix can be found in this Bug Report thread
PS: Thanks to The Wandering Geek Blog for the tip on how to configure the blogger styles to render the code blocks nicely with a background. e.g.(Atmosphere.cs):
// Set new one (to avoid being clipped) - probably better ways of doing this?
float aspectRatio = (float)device.Viewport.Width / device.Viewport.Height;
device.Transform.Projection = Matrix.PerspectiveFovRH((float)camera.Fov.Radians, aspectRatio, 1, (float)(2*world.EquatorialRadius) );
device.TextureState[0].ColorOperation = TextureOperation.BlendCurrentAlpha;
Hey! It's good to see stuff finally happening again in World Wind, and to see that you've survived the download code so far ;)
ReplyDeleteI've been around for over 4 years now, and the last 2.5 have been...quiet. I'm as guilty as anyone, but I hope to change that. By all means, keep on doing what you're doing - it makes things so much better to have a good list of bugs/issues to work on. JIRA has been in-process for quite a while, so I'm not holding my breath. Your wiki page is great to have in the interim.
Joel
aka fiveofoh