Re: Garbage Collection Caveats

  • Target OS: Leopard (10.5.1)
    IDE: Xcode 3.0
    Language: Objective-C 2.0

    Project: a multi-player blackjack game

    Problem: When I am testing the shoe/deck/card classes with a unit test
    bundle and I build it with the Garbage Collection Supported option, my
    test builds perfectly. When I use the Garbage Collection Required
    option my script fails with the following message:

    Test rig '/Developer/Tools/otest' exited abnormally with code 5 (it
    may have crashed).

    Any ideas on why it would do this or what to look for? I suspect that
    it has something to do with a couple hundred card objects being
    generated and then the garbage collector getting ahold of them before
    I'm done with them, but I have no idea how to verify this theory or
    test it out.

    Thanks!

    Jacob Portukalian
    Student: Math / Electrical Engineering
    Pasadena City College
    Pasadena, CA 91106
    (626) 679 - 5421
  • On Nov 17, 2007, at 11:45 PM, Jacob Portukalian wrote:

    > When I use the Garbage Collection Required option my script fails
    > with the following message:
    >
    >
    > Test rig '/Developer/Tools/otest' exited abnormally with code 5 (it
    > may have crashed).

    See this email thread from cocoa-dev a week ago:

      http://lists.apple.com/archives/Cocoa-dev/2007/Nov/msg00851.html

    That thread explains what's going on and how to address it.  The short
    version: In Xcode 3.0, SenTestingKit.framework is built GC-supported
    but otest is not, so you can't use the stock version to test a GC-
    required framework.  You have to either make your framework GC-
    supported and test it without GC, or build your own otest that is GC-
    supported to test it with GC.

      -- Chris
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today