Game Development Community

iT2D 1.4.1 - XCode 4 - MacBook Pro 2011 - Build Issue? - RESOLVED

by David Schlabach · in iTorque 2D · 04/02/2011 (11:38 am) · 20 replies

(what version are you using?)
Build: 1.4 Release, 1.4.1 Release

(what platform/OS did this happen on?)
Platform: MacBook Pro 2011 - OS X 10.6.7 - XCode 4 - iPhone Simulator

(where is this bug happening?)
Target: XCode iPhone simulator (XCode 4 / iOS 4.3)

(what is the bug)
Issues: In the iPhoneExample RainyDay when I click Build/Run the game starts and then goes straight to a "Program received signal: "EXC_BAD_ACCESS"".

(tell us how to trigger the bug)
1. From iTorque open RainDay
2. Click build project
3. From XCode 4 click run simulator
4. Simulator starts then crashes with a "EXC_BAD_ACCESS"

You will also notice the incorrect DSO versions, i've only been able to get those to go away by commenting out the version checker code in console.cc

(if you have a copy of your console log, please link to it here)
Link to Console Log: Log

#1
04/03/2011 (12:24 pm)
I have had this issue on a 2010 Macbook with nVidia graphics and not just in Torque. There's a million possible causes, it can be in game code or in your case I would recommend reinstalling xcode as that has helped me in the past when working on an iPad app.
#2
04/03/2011 (1:08 pm)
ok, I'll try reinstalling xcode.
#3
04/03/2011 (5:14 pm)
Test it in Xcode 3. Test the same project that works in 3 also in Xcode 4. Give up when you realise it's a broken release, and go back to 3 ;)
#4
04/03/2011 (8:36 pm)
I really do think this might be an Xcode problem, unfortunately. To err on the side of caution, could you reformat your post to use the Official Bug Reporting Standard? If this is an iTorque problem, that format will help us reproduce the problem. Again, I think Xcode will be the culprit here, but we can never be too cautious.
#5
04/06/2011 (3:08 pm)
Logged as ITGB-150.
#6
04/06/2011 (3:34 pm)
This to me sounds like an issue with bad DSO files. DSO files are incompatible if you compile with or without the PUAP_* macros. Potential steps that may fix this issue:

Open the iTorque2DGame project and check your preprocessor macros. Make sure that PUAP_SCRIPT_OPTIMIZE and PUAP_SCRIPT_CHANGE marcros are set.

Now build the iTorque2DGame app.

Clear your dsos using cleandso.command.

Run the iTorque2DGame app to create new DSOs.

Open up the iTorque2D project and make sure the PUAP_* macros match that of the iTorque2DGame app.

Build and run the iTorque2D app, cross your fingers, and hopefully your null exceptions are gone.
#7
04/06/2011 (5:03 pm)
1. I uninstalled xcode 4
2. rebooted
3. reinstalled xcode 4
4. rebooted
5. Deleted all user/application support/iphone simulator files
6. Opened iTorque and selected rainy day project
7. Build Project
8. Run simulator
9. Bad Exec. :(

Chris, I checked and the PUAP optimizations are there.
#8
04/06/2011 (5:34 pm)
Ok, here is the kicker.... if I build my game on my Mac Pro, then copy the files over to the MacBook Pro, open with iTorque, Click Build Project, and run iPhone Simulator it works.

However, if I create a new iTorque project add an image, run in iTorque simulator, then build project, run iPhone simulator I get the bad exec again.
#9
04/06/2011 (7:49 pm)
From your original post:

Quote:2. Click build project

Can you elaborate on what steps you took to do this?
#10
04/10/2011 (8:38 am)
Sure.

1. Open iTorque
2. Open a Project (iTorque2D_1_4_1/MyProjects/RainyDay/projectFiles/)
3. Select (project.t2dProj)
4. Click on Open
5. Click on the Play Game button (the 13th button from the left)
6. Move the rain cloud around using the arrow keys to verify it is working.
7. Close iTorque Simulation window
8. Back at the iTorque designer window, click the 5th button from the left (Build Project)
9. XCode Launches
10. XCode does some Indexing
11. I verify that iTorque2DGame_sim (iPhoine 4.3 Simulator) is selected
12. In XCode I click the first button on the left (Run)
13. XCode compiles the project (69 Warnings)
14. The iPhone Simulator loads
15. The Torque Logo appears in the IPhone Simulator
16. The iPhone Simulator screen goes white
17. A little static sound comes out of the speakers
18. The XCode debug window fills with text

onIphoneBecomActive: Unknown Command
LLVM ERROR: Cannot yet select: 0xb8091d8: v16i8 = bit_convert 0xb19048 [ORD=259] [ID=170]
cont.... same as attached log

I hope this helps you guys! :)

Thanks again, David
#11
04/10/2011 (10:17 am)
@David - Ahhh! I thought I removed that button.

Quote:8. Back at the iTorque designer window, click the 5th button from the left (Build Project)

That's the problem. That button was supposed to be removed from the Editor because it does not work. You want to click on the Project tab, then Open Xcode project. Build from there.

Deploying Rainy Day
#12
04/10/2011 (2:51 pm)
Ok, so I put the /user/library/application support/iPhone Simulator folder in the trash and cleared.
I then loaded up the rainyday project and clicked on [Project manager] [Open XCode Project]
After that completed, I click the Run button. :( Same thing happened.
#13
04/11/2011 (7:51 pm)
1. So I uninstalled xcode4
2. installed xcode3
3. rebooted
4. opened iTorque
5. opened project
6. clicked build in xcode
7. clicked run in simulator
8. game opened, white screen, drop back to home screen
9. checked debug logs, same thing

I created a quick xcode iphone project and it compiles and runs.

Anyone? Any additional idea's I'll try just about anything.
#14
04/12/2011 (7:39 am)
I'm kind of stumped here David. No one else seems to have this problem and I'm worried your system may be dirty due to all the deleting. What device are you deploying to?

Try this:

1. Open RainyDay/buildFiles/Xcode/iTorque2DGame.xcodeproj
2. Delete all DSO files from the RainyDay/projectFiles folders. Make sure you are deleting only the DSO files
3. Run iTorque2DGame.app from the RainyDay/projectFiles directory
4. Directly open RainyDay/buildFiles/Xcode_iPhone/iTorque2D.xcodeproj
5. Clean
6. Check the preprocessor macros in the iTorque2D.xcodeproj. Are any of the PUAP definitions different than what is in the iTorque2DGame.xcodeproj?
7. If they are the same, try deploying to the device again.

Post a link to your console.log in the projectFiles directory and from the Xcode output
#15
04/14/2011 (7:00 pm)
Will do, thought I literally just bought this computer and this was the first thing I tried to do. Also, the other night I reformatted the computer and reinstalled OS X, Xcode 4, and iTorque.

After which I had the same issue. After I run through the steps above, I'll post my log.

-David
#16
04/18/2011 (7:42 am)
@David - Use something like pastebin to provide the full log. I'm still not sure what is going on.
#17
04/18/2011 (4:26 pm)
Ok, I did the steps you listed above, and other than the order being different, the puap definitions were in both projects.

Just to verify, iTorque2D should be GCC 4.2 and iTorque2DGame should be LLVM GCC 4.2? I tried iTorque2D changing from GCC to LLVM and it really didn't like that!

I was also able to run iTorque2DGame it's when running on the simulator that all goes south.

FYI, no sound in the above even thought I see the stream mp3 call.


console.log

xcode iphone simulator log

xcode iphone simulator log.LLVM GCC 4.2

Thanks again for all your help!
#18
05/25/2011 (12:44 pm)
Good News everybody!

I finally got games to build in xcode on my Macbook Pro. I completely removed 1.4.1 and installed 1.5 preview. Now I understand that there was most likely no change between 1.4.1 and 1.5 around the xcode project, however this time when I compiled and ran the rain tutorial in the iPhone simulator it didn't crash.

So I then created a new project in iTorque and then clicked open in xcode. When I ran it, it crashed. However I noticed something. The iPhone simulator background was different. So poking around I noticed that the rain tutorial was using iPhone Simulator 4.0 and my new project was using iPhone Simulator 4.3. So I changed the new project to 4.0 and it worked.

I then copied my game from my Mac Pro to my Macbook pro and noticed the iPhone Simulator reset to 4.3. I changed it to iPhone Simulator 4.0 and the game worked! I also tested 4.1 and 4.2 successfully.

-David
#19
05/25/2011 (1:21 pm)
@David - Fantastic! I'm glad you have it working for you. Plus, you have just given me a trail to track down a potential bug. Many thanks!
#20
09/12/2011 (4:23 pm)
Marked as resolved.