Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Assert problem in CEndpoint_OP.cpp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assert problem in CEndpoint_OP.cpp



> I have come across a minor problem in CEndpoint_OP.cpp which causes
> assert to be defined in release builds. CEndpoint_OP.cpp includes
> <assert.h> and since NDEBUG is never defined in the OpenPlay projects,
> assert gets defined in the release builds. No other files in OpenPlay
> include <assert.h>. In fact, OPUtils.h defines the assert mechanism that
> is intended to be used. It properly NOPs assert in release builds. I
> have removed the #include <assert.h> in this file.
>
> The reason this came up is because further down in CEndpoint_OP.cpp, the
> line
>
> assert(bytesToRead >= 28);
>
> was occasionally firing in my builds. Why that is happening is yet
> another problem. :)
>
> Mark Krenek
> Westlake Interactive
> _______________________________________________
> openplay-development mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/openplay-development
> Do not post admin requests to the list. They will be ignored.


Hi-

The original NetSprocket used that assert to make sure that it always had at
least a full header before looping around and getting more data. This
doesn't always happen in general, and in a high bandwidth condition, it is
very likely that you will eventually be faced with only a partial header.
The fact that you are tripping that assert means that your code would have
crashed and burned.


Since this assert is being tripped by your code, you are going to need my
fix to NetSprocket which doesn't have this Achilles heel (nor does it have
the assert statement). I'll speak with Lane to get my fix merged into the
baseline.

Randy Thompson
_______________________________________________
openplay-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/openplay-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Assert problem in CEndpoint_OP.cpp (From: Mark Krenek <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.