SOLVED: CopyPascalStringToC generating EXC_BAD_ACCESS in new XCode project
SOLVED: CopyPascalStringToC generating EXC_BAD_ACCESS in new XCode project
- Subject: SOLVED: CopyPascalStringToC generating EXC_BAD_ACCESS in new XCode project
- From: Dieter Oberkofler <email@hidden>
- Date: Thu, 9 Mar 2006 13:22:13 +0100
Jerry,
You are absolutely right!
It seems as if projects created with XCode 2.2 would automatically
generate a Info.list that has the CSResourcesFileMapped key set to true.
In my case this caused my 3rd party library to fail because they are
converting the Pascal string within the resource to C strings at the
same memory location.
Thank you very much and I hope this might same someone else's night...!
Dieter
On Mar 9, 2006, at 9:39 AM, Jerry wrote:
Yes, your resources may be mapped into memory: Check to see if you
have a CSResourcesFileMapped key in your Info.list, and check out
http://developer.apple.com/documentation/Performance/Conceptual/
FileSystem/Articles/MappingFiles.html
for an explanation.
Jerry
On 9 Mar 2006, at 07:30, Dieter Oberkofler wrote:
Hi Chris,
Thank you for the hint. Unfortunately this did not help.
I have found out, that the error only happens when using strings
that are read from a resource file. Did anything change with
resources build from a .r file.
-Dieter
On Mar 9, 2006, at 2:04 AM, Chris Espinosa wrote:
On Mar 8, 2006, at 3:54 PM, Dieter Oberkofler wrote:
Hi,
Im stuck. I've created a new XCode project instead of converting
an existing 2.1 one and now when my 3rd party library calls
CopyPascalStringToC a EXC_BAD_ACCESS is reported.
I have checked all of the compiler and links arguments but
everything is the same. In the debugger, it seems as if the
library would convert the string into itself (source and
destination are the same) but according to the documentation,
this should be allowed.
Thank you in advance,
-Dieter
Not if the string is a constant and is stored in a non-writeable
section of the dylib.
In your target, set GCC_REUSE_STRINGS = NO (that is, uncheck the
"Make Strings Read-Only" checkbox in your Code Generation settings).
Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40huxtable.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40qualiant.at
This email sent to email@hidden
_______________________________________________
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