• 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: MoreSCF 1.1 and Cross-Development
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MoreSCF 1.1 and Cross-Development


  • Subject: Re: MoreSCF 1.1 and Cross-Development
  • From: Quinn <email@hidden>
  • Date: Tue, 23 Oct 2007 14:21:14 +0100

At 15:09 +0200 23/10/07, Tobias Walser wrote:
Sadly, it fails to run on 10.2.8 and 10.3.9 and I don't think it was because of the dust on my machines ;)

MoreSCFPortScanner.c: You should install a port name callback.
/Users/tobi/Documents/workspace/bluedisk/mac/lib/MoreSCF/MoreSCFCCLScanner.c:167: failed assertion `onHoldRef != NULL'
Abort


I had this warning about the port name callback before but until now the code was working fine.

The port name warning is unrelated to the crash. The port name warning is explained in the comments in "MoreSCFPortScanner.h". Check 'em out.


The crash is a bug in MoreSCF <rdar://problem/5517319>. Specifically, there's an incorrect assert in the code. This won't affect production code (which is one of the reasons I haven't revved the sample), but it causes a false assert on the debug build. The easy fix is to comment out the lines:

    assert(onHoldRef != NULL);
    assert( CFGetTypeID(onHoldRef) == CFNumberGetTypeID() );

The correct fix is to replace the lines:

onHoldRef = (CFNumberRef) CFDictionaryGetValue([...]);
assert(onHoldRef != NULL);
assert( CFGetTypeID(onHoldRef) == CFNumberGetTypeID() );
if ( (onHoldRef != NULL) && CFNumberGetValue([...]) && (onHold != 0) ) {
assert(onHold == 1); // would be weird otherwise
gDefaultCCL = CFSTR("Apple Internal 56K Modem (v.92)");
CFQRetain(gDefaultCCL);
}


with:

onHoldRef = (CFNumberRef) CFDictionaryGetValue(
thisPort,
kSCPropNetInterfaceSupportsModemOnHold
);
if (onHoldRef != NULL) {
assert( CFGetTypeID(onHoldRef) == CFNumberGetTypeID() );
if ( CFNumberGetValue(onHoldRef, kCFNumberIntType, &onHold)
&& (onHold != 0) ) {
assert(onHold == 1); // would be weird otherwise
gDefaultCCL = CFSTR("Apple Internal 56K Modem (v.92)");
CFQRetain(gDefaultCCL);
}
}


Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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 1.1 and Cross-Development
      • From: Tobias Walser <email@hidden>
References: 
 >MoreSCF 1.1 and Cross-Development (From: Tobias Walser <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Mike Cohen <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Quinn <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Tobias Walser <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Quinn <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Tobias Walser <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Quinn <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Tobias Walser <email@hidden>)

  • Prev by Date: Re: MoreSCF 1.1 and Cross-Development
  • Next by Date: Re: MoreSCF 1.1 and Cross-Development
  • Previous by thread: Re: MoreSCF 1.1 and Cross-Development
  • Next by thread: Re: MoreSCF 1.1 and Cross-Development
  • Index(es):
    • Date
    • Thread