Results 1 to 4 of 4

Thread: Debugger exits in QtCreator

  1. #1
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Thanks
    101
    Thanked 15 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Debugger exits in QtCreator

    Hi!

    I am a big fan of the inbuilt debugger into the QtCreator IDE and I use it frequently to get to the bottom of "embarrassments". However, have now come across an issue that keeps me puzzled. While receiving a stream of data frames over the network and visualizing things on the screen, my application suddenly closes as if someone had hit the close button. There is no segfault, there is no error of any kind, it just closes. So I started running it in debug mode to see if the debugger would point me to a line, but whenever the mysterious closing occurs, the debugger reports "Debugging has finished" as if things have been closed in orderly fashion. I tried placing break points into the destructors of a a few relevant objects, most notably the main window, but it seems as though the debugger never comes across them and I don't get a stack trace. I have nothing left to throw at it other than asking for help. Any ideas?

    Thanks
    Cruz

  2. #2
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Thanks
    101
    Thanked 15 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Debugger exits in QtCreator

    For the record, I found that the problem was an issue of extensive memory consumption. The program wasn't even leaking, but "legitimately" claiming more and more memory over time until it hit the physical limit where it apparently got silently killed by the OS.

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

    d_stranz (27th May 2023)

  4. #3
    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: Debugger exits in QtCreator

    it apparently got silently killed by the OS.
    That seems odd. You should have received a segfault or something if you tried to use memory the program had requested but the OS was unable to provide. And even if you ran out of physical memory, you would have had to have filled up the page file too, right?
    <=== 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.

  5. #4
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    387
    Thanks
    101
    Thanked 15 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Debugger exits in QtCreator

    Yes, indeed! It does seem odd. I have run into this issue before and yes, then it starts paging and the paging can't keep up with the rate the memory is being claimed so you end up in a system freeze. But this time it was different. I was watching htop and saw the memory fill up to the brim just when the debugger quit with the "Debugging finished" message. I didn't get to the exact bottom of it, but I thought the issue must be memory related and started investigating in this direction. I found a badly implemented ring buffer using pop_back() and push_front() to remove one item whenever a new one is added, which caused the buffer to grow infinitely nonetheless (capacity doubling every once in a while until armageddon). I fixed this buffer and now things are running smoothly and the software no longer quits (crashes), so this must have been it, but I am still short of an undisputable explanation.

Similar Threads

  1. Replies: 1
    Last Post: 19th January 2013, 06:08
  2. Debugger: None of the debugger engines [...] capable of debugging binaries
    By schludy in forum Installation and Deployment
    Replies: 1
    Last Post: 21st February 2012, 19:32
  3. Qt Creator QTCreator 2.3.0 debugger detects wrong ABI
    By chal61 in forum Qt Tools
    Replies: 1
    Last Post: 11th November 2011, 00:55
  4. QwtDial not exits
    By hiuao in forum Qwt
    Replies: 1
    Last Post: 23rd August 2007, 10:22
  5. program exits
    By ldsjohn in forum Qt Programming
    Replies: 2
    Last Post: 20th September 2006, 20:03

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.