iOS 5.1: -[UIBezierPath currentPoint] logs a misleading error message

Originator:pcgoracke
Number:rdar://11208387 Date Originated:Mon, 09 Apr 2012 03:56:32 GMT
Status:Open Resolved:
Product:iPhone SDK Product Version:5.1 (9B176)
Classification:Other Bug Reproducible:Always
 
Summary:

-[UIBezierPath currentPoint] is documented to return CGPointZero if the path is empty. When trying to use the method, though, an error is logged to the console. This appears to be a benign error, since CGPointZero is returned as appropriate and nothing seems to misbehave. On the other hand, it causes worry for the developer since it specifically says "Error" in the log message, and it will generate log message every time it is used, which may be quite often if used in -drawRect:.

Steps to Reproduce:

1. Create an empty UIBezierPath object.
2. Call -currentPoint on the object.

A sample project is attached.

Expected Results:

The call behaves properly, with no spontaneous logging.

Actual Results:

Spurious Error log.

Regression:

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!