Results 1 to 3 of 3

Thread: Writing to a file from within a QThread is causing the app to deplete system memory

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2014
    Posts
    34
    Thanks
    14
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11

    Default Writing to a file from within a QThread is causing the app to deplete system memory

    I have a threaded application that reads data from a UDP socket in one thread, and then passes that data to two other threads: one for processing one for writing out to a file. (Note: The processing thread does nothing at the moment). All the writing thread does is write the data out to an open file.

    When I run the app, it constantly consumes memory and then swap space, until there is none left. The OS then terminates the application.

    I don't understand this behavior, can anyone shed any light on this? I've attached the entire source code in a tar file.


    PS: I also welcome any comment/critique on my use of QThreads.
    Attached Files Attached Files

Similar Threads

  1. Qt Plugins causing memory problems?
    By gavinmagnus in forum Qt Programming
    Replies: 5
    Last Post: 2nd August 2017, 20:47
  2. Open an in-memory file with the default system application
    By berzasnon in forum Qt Programming
    Replies: 8
    Last Post: 7th October 2012, 17:03
  3. When I use Listview with icons its causing memory leak
    By GuusDavidson in forum Qt Programming
    Replies: 4
    Last Post: 29th March 2011, 22:08
  4. vector causing system error/crash
    By babygal in forum Newbie
    Replies: 9
    Last Post: 21st October 2010, 07:48
  5. QThread::wait() causing crash
    By Olliebrown in forum Qt Programming
    Replies: 3
    Last Post: 24th September 2010, 15:24

Tags for this Thread

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.