Crash in pthread_mutex_lock
Crash in pthread_mutex_lock
- Subject: Crash in pthread_mutex_lock
- From: Jeremy Sagan <email@hidden>
- Date: Sun, 12 Jun 2005 01:35:19 -0400
Hello!
I have just converted my (rather large) app from CW 8.3 to use XCode.
The areas causing me to tear my hair out have been:
• XCode converted my targets to command-line targets even though they
were Mach-O Application Bundles.
• Somehow I am calling certain codewarrior run-time library functions
without knowing it. (eg. div2i) I worked around this problem by
creating a library in codewarrior and then linking to it in XCode.
• Inline ASM only works if you set the compiler flags on each
individual source file. I did not see this well documented.
• The cross initialization problem is very annoying.
• A construct like:
offsetof(AudioView, Points[theLineCount + 1])
causes a compiler error. I thought that was what the compiler was for.
To calculate expressions. Assuming that Points is an array of structure
"PointsStructure" I can convert this to:
offsetof(AudioView, Points[0]) + sizeof(PointsStructure) *
(theLineCount + 1)
but why? It is so much messier and if I change the definition of Points
the code will no longer work.
• Because XCode's invocation of REZ is setting the useDF flag, REZ
won't include my resource fork resources from my .r file. If anyone
knows a solution to this I would love to hear it. Currently I just took
the codewarrior resource output and I have Xcode resmerge that as the
resource file.
Now my major problem is that every call to pthread_mutex_lock crashes
with a EXC_Bad_ACCESS. I have tried changing the compiler from 4.0 to
3.3 with no difference. The same call works fine when compiled under
codewarrior.
If I remove the call to pthread_mutex_lock my app works great except I
need that call to avoid other thread reentry problems.
Please Help!
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden