0

I am a complete noob to iOS development on mac, been using unity to develop for android, windows and web, however I have been struggling to get through a few errors on Xcode.

After successfully building my unity project in Xcode I encounter the following error as soon as the game starts to run on the iOS simulator. The error appears in GetBuffer[inlined], and is highlighted as EXC_Bad_Access. Does anyone have any idea why I get this error and how I can solve it?

Screenshot:

screenshot

Link to screenshot (for full size)

luk2302
  • 55,258
  • 23
  • 97
  • 137
ReeRoo
  • 1
  • 1
  • Please set an Exception-Breakpoint to see where the App is crashing. http://stackoverflow.com/questions/17802662/exception-breakpoint-in-xcode – Matz Apr 05 '15 at 12:48
  • It seems like it is directly crashing, when Unity tries to set up everything. Maybe you're using something, that's not working on iOS?! Is your project working on other platforms? Do you manage to load an empty scene in Xcode/iOS? – d4Rk Apr 05 '15 at 18:33
  • hey d4rk thanks for the reply, the game is running problem free on both html5 and android platforms. I am getting no errors in the xcode project, when i run the game in xcode however i breifly hear the backgroung music in the first scene followed by a crash. I will try with an empty scene to see if the problem presists thanks. – ReeRoo Apr 05 '15 at 20:17
  • hey@ d4rk thanks for the suggestion it seems like the main menu scene is causing the game to crash, sometimes the other levels crash too, could it be related to the iOS simulator running on a lower end system (macbook late 2009), There does not seem to be any errors being thrown by unity in the scene. – ReeRoo Apr 06 '15 at 09:50

2 Answers2

0

type bt in lldb command line to see the back trace. this should give you the stack info to help you. from the thread info, seems like a buffer issue, either overflow or nil pointer

Wingzero
  • 9,644
  • 10
  • 39
  • 80
  • Sorry to be a noob but how do i access the lldb command line in Xcode? – ReeRoo Apr 05 '15 at 16:09
  • you already did in your screen shot, dont yu see a small window including some logs and shows blue text (lldb)? – Wingzero Apr 05 '15 at 23:09
  • THanks for the help but i havent managed to solve this issue yet. I am not sure what the cause could be exactly but i believe it could potentially be the simulator running on a lower end machine. I need to buy an iphone for future development so will be looking for a iphone 4/4s for development and see if i get the same issues. I noticed that sometimes the levels load on the simulator but when it does the grame runs extremely slow. – ReeRoo Apr 08 '15 at 19:30
  • Well your questions split in different areas, so I suggest you one question a time, if you have learned how to debug your code with lldb, this topic thread is over, and open another with more details when you got stuck and have more traces and code. With the screenshot above, no one can tell you what happened, we can only show you how to dig into it. – Wingzero Apr 08 '15 at 23:33
  • For your iPhone performance issue, simulator is using your Mac hardware, so the only difference are cpu and memory. iPhone 4 is end of life, you shouldn't spend much time on 4 series because they will be ended soon, and the hardware is very slow. Your bottom line can be iPhone 5 – Wingzero Apr 08 '15 at 23:37
0

My Advice is to create an new project from unity . With 1 Scene and a simple object and plane. Add the scene in the build settings just to be sure you have a scene that will play on the simulator. Also try to play it on your device. From that you can then continue your changes and observe what you have done wrong.

Kris Julio
  • 87
  • 3