The Phantom Dialog



  • Well, I'm stumped.


    Our training control system, which manages multiple computers on a network, contains functionality to allow you to reboot or shutdown systems. That's great! But for some reason, it displays the 'Are you sure you want to do this?' dialog box twice. That's not so great, but it should be an easy fix, right?


    I've commented out the call that creates the dialog. The ONLY call. There is just one place, in the entire program, that creates FormShutdown and calls 'ShowDialog' on it. Just one. It's commented out.

    Yet... the dialog persists...

    Tossed a break point into the constructor for the dialog form, that's not getting hit. Put one in the 'tick' event for it's countdown until the shutdown event, that's not getting hit. Did a recursive search on the entire solution looking for another dialog that does the same thing, and there isn't one.

    Heck, I even deleted all the intermediary files, all the DLLs, and rebuilt from scratch and it's still there.

    I think I need a beer.



    1. Leave call commented out.
    2. "Hey, boss, I fixed that bug. It only displays the dialog once now!"
    3. Beer.


  • Oh god I just figured it out...

    The remote application can -also- throw up the dialog, although it's actually a different dialog written in Managed C++, not C# like the control app, it just looks identical.

    Yeah, time for a beer.



  • @CodeNinja said:

    Oh god I just figured it out...

    You're welcome!


  • Discourse touched me in a no-no place

    @CodeNinja said:

    Yeah, time for a beer.
    A happy ending!



  • @CodeNinja said:

    Oh god I just figured it out...

    The remote application can -also- throw up the dialog, although it's actually a different dialog written in Managed C++, not C# like the control app, it just looks identical.

    Yeah, time for a beer.

    I was going to say, it sounds like a case of the wrong code. An identical dialog box though... and you think you've seen it all, then you see a guy eat his own head.



  • Yeah, that's what was throwing me. We have a 'UI Library' where this common stuff is supposed to be put, so that multiple things can link to it. Yet, for some reason, this dialog exists in two locations. Probably more, actually, I bet the administration tool has one as well.


Log in to reply