Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. warning:C++ exception, flags=0x1
Forum Updated to NodeBB v4.3 + New Features

warning:C++ exception, flags=0x1

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 5 Posters 6.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gianluca86
    wrote on 25 Jul 2016, 14:26 last edited by
    #1

    Hi everyone,
    when I run my program generates a strange warning:

    warning: Exception at 0x74e9dae8, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance)
    

    This warning is generated after the program performs a custom Throw:

    if(!m_TcpSocket->waitForConnected(TIMEOUT_CONNECTION))
    {
      QString strTimeout = m_TcpSocket->errorString();
      throw ApplicationException(strTimeout);
    }
    

    I've been looking around, but I have not found anything that could explain the problem.
    My program runs on Linux and Window. Linux is a 32-bit Ubuntu 14.04 and not cause any problems while on windows 10 64 bits yes.
    Also initially used QT 5.7.0 on Windows 10 64-bit and it was fine, it appeared when I switched to QT 5.7.0 32bit. But I need to use the 32bit on Windows.

    J 1 Reply Last reply 26 Jul 2016, 05:00
    0
    • G Gianluca86
      25 Jul 2016, 14:26

      Hi everyone,
      when I run my program generates a strange warning:

      warning: Exception at 0x74e9dae8, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance)
      

      This warning is generated after the program performs a custom Throw:

      if(!m_TcpSocket->waitForConnected(TIMEOUT_CONNECTION))
      {
        QString strTimeout = m_TcpSocket->errorString();
        throw ApplicationException(strTimeout);
      }
      

      I've been looking around, but I have not found anything that could explain the problem.
      My program runs on Linux and Window. Linux is a 32-bit Ubuntu 14.04 and not cause any problems while on windows 10 64 bits yes.
      Also initially used QT 5.7.0 on Windows 10 64-bit and it was fine, it appeared when I switched to QT 5.7.0 32bit. But I need to use the 32bit on Windows.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 26 Jul 2016, 05:00 last edited by
      #2

      @Gianluca86 Well, I guess nobody catches that exception? An exception which is not handled leads to program termination. You should catch this exception.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        micland
        wrote on 26 Jul 2016, 07:54 last edited by
        #3

        AFAIR it's a MSVC "feature" and should only occure in debug mode (nomatter if you catch the exception or not).
        You can ignore this warning of you catch and handle the exception.
        Or does this message also appear when you compile your code in release mode and run the application outside of any (debugger connected) IDE?

        1 Reply Last reply
        2
        • X Offline
          X Offline
          xyon
          wrote on 20 Dec 2016, 22:33 last edited by
          #4

          The problem is probably because you are using a 32bit program on a 64bit OS. Windows can't unwind the stack through a 64/32 bit transition. You have probably thrown an exception in code called from a windows callback (eg a Win Proc), but any exception handler is further up the stack than the windows callback.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kshegunov
            Moderators
            wrote on 20 Dec 2016, 22:58 last edited by
            #5

            Note: This function may fail randomly on Windows. Consider using the event loop and the connected() signal if your software will run on Windows.

            http://doc.qt.io/qt-5/qabstractsocket.html#waitForConnected

            Read and abide by the Qt Code of Conduct

            1 Reply Last reply
            2

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved