Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Swing + Cocoa = BOOM (solved again!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swing + Cocoa = BOOM (solved again!)



On 30 Mar 2005, at 19:15, Glen Fisher wrote:

Geoff Levner wrote:
| Problem solved (no thanks to you guys!).

| The solution is to allocate Cocoa data structures on the AppKit thread,
| exclusively, if they need to be deallocated later.


This probably isn't doing anything more than hiding the real problem...

| The AppKit thread allocates its own NSData, copies the PDF data into
| it, then signals the Swing thread that its copy of the data is no
| longer needed.  And the AppKit thread releases its own data later.

Data-sharing bugs tend to be very timing dependent. A change as radical as
you describe could easily reorder the thread execution enough to drive the
data-trampling into hiding. For now.


| Is this a JVM bug?  An AppKit bug?

Most likely, an application bug.

Yes, it was indeed an application bug: a Cocoa object that was not retained. Many thanks to Greg Parker for bringing NSZombie to our attention in the "Hopelessly bad GC crash question" thread!


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


References: 
 >Re: Swing + Cocoa = BOOM (solved) (From: Glen Fisher <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.