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. Declarative Debug hangs in Windows QNativeSocketEnginePrivate::nativeSelect
QtWS25 Last Chance

Declarative Debug hangs in Windows QNativeSocketEnginePrivate::nativeSelect

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 1.1k Views
  • 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.
  • j1eloJ Offline
    j1eloJ Offline
    j1elo
    wrote on last edited by
    #1

    Hi all,

    I'm having a hard time trying to debug my application under Windows, due to the debug engine waiting forever on a socket. This happens at initialization, when the most complex stuff in my application hasn't even started.

    The QDeclarativeDebugServer tries to start a socket connection, creating a Winsock socket and hanging in QNativeSocketEnginePrivate::nativeSelect() at line 1356:
    @ret = select(0, &fds, 0, 0, timeout < 0 ? 0 : &tv);@

    A totally basic Qt app is working fine, but my app does more complex stuff like threading, and OpenGL initialization; no socket stuff though. Debug works fine under Linux, where the main development is being done. I hope someone could give me a hint about where to look which could be the reason for that select() call to be blocking!

    This is happening in a development machine with the following environment:

    • Windows 7 Service Pack 1. All Firewall and Antivirus disabled.
    • Compiler from Visual Studio 2012 Update 4 RC
    • CDB debugger from "Debugging Tools", included in "Windows SDK for Windows 8".
    • Qt Creator 2.8.1
    • Qt 4.8.x, tried versions: 4.8.4, 4.8.5, 4.8.6 (git)
    1 Reply Last reply
    0
    • j1eloJ Offline
      j1eloJ Offline
      j1elo
      wrote on last edited by
      #2

      -Well, I found out that creating a breakpoint early in the main() does work, and then pressing F5 will make the program run correctly in debug mode.-

      1 Reply Last reply
      0
      • j1eloJ Offline
        j1eloJ Offline
        j1elo
        wrote on last edited by
        #3

        The problem persists and I've followed the step by step run from the very beginning of the program, without noticing anything strange. If I'm not wrong, the socket is created by Qt with the Winsock WSASocket() function, and later a select() is done, blocking forever.

        Does anyone know what might be the reason for that select() to hang?

        1 Reply Last reply
        0

        • Login

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