Re: MoreSCF fails horribly if the Automatic location is removed
Re: MoreSCF fails horribly if the Automatic location is removed
- Subject: Re: MoreSCF fails horribly if the Automatic location is removed
- From: Christian Weykopf <email@hidden>
- Date: Fri, 22 Oct 2004 14:38:59 +0200
Am 22.10.2004 um 00:00 schrieb Dave Camp:
Hi,
I ran into this problem in the early 10.3 days.
The Automatic location has the numerical setID 0. All other location
have a GUID as setID.
When you delete the Automatic location you have no numerical setIDs an
the MySCPreferencesPathCreateUniqueChild () and LargestNumericKey ()
routines doesn't work well.
I can't remember how I solved this. Hope it helps.
chris
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:
email@hidden
This email sent to email@hidden
--
Christian Weykopf
Meilenstein Mac OS Software
Neue Strasse 5
D-31582 Nienburg
Fax: +49 (0) 5021 91 24 45
<http://www.meilenstein.de/>
_______________________________________________
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