Advertise Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-14-2009, 07:29 PM   #1 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 19
Default UIKIt requires garbage collection? Huh?

I'm running test cases with the SenTestKit framework. When I add the UIKit.framework to my test target and run it with debugger, the debugger fails with the following message:

Code:
2009-07-14 17:09:17.793 otest[45997:813] The test bundle at Test.octest could not be loaded because its Objective-C runtime information does not match the runtime information required by the test rig.  This is likely because the test rig is being run with Objective-C garbage collection disabled, but the test bundle requires Objective-C garbage collection.  To enable Objective-C garbage collection for the test rig, run it in an environment without the OBJC_DISABLE_GC environment variable.
2009-07-14 17:09:17.817 otest[45999:203] *** NSTask: Task create for path '/Users/ff/dev/iphone/play/testApp/build/Debug-iphonesimulator/Test.octest/Test' failed: 8, "Exec format error".  Terminating temporary process.
When I remove the UIKit framework from the test target, all works well. But the iphone doesn't have GC, so how could the UIKit need it. Furthermore, my actual app works fine - it's just the test cases that fail. I'm confused.

Any thoughts appreciated
farhadf is offline   Reply With Quote
Old 07-14-2009, 07:41 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,070
Default

Comments on this post suggest that you can "set the OBJ_DISABLE_GC environment variable to YES in the otest executable info window".

beatworm.co.uk Blog Archive Tracing Unit Tests with the XCode 3 Debugger
__________________
~~
-- Available Now: Dead Panic, a strategic zombie shooter!(iPhone)
-- New Blog Post: A Simple Observer Pattern for iPhone / Cocoa Games
smasher is offline   Reply With Quote
Old 07-14-2009, 07:48 PM   #3 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 19
Default

It is already set to YES. That's what puzzling - the UIKit shouldn't require GC, and the iphone doesn't support it, which is why it should be disabled in the environment. The error line posted above is hard to read, but the salient part is:

test rig is being run with Objective-C garbage collection disabled, but the test bundle requires Objective-C garbage collection. To enable Objective-C garbage collection for the test rig, run it in an environment without the OBJC_DISABLE_GC environment variable.

Thanks
farhadf is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 41,860
Threads: 49,768
Posts: 213,054
Top Poster: BrianSlick (3,138)
Welcome to our newest member, gustavo7sexton
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:55 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0