Thread: mingw program crashes when throwing exception inside secondary thread

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445

    mingw program crashes when throwing exception inside secondary thread

    I have a windows service that I am working on, and it crashes any time I throw any kind of exception from a secondary thread (not the main thread). I googled for at least a half hour looking for the answer to this, but found nothing. I am compiling with the -mthreads command line option, which is supposed to help, but it makes no difference. I have now spent about 3 hours on this problem alone, and I absolutely cannot move on until it is resolved, as the remainder of my program will use exceptions, and must not crash.

    Edit:
    GCC 3.4.5
    windows threading API functions _beginthreadex, etc
    windows XP Pro x64
    Last edited by Elkvis; 08-06-2009 at 02:48 PM. Reason: more information

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple thread object model (my first post)
    By Codeplug in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2004, 11:34 PM
  2. Thread inside a thread ?
    By lsme in forum Linux Programming
    Replies: 3
    Last Post: 12-08-2004, 11:08 PM
  3. Comment this Program
    By kishorepalle in forum C Programming
    Replies: 11
    Last Post: 10-05-2004, 06:41 AM
  4. Problem : Threads WILL NOT DIE!!
    By hanhao in forum C++ Programming
    Replies: 2
    Last Post: 04-16-2004, 01:37 PM
  5. How to make a thread sleep or std::recv timeout?
    By BrianK in forum Linux Programming
    Replies: 3
    Last Post: 02-26-2003, 10:27 PM