Results 1 to 5 of 5

Thread: QDialog::exec() Segmentation fault

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDialog::exec() Segmentation fault

    Show us your actual code. Make sure you call exec on the same variable as the one you initialize in line #4 of what you posted. Note that I mean the same variable, not variable with the same name.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    May 2013
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QDialog::exec() Segmentation fault

    Hi wysota,
    I was in the process of sorting through code to honor your request as best I could. I'm not at liberty to show it all unfortunately. Doing so helped me find the problem! I'm back to say thank you, and to share what I found in case someone else Googles their way here.

    There's a warning in the Qt docs to never delete an object in a thread other than the one that created it. Oops. This code juggles a few threads, and sure enough I was guilty of this. I changed "delete obj" to "obj->deleteLater()", and the crashes went away.

    Thanks again!

  3. The following user says thank you to csavarese for this useful post:


Similar Threads

  1. QDialog::exec() problem
    By zgulser in forum Newbie
    Replies: 1
    Last Post: 27th March 2012, 18:18
  2. QTcpsocket and QDialog::exec()
    By timewolf in forum Qt Programming
    Replies: 2
    Last Post: 25th August 2011, 08:27
  3. Replies: 9
    Last Post: 25th March 2011, 21:22
  4. QDialog.exec() exiting without calling QDialog::accept()
    By doggrant in forum Qt Programming
    Replies: 3
    Last Post: 2nd February 2011, 11:35
  5. QDialog problem with exec()
    By nomadscarecrow in forum Qt Programming
    Replies: 3
    Last Post: 23rd April 2010, 18:40

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.