Options for working around a bug

  • The problem described below is causing my application to fail. I've
    raised a bug with Apple, but of course it will take them a while to
    address it.

    I can reproduce the problem with Apple's SpecialPictureProtocol
    example, which is doing more or less exactly what my app is doing --
    when their sample app is compiled with GC on it fails in the same way.

    Am I correct in thinking that there is no source code available for
    the NSCFURLProtocolBridge class? (I'm assuming that it isn't part of
    the open source bits of webkit)
    If I had the source I expect I could either figure out how to change
    the state of the protocol system so that whatever the finalize method
    is doing was already done, or change the method to be more gc-aware.

    Can I replace the finalize method using a Category? I might try
    replacing it with a method which does nothing...

    Of course the simple solution is to not use GC, but I would like to
    ask if there's any other plausible option?

    I'm using Xcode 3, OS X 10.4.1 in a GCd app, and I'm getting the
    following:

    EddyApp(48662,0xb0103000) malloc: *** resurrection error for object
    0x2c85170: auto_zone_write_barrier: {conservative-block}[32](0x14f0d10)
    [16] = _NSCFURLProtocolBridge[48](0x2c85170)
    EddyApp(48662,0xb0103000) malloc: *** auto malloc[48662]: error for
    object 0x2c85170: pointer in garbage list being stored into reachable
    memory, break on auto_zone_resurrection_error to debug

    I have a breakpoint set on auto_zone_resurrection_error:

    #0    0x924a7fe3 in auto_zone_resurrection_error
    #1    0x924a5501 in check_resurrection
    #2    0x924a5d24 in auto_zone_write_barrier
    #3    0x96bd88b7 in objc_assign_strongCast_CF
    #4    0x946afd31 in _CFArrayReplaceValues
    #5    0x91eebda3 in -[NSCFArray insertObject:atIndex:]
    #6    0x91eebd14 in -[NSCFArray addObject:]
    #7    0x91fe1f3d in -[_NSCFURLProtocolBridge sendInstruction:]
    #8    0x91f55cf0 in -[_NSCFURLProtocolBridge stop]
    #9    0x91f55ca4 in bridgeStop
    #10    0x95111044 in CFURLProtocolCancelLoad
    #11    0x91fe1da5 in -[_NSCFURLProtocolBridge finalize]
    #12    0x96bd88fe in finalizeOneObject
    #13    0x924a050b in foreach_block_do
    #14    0x96bd8ac3 in batchFinalize
    #15    0x96bd8d8a in batchFinalizeOnTwoThreads
    #16    0x924a18ce in auto_collect_internal
    #17    0x924a254f in auto_collection_thread
    #18    0x9589c075 in _pthread_start
    #19    0x9589bf32 in thread_start
previous month december 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
31            
Go to today