• 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: Arbitrary polygons crash -[NSBezierPath stroke]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arbitrary polygons crash -[NSBezierPath stroke]


  • Subject: Re: Arbitrary polygons crash -[NSBezierPath stroke]
  • From: Tom Bernard <email@hidden>
  • Date: Wed, 28 Jun 2006 03:03:54 -0600

If you look again, you will see that while I am enumerating executionList, I
am modifying objectArray, a different NSArray. I do it this way to avoid the
problem you cite.

And if I were stomping memory, the stomped memory would cause a crash
regardless of whether I stroked or filled the polygon; as I said earlier,
the crash only occurs when I stroke the polygon.

I have written a skeleton screensaver that illustrates the problem; I will
post it within the next day.

Thanks for looking :)


Tom Bernard
email@hidden



on 6/27/06 6:31 PM, Uli Kusterer at email@hidden wrote:

> Am 28.06.2006 um 01:05 schrieb Tom Bernard:
>>    enumerator = [executionList objectEnumerator];
>>     while (anOnScreenObject = [enumerator nextObject])
>>     {
>>         [anOnScreenObject die];
>>         [objectArray removeObject:anOnScreenObject];
>>     }
>>     [executionList removeAllObjects];
>
> At the top of the docs for NSEnumerator, I found the following note:
>
>>>
> Note: It is not safe to modify a mutable collection while enumerating
> through it. Some enumerators may currently allow enumeration of a
> collection that is modified, but this behavior is not guaranteed to
> be supported in the future.
> <<
>
> So, you may be stomping memory by doing this, thus causing the crash
> that occurs later.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Arbitrary polygons crash -[NSBezierPath stroke]
      • From: Uli Kusterer <email@hidden>
References: 
 >Re: Arbitrary polygons crash -[NSBezierPath stroke] (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Set text color of text field
  • Next by Date: Login Item
  • Previous by thread: Re: Arbitrary polygons crash -[NSBezierPath stroke]
  • Next by thread: Re: Arbitrary polygons crash -[NSBezierPath stroke]
  • Index(es):
    • Date
    • Thread