• 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
MoreSCF fails horribly if the Automatic location is removed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MoreSCF fails horribly if the Automatic location is removed


  • Subject: MoreSCF fails horribly if the Automatic location is removed
  • From: Dave Camp <email@hidden>
  • Date: Thu, 21 Oct 2004 15:00:56 -0700

I wrote the following test program to test this with the latest MoreIsBetter (I grabbed a fresh copy today). The reproduction steps are:

- Starting with just the Automatic location, make a new location and switch to it.
- Delete the Automatic location
- Run the code


MoreSCNewSet then spews forth a slew of asserts and things go bad from there. I've stepped the code in the debugger and I can see where things are going wrong, but I don't understand enough about the bowels of MoreSCF and SCFramework to understand how to fix it. The backtrace looks like:

kill ()
abort ()
__eprintf ()
MoreSCSetServicesDictMoreSCF.c:1592
AddServiceToSet MoreSCF.c:989
MoreSCNewService MoreSCF.c:2527
MoreSCNewSet MoreSCF.c:1981
main

From what I can tell, it looks like the problem is that the new serviceID appears twice in the serviceOrder array, but there is only one service in the servicesDict.

This bug was found by one of our client's customers. Apparently they had deleted the Automatic location from all of their PowerBooks to work around some issue they had with some other fine piece of software, and then our app started failing.

Any thoughts?

Thanks,
Dave

int main (int argc, const char * argv[])
{
	OSStatus	error = noErr;
	error = MoreSCSetClient(CFSTR("MyClient"));

	if (error == noErr)
		error = MoreSCOpen(false, false);

	CFStringRef	setID = NULL;
	if (error == noErr)
		error = MoreSCNewSet(CFSTR("My New Set"), &setID);

    return 0;
}

---
Among the chief weapons of UNIX:  Fear, surprise and ruthless efficiency.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: MoreSCF fails horribly if the Automatic location is removed
      • From: Christian Weykopf <email@hidden>
  • Prev by Date: Communicating on Specific Ethernet ports
  • Next by Date: Re: MoreSCF fails horribly if the Automatic location is removed
  • Previous by thread: Re: Communicating on Specific Ethernet ports
  • Next by thread: Re: MoreSCF fails horribly if the Automatic location is removed
  • Index(es):
    • Date
    • Thread