Results 1 to 4 of 4

Thread: QThread - Still having issues

  1. #1
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QThread - Still having issues

    Ok,

    I have been trying several different approaches to threading my app. I have posted questions about creating and maintaining several threads, have gotten suggestions, implemented them and still...no go..

    The threading model I use works for a while, then bombs out at various points.

    What I have so far:

    GUI -> create threadMGR.

    threaMGR -> create 4 processTHD's.

    threadMGR -> divide one list of 4000+ items into 4 lists

    threadMGR -> start processTHD's

    processTHD -> wait for threadMGR to pass in a filename and set start flag, then process file

    each processTHD emits a 'finished' signal. this finished signal is connected to a 'restart processTHD with new filename' slot in the threadMGR.

    each processTHD also emits update signals while processing. each update signal is connected to a unique slot in the threadMGR. each of these update slots in the threadMGR emits an update signal that is connected to an unique slot in the GUI thread, for updating counters.

    No, I cannot post the code here, but will try to make a super-simple version to post later...

    If anyone has any additional pointers, please let me know.

    --Sam

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: QThread - Still having issues

    Define "bombs out"!
    Does your computer explode when you run your program?

  3. #3
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QThread - Still having issues

    Very much so!

    By "bombs out", I mean that I get segmentation faults. Usually at different points. Sometimes in reading an thread-local index, sometimes I get memory errors related to thread-local QStrings...

  4. #4
    Join Date
    Dec 2009
    Posts
    26
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QThread - Still having issues

    One additional item...

    Most of the time, when the app crashes...in the debugger, the app stops in qatomic_i386.h: QBasicAtomicInt::ref()...

    Any ideas?

Similar Threads

  1. 4.6.0 issues on OS X 10.6 with GL
    By treaves in forum Qt Programming
    Replies: 2
    Last Post: 2nd December 2009, 17:12
  2. QThread issues. Crash after 2058 runs.
    By zverj in forum Qt Programming
    Replies: 4
    Last Post: 15th October 2009, 10:13
  3. QTableView Issues with Qt 4.5.3
    By tntcoda in forum Qt Programming
    Replies: 0
    Last Post: 5th October 2009, 20:58
  4. Replies: 4
    Last Post: 26th June 2008, 18:41
  5. Spawn a QThread in another QThread
    By david.corinex in forum Qt Programming
    Replies: 2
    Last Post: 19th December 2007, 12:54

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.