Results 1 to 2 of 2

Thread: crash tool static build qt

  1. #1
    davinciomar Guest

    Default crash tool static build qt

    Hi, when i try to build dinamically build run fine. But when i tried static i got this message:

    Starting C:\Qt\Qt5.2.0\Tools\QtCreator\bin\build-qdnslookup-Unnamed-Debug\debug\qdnslookup.exe...
    The program has unexpectedly finished.
    C:\Qt\Qt5.2.0\Tools\QtCreator\bin\build-qdnslookup-Unnamed-Debug\debug\qdnslookup.exe crashed

    So someone has some suggestion, the example :
    void MainWindow::lookupServers()
    {
    // Create a DNS lookup.
    QDnsLookup *dns = new QDnsLookup(this);
    connect(dns, SIGNAL(finished()),
    this, SLOT(handleServers()));

    // Find the XMPP servers for gmail.com
    dns->setType(QDnsLookup::SRV);
    dns->setName("_xmpp-client._tcp.gmail.com");
    dns->lookup();
    }

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: crash tool static build qt

    Do you also have a member variable in the MainWindow class named "dns"? If you do, then the "dns" variable you declare and use in this method hides your member variable. If the member variable is never initialized anywhere, then if you try to use it elsewhere in your program, it will cause a crash.

    What does your debugger tell you about the crash? Does it occur in the code you have posted, or somewhere else?

    By the way, posting a quote is better than posting a screenshot, but it would be better if you used CODE tags. See my signature for how to do that.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Writing Static Analysis Tool
    By user_mail07 in forum Qt Programming
    Replies: 0
    Last Post: 21st December 2011, 00:38
  2. Static connection analysis tool?
    By d_stranz in forum Qt Programming
    Replies: 3
    Last Post: 25th September 2011, 09:10
  3. Static code analysis tool for application developed using Qt
    By newtolinux in forum Qt Programming
    Replies: 4
    Last Post: 30th March 2011, 00:14
  4. Replies: 1
    Last Post: 14th January 2010, 00:35
  5. Moving from QT 4.5 shared build to QT 4.5.2 static build
    By extrakun in forum Qt Programming
    Replies: 0
    Last Post: 26th October 2009, 10:49

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.