[ace-users] ACE::fini() method blocks

Templie Cédric cedric.templie at echotechnologies.ch
Thu Jun 28 08:36:28 CDT 2007


Hello,

  ACE VERSION: 5.5.9

    HOST MACHINE and OPERATING SYSTEM:
        If on Windows based OS's, which version of WINSOCK do you
        use?: Windows XP SP 2

    TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
    COMPILER NAME AND VERSION (AND PATCHLEVEL): Microsoft Visual 
Studio.net (MSVC 7.1)

    THE $ACE_ROOT/ace/config.h FILE: config-win32.h

    THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
    use a link to a platform-specific file, simply state which one
    (unless this isn't used in this case, e.g., with Microsoft Visual
    C++)]: N/A

    CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
    (used by MPC when you generate your own makefiles): N/A

    AREA/CLASS/EXAMPLE AFFECTED: N/A

    DOES THE PROBLEM AFFECT:
        COMPILATION? No
        LINKING? No
        EXECUTION? Yes
        OTHER (please specify)?

    SYNOPSIS:
        I used a combination of Qt and ACE in my application.
        I start the ACE proactor in a QThread, everything is just fine 
until the program exit.
        I end the proactor event loop, this has the effect of 
terminating the QThread.
        I wait the QThread termination.
        I call the ACE::fini() and the program is block here.

    DESCRIPTION:
         Here a structure of MyProactor class that is a QThread:
          MyProactor::run() ( QThread execution function )
          {
                ACE_Proactor::run_event_loop() ;
           }

          MyProactor::stop()
          {
                 ACE_Proactor *proactorInstance = ACE_Proactor::instance() ;

                // Check if the ACE Proactor instance pointer is valid
                if( proactorInstance != 0 )
                {
                    // Stop the ACE Proactor event loop
                    proactorInstance->proactor_end_event_loop() ;
                  }  
             }

          And my termination method

          Bootstrap::finalize()
          {
                   // Stop and wait my proactor execution
                  myProactor.stop();
                  myProactor.wait();

                   ACE::fini(); --> at this point the application is 
blocked.
           }

       Here is the last call stack:
ACE_d!ACE_Select_Reactor_T<ACE_Reactor_Token_T<ACE_Token> >::deactivate+0x33
ACE_d!ACE_Reactor::end_reactor_event_loop+0x26
ACE_d!ACE_Asynch_Pseudo_Task::stop+0x36
ACE_d!ACE_WIN32_Proactor::~ACE_WIN32_Proactor+0x42
ACE_d!ACE_WIN32_Proactor::`vector deleting destructor'+0x57
ACE_d!ACE_Proactor::close+0xb9
ACE_d!ACE_Proactor::~ACE_Proactor+0x32
ACE_d!ACE_Proactor::`scalar deleting destructor'+0x16
ACE_d!ACE_Proactor::close_singleton+0x90
ACE_d!ACE_Framework_Component_T<ACE_Proactor>::~ACE_Framework_Component_T<ACE_Proactor>+0x38
ACE_d!ACE_Framework_Component_T<ACE_Proactor>::`scalar deleting 
destructor'+0x16
ACE_d!ACE_Framework_Repository::close+0xf2
ACE_d!ACE_Framework_Repository::~ACE_Framework_Repository+0x32
ACE_d!ACE_Framework_Repository::`scalar deleting destructor'+0x16
ACE_d!ACE_Framework_Repository::close_singleton+0x87
ACE_d!ACE_Object_Manager::fini+0xa7
ACE_d!ACE::fini+0x39
ASIDP_d!Bootstrap::finalizeASI+0x4d
ASIDP_d!_CRT_INIT+0xf3
ASIDP_d!_DllMainCRTStartup+0x105

    REPEAT BY: N/A

    SAMPLE FIX/WORKAROUND: N/A

Regards

Cédric Templie



More information about the Ace-users mailing list