debugger not loading images

Discussion in 'iOS Programming' started by Programmer, Jul 8, 2009.

  1. Programmer macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #1
    I'm making an application in which I'm doing frame by frame animation(I KNOW THAT THERE ARE EAYER WAYS BUT I WANT A CHALLENGE).

    When I run the debugger on my iPhone the debugger doesn't load my images it says this
    HTML:
    warning: Unable to read symbols for ""/Users/**************/Documents/Bob Pics/Bob/build/Debug-iphoneos"/Bob.app/Bob" (file not found).
    warning: Unable to read symbols from "Bob" (not yet mapped into memory).
    Yes my apps name is bob.

    Someone please help!
     
  2. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #2
    Shouldn't it be Bob.jpg or Bob.png at the end or something?
     
  3. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #3
    yes

    yes the images are .png but those strings you re seeing are the locations of the pictures on my mac.
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    So, your image files have no extensions? Even if so, have you copied these images into your project (usually copied to the Resources folder in Xcode)?
     
  5. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #5
    Yes!

    I HAVE DONE EVERYTHING RIGHT.
    It works in the simulator but it doesn't load the images when i put the app on my iPhone.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    You need to copy the images to your Resources folder and not just link them. That is, make sure you have checked the "Copy items into destination group's folder" choice as you import the images to your project. Otherwise, you'll get that error from your first post.
     
  7. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #7
    I'm confused. The debugger doesn't display images. The path you show is for the app Bob, not any pictures.

    Just for fun, try removing the space in the path.
     
  8. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    Ah, I see. Yeah! Don't name your image files the same as your app.
     
  9. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #9
    i didn't

    i didn't name the pictures the same as my app.
     
  10. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #10
    it didn't work

    this is a reply to the #6 comment.

    it did't work
     
  11. eddietr macrumors 6502a

    Joined:
    Oct 29, 2006
    Location:
    Virginia
    #11
    So, first of all, the warnings you posted are about gdb not being able to load debugging symbols. That has nothing to do with your app loading images. Two totally different things.

    So as far as the images are concerned, one common thing I see with our team is forgetting that the iPhone filesystem is case sensitive. So I would check the case of the filenames of the images carefully in your project and in your code that loads them.
     
  12. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #12
    What is the name of your image file(s) then?
     
  13. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #13
    image files

    my image files are
    picture 1
    picture 2
    picture 3
    ...
    and so on.
     
  14. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #14
    OK, I guess we've deduced that the problem is that the app doesn't succeed in loading images on the device.

    If you look in the app bundle in the build folder are the images there?

    Can you show the code that you use to load an image?

    I recommend that you don't have spaces in file names and file paths. While this is the 21st century and all this seems to gum up the works every so often. Some of the tools we use are older than most of the posters on this forum and spaces can make them hiccup. Use camel case or underscores or dots to make the file names more readable.
     
  15. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #15
    will do

    i'll do that but theres 101 pictures do you know if there is a faster way then doing it 1 by 1.
     
  16. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #16
    Are we sure about that? Cuz as eddietr said:

     
  17. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #17
    Do you mean change the names? Maybe there's a faster way in the terminal.

    What about the other two questions I asked?

    Can you confirm that this is correct:

     
  18. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #18
    true

    that is true, well I'm not sure either way when i start my app on my computer it works when i do it on my iPhone it doesn't work
     
  19. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
  20. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #20
    OK, the images don't load on the device.

    There are a couple usual reasons that images don't load.

    The images aren't there.

    There's something defective in the image loading code.

     
  21. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #21
    heres the code

    .H
    #import "FlipsideViewController.h"

    @interface MainViewController : UIViewController <FlipsideViewControllerDelegate>
    {

    IBOutlet UIImageView *StartAnime;

    UIAccelerationValue yValue;

    }
    @property(nonatomic,readonly) UIAccelerationValue y;
    @property (readwrite) CFURLRef soundFileURLRef;
    @property (readonly) SystemSoundID soundFileObject;

    - (IBAction)startClick:(id)sender;
    - (IBAction)fallclick:(id)sender;
    - (IBAction)showInfo;

    @end


    .M

    - (IBAction)startClick:(id)sender
    {
    StartAnime.animationImages = [NSArray arrayWithObjects:
    [UIImage imageNamed:mad:"pic1.png"],
    [UIImage imageNamed:mad:"pic2.png"],
    [UIImage imageNamed:mad:"pic3.png"],
    [UIImage imageNamed:mad:"picture 4.png"],
    [UIImage imageNamed:mad:"picture 5.png"],
    [UIImage imageNamed:mad:"picture 6.png"],
    [UIImage imageNamed:mad:"picture 7.png"],
    [UIImage imageNamed:mad:"picture 8.png"],
    [UIImage imageNamed:mad:"picture 9.png"],
    [UIImage imageNamed:mad:"picture 10.png"],
    [UIImage imageNamed:mad:"picture 11.png"],
    [UIImage imageNamed:mad:"picture 12.png"],
    [UIImage imageNamed:mad:"picture 13.png"],
    [UIImage imageNamed:mad:"picture 14.png"],
    [UIImage imageNamed:mad:"picture 15.png"],
    [UIImage imageNamed:mad:"picture 16.png"],
    [UIImage imageNamed:mad:"picture 17.png"],
    [UIImage imageNamed:mad:"picture 18.png"],
    [UIImage imageNamed:mad:"picture 19.png"],
    [UIImage imageNamed:mad:"picture 20.png"],
    [UIImage imageNamed:mad:"picture 21.png"],
    [UIImage imageNamed:mad:"picture 22.png"],
    [UIImage imageNamed:mad:"picture 23.png"],
    [UIImage imageNamed:mad:"picture 24.png"],
    [UIImage imageNamed:mad:"picture 25.png"],
    [UIImage imageNamed:mad:"picture 26.png"],
    [UIImage imageNamed:mad:"picture 27.png"],
    [UIImage imageNamed:mad:"picture 28.png"],
    [UIImage imageNamed:mad:"picture 29.png"],
    [UIImage imageNamed:mad:"picture 30.png"],
    [UIImage imageNamed:mad:"picture 31.png"],
    [UIImage imageNamed:mad:"picture 32.png"],
    [UIImage imageNamed:mad:"picture 33.png"],
    [UIImage imageNamed:mad:"picture 34.png"],
    [UIImage imageNamed:mad:"picture 35.png"],
    [UIImage imageNamed:mad:"picture 36.png"],
    [UIImage imageNamed:mad:"picture 37.png"],
    [UIImage imageNamed:mad:"picture 38.png"],
    [UIImage imageNamed:mad:"picture 39.png"],
    [UIImage imageNamed:mad:"picture 40.png"],
    [UIImage imageNamed:mad:"picture 41.png"],
    [UIImage imageNamed:mad:"picture 42.png"],
    [UIImage imageNamed:mad:"picture 43.png"],
    [UIImage imageNamed:mad:"picture 44.png"],
    [UIImage imageNamed:mad:"picture 45.png"],
    [UIImage imageNamed:mad:"picture 46.png"],
    [UIImage imageNamed:mad:"picture 47.png"],
    [UIImage imageNamed:mad:"picture 48.png"],
    [UIImage imageNamed:mad:"picture 49.png"],
    [UIImage imageNamed:mad:"picture 50.png"],
    [UIImage imageNamed:mad:"picture 51.png"],
    [UIImage imageNamed:mad:"picture 52.png"],
    [UIImage imageNamed:mad:"picture 53.png"],
    [UIImage imageNamed:mad:"picture 54.png"],

    [UIImage imageNamed:mad:"picture 101.png"], nil];



    [StartAnime setAnimationRepeatCount:1];
    StartAnime.animationDuration = 25;
    [StartAnime startAnimating];

    }
     
  22. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #22
    Are you still getting the error from the first post when you run on a device?

    I still suspect the images haven't been copied to the project. Can you right-click on the pic1.png, Get Info, General tab, and report back to us what the Full Path says?
     
  23. Programmer thread starter macrumors member

    Programmer

    Joined:
    Jun 16, 2009
    #23
    It says this

    Full path /Users/harryslotwiner1/Documents/Bob Pics/Bob/Picture1.png
     
  24. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #24
    Hmm, looks fine. Alright, I have no idea then. I give up.
     
  25. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #25
    What happens if you cut down that list of images to the first two or three?

    This might be a memory problem.

    Also, I don't see the correspondence between

    /Users/harryslotwiner1/Documents/Bob Pics/Bob/Picture1.png

    and

    pic1.png

    These names are not the same. Also the case is not the same.
     

Share This Page