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


Quoting Joshua John Bialkowski

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.



That was the problem. Both the toy code and my original now work as I expected them to. Thank you for your help. :$.




-- 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]