Hello, I'm using a GraphicsMagick library in my project. However, there I found a very interesting behavior. If I create an instance of Magick::Image in a normal method, it works OK. However, if it is implemented in a thread function, it crashes when it calls omp_get_max_threads().
I tried these : 1. Declare a pointer to Magick::Image in a class definition and created it dynamically using "new" when I needed it in a thread method. => When it is being created, it reaches where omp_get_max_threads() is called, and it crashes saying "EXC_BAD_ACCESS". 2. Declare an instance of Magick::Image in a thread function/method => Same crash 3. Declare the instance of Magick::Image as a global variable and try to use it in a thread function. => It crashes when reading a file like image.read( file_name ). Where it crashes is the same to the case 1. So, I thought it could be due to stack size. So, I increased the stack size for the thread, but it did'nt solve the problem. is there a problem in calling OpenMP functions in a thread function? Thank you. JongAm Park_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com