CGAffineTransform of CGPath crashes simulator

Originator:keehun
Number:rdar://9698981 Date Originated:6-29-2011
Status:Open Resolved:
Product:iPhone SDK Product Version:iOS 5
Classification: Reproducible:Yes
 
29-Jun-2011 03:59 PM Keehun Nam:
'MacBook Pro.spx' was successfully uploaded

29-Jun-2011 03:59 PM Keehun Nam:
Developer Information:

  Version:	4.1 (4D58)
  Location:	/Developer
  Applications:
  Xcode:	4.2 (819)
  Instruments:	4.2 (4208)
  Dashcode:	3.0.2 (334)
  SDKs:
  Mac OS X:
  10.6:	(10J567)
  10.7:	(11A497)
  iPhone OS:
  5.0:	(9A5248d)
  iPhone Simulator:
  4.3:	(8H7)
  5.0:	(9A5248d)

Summary:
When updating an overlay with live GPS coordinates (as to draw the trace path of travel), it works fine until a random point in time (usually attributed to some inter/action with the map) when it crashes. It seems to crash gdb. It does not give out a stack trace message. Xcode changes the editor view to the disassembly and will always point to a line of assembly which is:

call *0x24(%ecx)

Which can be attributed, apparently, to CGAffineTransform. It is not my code but it seems to be part of Cocoa/UIKit/etc and no matter where I crash within the app it will always track back to that particular line.

The Console printout is the following:

=========================================================

GNU gdb 6.3.50-20050815 (Apple version gdb-1703) (Thu May 26 17:11:52 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".Attaching to process 10745.
2011-06-29 15:46:10.412 PedalBrain[10745:15b03] Application launched
2011-06-29 15:46:10.649 PedalBrain[10745:15b03] SyncModelStore loaded - Bikes: 1
2011-06-29 15:46:10.663 PedalBrain[10745:15b03] GET http://api.pedalbrain.local:3000/iphone/workouts.json
2011-06-29 15:46:10.663 PedalBrain[10745:15b03] GET http://api.pedalbrain.local:3000/iphone/messages.json
2011-06-29 15:46:10.694 PedalBrain[10745:15b03] App launch complete
2011-06-29 15:46:15.720 PedalBrain[10745:15b03] Request to http://api.pedalbrain.local:3000/iphone/messages.json failed: A connection failure occurred
2011-06-29 15:46:15.721 PedalBrain[10745:15b03] Request to http://api.pedalbrain.local:3000/iphone/workouts.json failed: A connection failure occurred
2011-06-29 15:46:42.666 PedalBrain[10745:15b03] Workout "Demo" started
2011-06-29 15:46:42.667 PedalBrain[10745:15b03] Wiping Map
2011-06-29 15:46:42.667 PedalBrain[10745:15b03] Loading Workout
2011-06-29 15:46:42.667 PedalBrain[10745:15b03] Wiping Map
2011-06-29 15:46:42.669 PedalBrain[10745:15b03] Workout "Demo" auto-unpaused at 0:00, 0 km
2011-06-29 15:46:43.890 PedalBrain[10745:15b03] Loading Workout
2011-06-29 15:46:43.890 PedalBrain[10745:15b03] Wiping Map
[Switching to process 10745 thread 0x1c207]
[Switching to process 10745 thread 0x1c207]
sharedlibrary apply-load-rules all
Single stepping until exit from function _ZN2CG4Path15apply_transformERK17CGAffineTransform, 
which has no line number information.
Single stepping until exit from function _ZN2CG4Path15apply_transformERK17CGAffineTransform, 
which has no line number information.
Single stepping until exit from function _ZN2CG4Path15apply_transformERK17CGAffineTransform, 
which has no line number information.
(gdb) 

=========================================================

I tried stepping through the assembly 3 times, which is when the "Single stepping until exit from function" was called (3 times in the console printout).

It happens when it tries to move the overlay which contains a CGMutablePath.

The most mysterious part of all this is that the screen is not frozen. The userlocation on the MKMapView still pings. It doesn't move, but the screen is not dead frozen either. However, touch interactions do not work, without surprise.

Steps to Reproduce:
I'm not sure. Draw a CGPath on a subclassed MKOverlayPathView and add the overlay. It actually worked perfectly for me until this morning. Simulator was fully cooperating until this morning. I tried "Reset Content and Settings" on the simulator to no avail. This app worked perfectly on the device. Again, it was perfect until this morning. Maybe I should restart the computer? Still, a crash/bug nonetheless given that it worked perfectly on the device every time.

Expected Results:
Smoothly panning and seamless overlay af the trail.

Actual Results:
Crashed app without a stack trace. Just a gdb error printout.

Regression:

Notes:

Comments

Appended Information

It seems very random and isolated to the Simulator. For example, today, I was testing the application for about 20 minutes. It ran smoothly for 20 minutes and then decided to crash. I thought the simulator wasn't going to crash, but it did. It is better than yesterday, however. Yesterday, the crash happened almost immediately, but not today. Same log information and the same location in the assembly code: call *0x24(%ecx) and CGAffineTransform of a CGPath and "EXC_BAD_ACCESS"


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!