none
Unrecoverable Exception RRS feed

  • Question

  • Hello all,I guard some instructions inside a thread with SEH. The handler returns EXCEPTION_CONTINUE_EXECUTION.

    But the SEH around ::sendto throws 0xC0000005, access violation, writes to tracefile and the programm is terminated.

    __try
    {
         bHasData= g_theLua.SendPacket( pUdp->m_varPaket);
    } __except( SEHException::Out( L"Udp::Send::HasData", GetExceptionInformation()) ){}

    // erst alles schicken, was geschickt werden soll
    if( bError == FALSE && bHasData == TRUE )
    {
        __try
        {
            pUdp->m_varPaket.inport= g_theInport.GetFast();
            pUdp->m_varPaket.outport= g_theOutport.GetFast();
            pUdp->m_varPaket.dietemp= (int)g_theTemp.GetFast();
            pUdp->m_varPaket.nsw= g_theSSI.GetPos();

         } __except( SEHException::Out( L"Udp::Send::AddData", GetExceptionInformation()) ){}

         __try
         {
             if( ::sendto( pUdp->m_socket, (const char*)&pUdp->m_varPaket, pUdp->m_varPaket.len, 0,
                 (SOCKADDR*)&pUdp->m_SendAddr, sizeof(pUdp->m_SendAddr)) < 0 )
                 break;

          } __except( SEHException::Out( L"Udp::Send::SendData", GetExceptionInformation(), pUdp->m_varPaket.len,       pUdp->m_varPaket.acqsCount,
                                        pUdp->m_varPaket.numbersCount, pUdp->m_varPaket.tableHashCount) ){}

                        dwLastSendRecv= GetTickCount();

    }
    else

    How can a 0xC0000005 exception terminate the program, if it is protected by SEH?

    All the parameters written to the trace are OK, the memory is OK.

    Many thanks for your help.

    Wednesday, December 7, 2016 3:17 PM

All replies