Results 1 to 10 of 10

Thread: QLocalSocket issue/difference between *nix & win32

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2011
    Location
    Canada
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: QLocalSocket issue/difference between *nix & win32

    i might suppose this is why: http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

    before you declare your local socket, could you try calling "QHostInfo testHost = QHostInfo::fromName("google.com");" and see if it still crashes?

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanked 342 Times in 324 Posts

    Default Re: QLocalSocket issue/difference between *nix & win32

    before you declare your local socket, could you try calling "QHostInfo testHost = QHostInfo::fromName("google.com");" and see if it still crashes?
    Qt Code:
    1. #include <QLocalSocket>
    2. #include <QHostInfo>
    3.  
    4. int main(int argc, char *argv[]){
    5. QHostInfo testHost = QHostInfo::fromName("google.com");
    6. QLocalSocket s;
    7. return 0;
    8. }
    To copy to clipboard, switch view to plain text mode 
    In debug the same assertion fails, crash in release:
    Program received signal SIGSEGV, Segmentation fault.
    0x6a30dea6 in ZNK7QObject6d_funcEv () from C:\Qt\bin\QtCore4.dll
    (gdb) bt
    #0 0x6a30dea6 in ZNK7QObject6d_funcEv () from C:\Qt\bin\QtCore4.dll
    #1 0x6a2a52bd in ZNK7QObject6threadEv () from C:\Qt\bin\QtCore4.dll
    #2 0x6a2b50b4 in ZN21QEventDispatcherWin3221registerEventNotifierEP 17QWinEventN
    otifier () from C:\Qt\bin\QtCore4.dll
    #3 0x6a2b8d47 in ZN17QWinEventNotifierC2EPvP7QObject ()
    from C:\Qt\bin\QtCore4.dll
    #4 0x6ff76738 in ZN12QLocalServer21nextPendingConnectionEv ()
    from C:\Qt\bin\QtNetwork4.dll
    #5 0x6ff7366f in ZN12QLocalSocketC2EP7QObject ()
    from C:\Qt\bin\QtNetwork4.dll
    #6 0x00401415 in ?? ()
    #7 0x00401f9d in ?? ()
    #8 0x00401c56 in ?? ()
    #9 0x004010db in ?? ()
    #10 0x00401158 in ?? ()
    #11 0x77621174 in KERNEL32!AcquireSRWLockExclusive ()
    from C:\Windows\system32\kernel32.dll
    #12 0x77b3b3f5 in ntdll!RtlInsertElementGenericTableAvl ()
    from C:\Windows\system32\ntdll.dll
    #13 0x77b3b3c8 in ntdll!RtlInsertElementGenericTableAvl ()
    from C:\Windows\system32\ntdll.dll
    #14 0x00000000 in ?? ()
    But this time a warning message appears before crash and failed assertion:
    warning: QObject::connect: Cannot connect (null)::destroyed() to QHostInfoLookupManager::waitForThreadPoolDone()

  3. #3
    Join Date
    Aug 2011
    Location
    Canada
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: QLocalSocket issue/difference between *nix & win32

    i see, and the backtrace doesn't even reference anything resembling winsock, it seems to stay within qtcore/qtnetwork. it certainly seems like a bug.

  4. #4
    Join Date
    Jan 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QLocalSocket issue/difference between *nix & win32

    Hello all,

    I'm building a static lib that uses QLocalSocket and when I link with a basic MSVC++ 9.0 win32 app, i'm facing the exact same issue as you (crash (in release) or Assert (in debug) telling me "Cannot Create a Win event notifier without a QEventDispatcherWin32".

    Did you find any fix or workaround ?

    Thanks for your help

    Marc

Similar Threads

  1. Transparent QLocalSocket and QTcpSocket use
    By chiiph in forum Qt Programming
    Replies: 0
    Last Post: 12th November 2010, 16:35
  2. QLocalServer / QLocalSocket major memory leaks?
    By torrentss in forum Qt Programming
    Replies: 0
    Last Post: 28th July 2010, 22:16
  3. QLocalSocket Synchronicity
    By matic in forum Qt Programming
    Replies: 0
    Last Post: 25th March 2010, 12:04
  4. Using QLocalServer and QLocalSocket
    By danc81 in forum Qt Programming
    Replies: 0
    Last Post: 10th November 2009, 12:09
  5. IPC with QLocalServer/QLocalSocket
    By ManuMies in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2009, 20:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.