forum

Home / DeveloperSection / Forums / Why is my iPhone app crashing?

Why is my iPhone app crashing?

Anonymous User 1669 09-Sep-2015

When I try to allocate a Texture2D the app just crashes. I've stepped through the code where the crash occurs... all I can tell is "EXC BAD ACCESS". Here is the line in the app delegate that makes it crash:

_textures[myTex] = [[Texture2D alloc] initWithImage:
                     [UIImage imageNamed:@"myColor.png"]];

myColor.png has been added to the resources folder via "add existing files". I was able to load this png just fine in some sample code... but now when I'm trying to duplicate the functionality of the sample code it just crashes. Any ideas?
Also I can do the following just fine:

_textField = [[UITextField alloc] initWithFrame:
               CGRectMake(50, 224, 210, 40)];

Updated on 10-Sep-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By