This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (g++) program crashes when I throw an exception in a separate thread


I'm using g++ (GCC) version 3.4.4 from the cygwin installer, and I've run in to
this very confusing problem. I'm compiling with the -mno-cygwin option
[...]
The problem I have is that when I launch a separate thread, and then throw an
exception in that separate thread, my program will crash... even if I catch
that exception.

Are you compiling with '-mthreads'?



I was not, in fact. Of course the first results in Google for "MinGW '-mthreads'" is: "always use -mthreads when using threads under MinGW. I just spent hours using gdb instead of -mthreads." I will give that a try and report back to the list for the benefit of posterity.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]