10 Oct 2008, 00:33
Generic-user-small

Felipe Laso (104 posts)

Hello.

Im getting the following error:

This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
warning: Unable to read symbols for "/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics" (file not found).
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory).
Program loaded.
sharedlibrary apply-load-rules all

I did everything as the book said, my methods seem to be written correctly, my nib files are properly set up as far as I can tell.

I get the error after I’m done inputing the name for the new team. I hit the Done button and thats what the console shows, After that my application freezes and there is nothing else I can do.

I have checked everything, I have tried using the debugger but I can’t pinpoint where the error is at.

I have uploaded the project folder to my iDisk. Here is the address:
http://public.me.com/felipelaso

Any help I can get would be gladly appreciated. I have been sitting here for over an hour trying to debug this and pinpoint the error but I just can’t do it :(

Many thanks in advance.
Felipe

10 Oct 2008, 10:24
Biopic_100x100_pragsmall

Bill Dudney (917 posts)

Hi Felipe,

I downloaded it and with the exception of a warning that AddTeamViewController does not implement the UITextFieldDelegate it compiles and runs for me.

I’m not sure what Xcode is thinking for you. The location its looking for the frameworks is wrong. It should be something like /Developer/Platforms/iPhoneOS.platform…../UIKit.framework instead of the /System/Library…

It is almost as if the project thinks it is targeting MacOSX instead of iPhoneOS.

Here is something to try;

- Quit Xcode.
- Open the BasketballTeams.xcodeproj folder (either in Finder with control click Show Contents of Package, or cd down into the directory with terminal) and delete the files that begin with your username (i.e Felipe.*)
- delete the build directory
- Open the project again in Xcode and try Build and Run again

Good luck! and let us know if that worked.

10 Oct 2008, 13:39
Generic-user-small

Felipe Laso (104 posts)

Hey Bill.

First of all thanks for your reply. Unfortunately after doing what you suggested the application still gives me those 3 warnings. I also tried running it on my iPod Touch and this is the error I got while running on my device:

warning: UUID mismatch detected with the loaded library - on disk is:
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/lib/liblockdown.dylib
=uuid-mismatch-with-loaded-file,file="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.1.sdk/usr/lib/liblockdown.dylib" 
Program received signal:  “EXC_BAD_ACCESS”.
kill
quit

I checked my framework paths for UIKit, CoreFoundation and CoreGraphics. When I click “Reveal in finder” they are all in my iPhoneOS platform for the 2.1 SDK.

Why is Xcode doing this?
Is there a way to fix the framework paths for this particular project without making a new one?

While I wait for another reply on how to solve this problem, I’m going to try making a new project and pasting the source files there.

We’ll see how it goes though I’m sure there has to be a way to fix this, I can’t imagine working on a large project and then having to paste all of my work into a new project because of something like this.

Thanks :)

10 Oct 2008, 14:50
Generic-user-small

Felipe Laso (104 posts)

Back once more.

I made a new project, I constructed the nib files all over again, I rewrote the entire code for the chapter 3 exercise and when I ran it, I STILL GET THAT ERROR after adding a team and hitting “Done”.

This is very strange though, you said that on your computer it compiled perfectly with a minor warning about the Text Field delegate, for me it doesnt work properly.

Anything you suggest I can do to fix this? perhaps reinstall the iPhone SDK 2.1?

Thanks for your help and patience,
Felipe.

10 Oct 2008, 14:54
Biopic_100x100_pragsmall

Bill Dudney (917 posts)

Hi Felipe,

The path there is a comment (my guess because of the /**/ stuff) what you have to do is find the node 1D30AB110D05D00D00671497 in the file later where the definition is and change the path there.

I’m not sure how the path was messed up for those frameworks but you could try a few other things too

- look through all the settings in the Build tab for both the project and the targets for any obvious issuse
- create a new project and add all the files back (as you suggested earlier)
- delete the framework from your project and re-add it

Good luck!

10 Oct 2008, 16:01
Generic-user-small

Felipe Laso (104 posts)

Hey Bill.

I tried what you suggested but it is still not working.

A quick google and a search through Apple discussions gave me no answers either. Some people made a new project and it worked, others simply removed al their breakpoints.

I have tried adding the frameworks again, checking the build settings, making a new project from scratch, modifying the framework paths in the file inside the Xcode project file.

I even uninstalled and reinstalled Xcode and the iPhone SDK but it’s still not working!

This is just driving me insane…I can’t pinpoint the error.

All i get is the framework warnings but no real error in my code or interface from what I have seen.

Many, many thanks for your patience Bill.
Felipe.

10 Oct 2008, 16:50
Generic-user-small

Felipe Laso (104 posts)

Something is really wrong, and I bet its very simple.

I created yet another project, imported my source files and nib files, compiled and I still get the error.

Hasn’t anybody else got this error in chapter 3 or somewhere else before? I, for some reason, cannot fix it no matter what, yet Bill is able to do so!

:/

10 Oct 2008, 16:59
Biopic_100x100_pragsmall

Bill Dudney (917 posts)

Hi Felipe,

Is it just this code or does every iPhone project you create exhibit the same problem?

i.e create a new ‘flashlight’ app and push it to your device and make sure that runs. If so then it must be something with one of the files in your project.

As another option you might try posting to the xcode list @ apple. The folks there tend to be friendly.

Good Luck!

10 Oct 2008, 19:56
Generic-user-small

Felipe Laso (104 posts)

Bill.

thank you for your immense help and patience with this.

After checking the code over and over again, and trying to pinpoint why i was getting a EXC_BAD_ACCESS error on my device. I found out that on the AddTeamViewController’s dealloc method. I was not releasing my teamTextField and delegate properties, but instead i was calling dealloc on them.

So by the time the rootViewController was trying to access them with its instance of addTeamViewController, they had already been deallocated and that was the problem.

Again, thank you very very much for your help. I hope i wasnt bothering a lot.

Cheers :D
Felipe.

10 Oct 2008, 20:43
Biopic_100x100_pragsmall

Bill Dudney (917 posts)

Hey Felipe,

Not at all, so glad you got it figured out, now to build that next killer iPhone app :)

11 Oct 2008, 16:09
Generic-user-small

Robin Martin (1 post)

Bill & Felipe,

I just wanted you both to know that I was having the exact same problem. I went through the entire chapter two times and tried all kinds of things but could not figure out the problem. Reading through your discussion allowed me to find the solution. Thank you for that. I don’t know why I was “dealloc”ing instead of “release”ing. I read through the chapter again and it is very clear in the text that we are supposed to “release” in the “dealloc” method.

Just wanted you to know.

Thank you!

Robin

12 Oct 2008, 05:15
Generic-user-small

Felipe Laso (104 posts)

Thats great to hear Robin!

Although it was frustrating me like crazy and I was seriously losing all hopes of fixing it, it was finally fixable.

And as is usual in programming, its about a simple and “obvious” change. Luckily you were able to get it to work as well :)

04 Dec 2008, 01:10
Generic-user-small

James Brooks (1 post)

Heads up from me as well, this was the exact problem I was having as well. I was calling dealloc instead of release, doh!. Thanks for the thread, great book so far! :)

10 Dec 2008, 06:20
Generic-user-small

Adrian Schönig (1 post)

+1. Just ran into the exact same error calling ‘dealloc’ instead of ‘release’. As a few of us run into this, it might be worthwhile adding a little note there in the book. Maybe a “Joe asks: What is the difference between release and dealloc?”.

Keep it up :)

20 Feb 2009, 06:15
Pic_pragsmall

Chris Olsen (6 posts)

I am running into the same issue. Unfortunately, I don’t have an mixups with delloc and release. I have triple checked my code to the code in the book and am unable to find any differences. Even after copying and pasting the supplied book code I get the same error.

20 Feb 2009, 12:50
Biopic_100x100_pragsmall

Bill Dudney (917 posts)

Hi Chris,

The other thing that could be going wrong to get EXEC_BAD_ACCESS is over releasing (autorelease and release, stuff like that).

Try turning on NSZombieEnabled (choose your executable, control click, choose get info, go to the arguments tab, add a variable NSZombieEnabled and set its value to YES) and rerunning. That should at tell you what the class of the object that is over released is.

Good Luck and please let us know when you get it working.

21 Feb 2009, 05:55
Pic_pragsmall

Chris Olsen (6 posts)

Hey Bill,

It turned out that I had an additional (non-existent) outlet attached to the button.

Thanks for the help.

  You must be logged in to comment