Results 1 to 17 of 17

Thread: Application stops working unexpectedly

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2010
    Posts
    137
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    9

    Default Re: Application stops working unexpectedly

    From my code I get the error next after the destructor statement
    delete ui;
    . When I press F10 from the statement, I get the segmentation fault message.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: Application stops working unexpectedly

    you probably forgot to do ui = new <YourUIWidget>;
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Application stops working unexpectedly

    Post the whole backtrace.
    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.


  4. #4
    Join Date
    Jun 2010
    Posts
    137
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    9

    Default Re: Application stops working unexpectedly

    Here I am attaching the image showing the debugger output. I can't see the option to copy the output. And I see the message
    Lowest section in C:\Windows\system32\normaliz.dll is .text at 00401000
    in the console after stopping the debugger.
    Attached Images Attached Images

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Application stops working unexpectedly

    So the crash happens when you are closing the application? Does the program work correctly until then?
    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.


  6. #6
    Join Date
    Jun 2010
    Posts
    137
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    9

    Default Re: Application stops working unexpectedly

    yes exactly. the crash happens only when closing the app. Until then every thing works fine. Before It was running fine but when I added the above function my app started crashing. So I then removed the function but still the crash happens when closing the application.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Application stops working unexpectedly

    My guess is that you have a double delete somewhere. You are deleting some object explicitly and then MainWindow destructor deletes it again.
    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.


Similar Threads

  1. Replies: 1
    Last Post: 7th November 2012, 22:28
  2. Program has unexpectedly finished
    By Maluko_Da_Tola in forum Newbie
    Replies: 5
    Last Post: 1st December 2010, 09:54
  3. Thread stops after a while in release mode
    By huba in forum Qt Programming
    Replies: 4
    Last Post: 21st July 2010, 04:29
  4. Replies: 2
    Last Post: 14th July 2009, 14:25
  5. tab stops ?
    By ixM in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2009, 13:11

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.