Assertion Failed! Handle has not been created.

Hey,
 
I have recently been working on a tutorial application using C#, and between each "slide", I need to fade out the current slide's controls and fade in the next slide's controls. To do this, I created a new control, and added a FadeIn and a FadeOut command.

I successfully added the fadeout command, and I escentially mirrored it to make a fadein command by copying the code and switching out the variables.

Now, here is the problem that I am having.
At program execution, this code is called to fade in my first screen:

[CODE]
Debug.WriteLine("Fadein() Called");
        Debug.WriteLine("Fadein() line1");
        animD_FadeIn = new AnimatedDouble( this.Visual.Alpha );
       
        Debug.WriteLine("Fadein() line2");
        this.animD_FadeIn.FinalValue = 255.00;
       
        Debug.WriteLine("Fadein() line3");
        this.animD_FadeIn.Speed = 0.85;
        Debug.WriteLine("Fadein() line4");
        this.animD_FadeIn.Epsilon = 0.5;
       
        Debug.WriteLine("Fadein() line5");
        if ( this.timer_fadeout == null )
        {
            this.timer_fadein= new PlayerTimer();
            this.timer_fadein.Tick += new EventHandler(fadeIn_Timer);
            this.timer_fadein.Start();
        }
[/CODE]

Now. Below where it says "Line 1" is where I have traced the problem. Apparently, C# doesn't like me putting this.Visual.Alpha there.

Any help


P.S, It shouldn't make a difference, but I am using a C# to SWF compilor called neoswiff.
www.globfx.com/products/neoswiff

It allows you to program in C# and it compiles it into a flash movie.



Answer this question

Assertion Failed! Handle has not been created.

  • S Krishna

    the first post says

    'Now. Below where it says "Line 1" is where I have traced the problem. Apparently, C# doesn't like me putting this.Visual.Alpha there.'

    the second post says "i am referring to that control's properties / methods / whatyoumaycallit." Actually, you are calling the constructor for AnimatedDouble.

    the second also says "it works".

    But it's NOT working, right So please tell us more about HOW it's NOT working: any error messages error numbers Is it a C# problem, or a problem with the call to the library

    Altho one can refer to documentation, it may be wrong; the final arbiter is always The Code.

    Suggestion: put this line of code
           this.animD_FadeOut = new AnimatedDouble(this.Visual.Alpha);
    in a try/catch and see if an exception is thrown.

    Sorry i cant be more definite than that, but there's not much info to go on here...



  • mac314

    Erm..

    It's part of a control class, so by this i am referring to that control's properties / methods / whatyoumaycallit.

    Inside the control is the "Visual" class (inherited), and I need to pass the property "Alpha" to AnimatedDouble so it can animate a fadein/fadeout.

    This code for Fade Out is exactly the same, but with the variables named to fadein and not fade out. It works:

    public void FadeOut ()
        {
            this.animD_FadeOut = new AnimatedDouble(this.Visual.Alpha);
           
            this.animD_FadeOut.FinalValue = 0.00;
           
            this.animD_FadeOut.Speed = 0.85;
            this.animD_FadeOut.Epsilon = 0.5;
           
            if ( this.timer_fadeout == null )
            {
                this.timer_fadeout= new PlayerTimer();
                this.timer_fadeout.Tick += new EventHandler(fadeOut_Timer);
                this.timer_fadeout.Start();
            }
        }


    Now, as for he animated double's overrides (if I get you correctly)
    Then look here:

    http://www.globfx.com/products/neoswiff/sdk/System.Animation.EasyOut/AnimatedDouble.html

    Also, I noticed that this only happens in debug mode.


  • jonchicoine

    Hey Ex -

    What arguments to the AnimatedDouble ctor do you permit

  • Ingo Muschenetz

    It is only failing in debug mode as assertions are obviously being disabled in release mode. So it is still failing, but just quietly.

    I think it actuallly looks like an issue with neoswiff and would try contacting them. There is not a lot anyone here can do without having had experience with neoswiff.

    This is also more a Windows Forms issue rather than a C# Language issue, so I am moving forums.

  • Assertion Failed! Handle has not been created.