Cannot access memory at address 0x4
http://www.cocoabuilder.com/archive/message/xcode/2008/8/11/24038
Hey,
On one of my projects any time I try to start the program with a debug point
set, GDB crashes before anything happens. It prints out:
run
[Switching to process 2279 local thread 0x2d03]
Running�
2008-09-04 16:32:28.470 MyApp[2279:813] 1.00000
[Switching to process 2279 thread 0x5603]
[Switching to process 2279 thread 0x5603]
Program received signal: "EXC_BAD_ACCESS".
Cannot access memory at address 0x4
Cannot access memory at address 0x4
I then did a backtrace and get:
*(gdb) **backtrace*
#0 0xdeadbeef in ?? ()
Cannot access memory at address 0x4
What is extremely frustrating is that this has started to happen in all of
my applications, even a brand new vanilla project. This project is the only
one that it happens all of the time for though, usually building and
rebuilding will a successful launch.
After some Googling, it seems others have run into this problem but no one
posted a fix. One person suggested it had to do with his installation of
both Xcode2.5 and Xcode3.1, which I had both installed. I uninstalled both
and then reinstalled Xcode3.1, but the problem persists.
It looks like someone had a similar problem with a Java app that got
resolved (
http://www.mailinglistarchive.com/<email_removed>/msg06697.html),
but mine isn't Java.
Please help me! I can't continue to work until this is resolved and I have
already spent a few days trying to figure it out.
Thank You,
Bridger Maxwell
I just fixed the problem. I removed the 'Library -> PreferencePane' folder and everything works fine.
Thanks for your help.
Re: GDB Problems
FROM : Jason Coco
DATE : Fri Sep 12 06:15:34 2008
On Sep 12, 2008, at 00:10 , Bridger Maxwell wrote:
> Woops. I tried to reply to this thread a while ago, but I wasn't
> watching
> what I was doing and accidentally replied specifically to Ken. Sorry
> Ken! I
> am still having this issue though.
>
>
>> I suspect you've recently installed a haxie, input manager, third-
>> party
>>> kernel extension or other piece of software which modifies the
>>> behavior of
>>> nearly all applications on your system. It seems to be
>>> interfering with
>>> gdb. If you can figure out what it is, disable or uninstall it
>>> and reboot.
>>
>>
> I don't think I have any unusual kernel extensions installed. This
> is a work
> computer and my installation is typical of almost everyone else at
> work.
What is the output of "kextstat -k" ?
以上解决方法并不是通用的,出现这个错误很有可能是程序代码本身有问题
但是也有其它情况:
我碰到过,因为同时打开两个相同名字的xcode的工程,就出这个错误的情况,关其中一个就没事了