• 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
needing help w/ asynchronous message problem, using YAMessageQueue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

needing help w/ asynchronous message problem, using YAMessageQueue


  • Subject: needing help w/ asynchronous message problem, using YAMessageQueue
  • From: Shane <email@hidden>
  • Date: Fri, 15 Jan 2010 22:04:08 -0600

I have a thread already where I use asynchronous messages to
communicate (using YAMessageQueue). My main application thread sends
messages to a task thread similar to the below line, but for some
reason, when I'm sending from my task thread to the main application
thread, I'm getting the following error (I do have other messages from
my task thread to the main app thread that do work, just not this
one).

2010-01-15 21:28:50.483 myApp[16330:420b] YAMessageQueue caught "***
-[NSCFArray insertObject:atIndex:]: attempt to insert nil" when
invoking updateLoadedNetworkConfiguration:

[[clientQueue proxyForTarget:controller] updateLoadedNetworkConfiguration:nc];

I think it may have something to do w/ the class that I'm trying to
pass to it (nc) which is my NetworkConfiguration class.


@interface NetworkConfiguration : NSObject <NSCoding>
{
	NSNumber *a;
	NSNumber *b;
	NSNumber *c;
	NSNumber *d;
	NSNumber *e;
	NSNumber *f;
	NSNumber *g;
	NSNumber *h;
	NSString *i;
	NSString *j;
	NSString *k;
	NSString *l;
	NSMutableDictionary *m;
}

+ (NetworkConfiguration *) sharedInstance;
+ (id) allocWithZone:(NSZone *) zone;
- (id) copyWithZone:(NSZone *) zone;
- (id) retain;
// …

@end


There's a callback in the YAMessageQueue class where I see where the
error is coming from, but don't quite understand what's going on or
still, why this is happening.

static void
rlsCallBack(void *info)
{
    YAMessageQueue *queue = [(YAMessageQueue*)info retain];
    NSInvocation *invoc;
    do {
        invoc = nil;
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        NS_DURING
            invoc = [queue dequeueInvocation];
            if (invoc)
                [invoc invoke];
        NS_HANDLER
            NSLog(@"YAMessageQueue caught \"%@\" when invoking %s",
localException, invoc ? (const char*)[invoc selector] :
"dequeueInvocation");
        NS_ENDHANDLER
        [pool release];
    } while (invoc!=nil);
    [queue release];
}

Any help in understanding this, much appreciated.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: needing help w/ asynchronous message problem, using YAMessageQueue
      • From: Grant Christensen <email@hidden>
    • Re: needing help w/ asynchronous message problem, using YAMessageQueue
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Smart folder definition dialog
  • Next by Date: Adding to-many objects programmatically
  • Previous by thread: Smart Lists
  • Next by thread: Re: needing help w/ asynchronous message problem, using YAMessageQueue
  • Index(es):
    • Date
    • Thread