MushtaqAlqadasi / iphone-dev

Automatically exported from code.google.com/p/iphone-dev
0 stars 0 forks source link

Program received signal EXC_BAD_ACCESS, Could not access memory. #156

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
iPhone 3G, OS 2.1

A Simpler "Hello World" for the iPhone:
http://www.oreillynet.com/mac/blog/2007/08/a_simpler_hello_world_for_the.html

1) I compiled the "Hello World" with iphone-dev tools.
2) Copy SampleApp to Applications/SampleApp.app/ on iPhone 3G.
3) Run it:
mobile$ ./SampleApp
Killed
4) Run it with gdb:
mobile$ gdb SampleApp
GNU gdb 6.3.50.20050815-cvs (Sun Jul 27 11:34:56 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
This GDB was configured as "--host=arm-apple-darwin9 --target="...
warning: --arch option not supported in this gdb.
Reading symbols for shared libraries ....... done

(gdb) run
Starting program: /private/var/mobile/Applications/SampleApp.app/SampleApp

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 10 at address: 0x00001018
0x2fe018f8 in __dyld__ZN13dyldbootstrap5startEPK11mach_headeriPPKcl ()
(gdb)

How do you fix it?

Original issue reported on code.google.com by denisio....@gmail.com on 12 Oct 2008 at 5:00

GoogleCodeExporter commented 8 years ago
Host: Cent OS 5.2

Original comment by denisio....@gmail.com on 12 Oct 2008 at 5:01

GoogleCodeExporter commented 8 years ago
Although I haven't tried gdb, my program is also Killed.
It is such a simple app that does nothing, just int main() { return 0; }

Original comment by Henry.Hu...@gmail.com on 14 Oct 2008 at 3:02

GoogleCodeExporter commented 8 years ago
I have the same problem.

Host: SuSE 10.3
Target: iPod Touch with Firmware 2.1
I verified it with gdb and got exactly the same error message as above.

I tried it both with MacOSX10.4u.sdk and MacOSX10.5.sdk, replacing cdefs.h as
described in issue141 (there paths are not quite correct: I replaced
/usr/local/arm-apple-darwin/include/sys/cdefs.h by
MacOSX10.5.sdk/usr/include/sys/cdefs.h)
Everything compiles and installs without problems, but the compiled program 
does not
run on the iPod.

Any help appreciated (it's soo close...)

Original comment by gunnar.t...@unibw.de on 31 Oct 2008 at 12:48

GoogleCodeExporter commented 8 years ago
Hi! Anybody solve this issue?

Original comment by tooh...@gmail.com on 27 Mar 2009 at 9:19

GoogleCodeExporter commented 8 years ago
It looks like you need to do sign your application in order to run it. Check out
http://www.saurik.com/id/8.

Original comment by manu.st...@gmail.com on 15 May 2009 at 6:56