• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Custom bindings with gcc4.0 [was Cocoa app fails when using 10.4 Universal SDK]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom bindings with gcc4.0 [was Cocoa app fails when using 10.4 Universal SDK]


  • Subject: Re: Custom bindings with gcc4.0 [was Cocoa app fails when using 10.4 Universal SDK]
  • From: Ricky Sharp <email@hidden>
  • Date: Sat, 11 Jun 2005 10:12:18 -0500

On Jun 7, 2005, at 9:33 PM, Ricky Sharp wrote:

While this thread may end up being better suited for the xcode list, I thought I'd try hear since the following issue may be unique to Cocoa apps:

Moving back to this list because now I believe the problem is with my custom bindings code.


Last night I decided to give my failing app a rest and move my IBPalette project to Xcode 2.1. Originally, the palette was built with Xcode 1.5 using gcc3.3. I left the target OS at 10.3 and SDK at 10.3.9. The only thing that thus changed was the compiler (3.3 to 4.0).

The palette does build and I can drag widgets as usual and set their attributes via inspectors. However, if I bring up the bindings inspector, IB will crash right there and then or will crash when I quit.

The top of the crash report is always this:

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_INVALID_ADDRESS (0x0001) at 0x6d617889

Thread 0 Crashed:
0 <<00000000>> 0xfffeff18 objc_msgSend_rtp + 24
1 com.apple.CoreFoundation 0x9072dd6c CFArrayCreate + 456
2 com.apple.Foundation 0x92859738 - [NSPlaceholderArray initWithObjects:count:] + 116
3 com.apple.Foundation 0x928595a0 +[NSArray arrayWithObjects:count:] + 64
4 com.apple.Foundation 0x92859530 +[NSArray arrayWithObjects:] + 268
5 com.apple.AppKit 0x93ae4e18 -[NSObject (_NSBindingCreationSupport) _bindingInformationWithExistingNibConnectors:availableControllerChoices: ] + 648
6 ...erfaceBuilder.BinderPalette 0x04f96468 dyld_stub_NSLog + 83403060
7 ...erfaceBuilder.BinderPalette 0x04f95fbc dyld_stub_NSLog + 83401864
8 ...e.InterfaceBuilderFramework 0x96122670 - [IBInspectorManager resetInspectorFromSelectedObject] + 328



where the inspector pane being brought up is the bindings pane.

I just compiled up mmalc's Joystick palette in Xcode 2.1 (and thus with gcc4.0) and it works a-ok. Bringing up the bindings pane works as expected and I can bind/unbind stuff.


So something has gone bad with my custom bindings which I modeled off of the Joystick example. This also explains the strange behavior I was seeing in my app; such bad behavior was only observed by widgets that were using my custom bindings.


Is anyone else using custom bindings in apps built with gcc4.0? I'll definitely be diving into this over the weekend and will share the solution when found.

This problem has nothing to do with build architectures (ppc/intel) or the 10.4U SDK. It's definitely tied to the move to gcc4.0

Finally, some things I've already ensured I'm not doing:

(1) All my class initialize methods are implemented like this:

+ (void)initialize
{
    if (self == [MyClass class])
        {
        // do work
        }
}

(2) I never send messages to nil such that the return types are not objects. For example:

- (int)methodReturningInt; // Method in MyObject class

MyObject theObject = nil;
int theValue = 0;

if (theObject != nil) // Always do the nil check
    theValue = [theObject methodReturningInt];


___________________________________________________________ Ricky A. Sharp mailto:email@hidden Instant Interactive(tm) http://www.instantinteractive.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Cocoa app fails when using 10.4 Universal SDK (From: Ricky Sharp <email@hidden>)

  • Prev by Date: Re: Passing more than 1 variable to a method/function
  • Next by Date: Cocoa menus in Carbon App
  • Previous by thread: Re: Cocoa app fails when using 10.4 Universal SDK
  • Next by thread: Re: Cocoa app fails when using 10.4 Universal SDK
  • Index(es):
    • Date
    • Thread