| All posts |
  • The story of a bug and major progress on the Plane9 screensaver

    published on 1/11/2009 11:40 PM
    The Plane9 screensaver have taken a few big steps towards an actual 1.0 release.

    For one I have finally found a bug that has been bothering me for literally years. The screensaver works on most machine but not on my HTPC running vista home. I tried to make a VM out of the HTPC computer but in the VM the screensaver worked. What happened was that as soon as the screensaver exited it also crashed with a windows error dialog. This was after the actuall screensaver had exited so my crash handlers didn't catch it. Visual studio has a quite good remote debugging application that you can use on another machine. However that application doesn't support Vista home. I seriously don't understand what Microsoft was thinking when they skip supporting the probably most used vista edition.
    I couldn't track down the problem the old fashioned way (Using log messages) since it crashed after the application had exited.
    The thing that started to unravel the crash mystery was that the screensaver only crashed when run in fullscreen. It didn't crash while running in test mode or in a debug build. So after a lot more work I figured it was the WS_POPUP that caused the problem during window create. But that really shouldn't create an issue like that so after a while I turned to the exit code and the way I stopped the screensaver. There in was the problem. The main cause of the problem was that the window class was freed before the window. So now it's fixed and I'm very happy to have finally found the error.

    I have also fixed a few other issues in the editor and remade the ports window. Furthermore 2 new nodes have been added. A delayed transform node that renders an object a number of times and while doing so applies a transform to each new copy. But the thing is that there is a delay before the change travels to the next object instance. This can create some rather nice effects.

    The other node is no less than a particle node. It's quite basic yet but it support all the important things like multiple emitter types (line, sphere, cube, cylinder) changes in size and color relative the the life of the individual particel and so forth. All in less then 500 lines of code. As it seems now so will I have to add new node types for collision and forces (Wind, magnets and so forth) but that will come later.

    An example of this and also the first scene that has been created from scratch in the editor is show in the following image

    The scene dag used to create the scene above isn't more advanced than can be seen here. On the right side you can see the new port window

    The nice thing about the system is that it works as I intended it to. That is that you can start to play around with the values and all of the sudden you have something that looks nice.
    While starting on this scene I had no clue as to what it was going to be. I just added nodes and adjusted values as I went along.

You need to Log in/register to add comments