I'm running into a similar situation except it's not crashing at the time of
dealloc but at some later time. Here's the rundown of what I see happening.
1. Global parent (non main-thread MOC) is alloc'd
2. Child1 (main-thread) MOC is alloc'd
3. Child2 (main-thread) MOC is alloc'd
4. Child1 MOC is
On Jan 13, 2012, at 3:45 PM, Chris Hanson wrote:
> On Jan 13, 2012, at 12:39 AM, Michael Link wrote:
>
>> the docs seem to indicate that using a main thread concurrency type MOC on
>> the main thread without performBlock: is fine.
>
> It is, otherwise you couldn
I have a parent MOC setup with NSPrivateQueueConcurrencyType and a persistent
store coordinator set, it has a child MOC setup with
NSMainQueueConcurrencyType. The idea being most of the long hard work and saves
can be done on the private MOC freeing the main thread from blocking the UI.
Unfortu
Is there some trick to getting NSURLConnection to work with an NSOperationQueue
on iOS 5, and perhaps Lion but I haven't tried it there? It seems that it
causes a deadlock every time just after the last delegate message has been sent
(connectionDidFinishLoading:). The project is using ARC.
The
I have a document based app that has a source list (NSOutlineView) that allows
drag and drop on itself or another source list (same class) in a different
document in the same application.
Everything works on 10.6, in 10.7 drags to the same NSOutlineView are validated
as I expect. Drags to the o
In an application that is built gc-only it seems that any CALayers added as
sublayers to an NSView are rooted (perhaps by CFRetain) and if those layers
have any references to the NSView that is hosting them then they can cause a
memory leak.
I have a view that has sublayers that accept completi
Is there anyway to stop an NSManagedObject from firing a fault, say because
it's actually been deleted?
For instance if an object is created on the main thread and is then punted to a
background thread and deleted (in a separate context of course) then the
changes are merged back to the main th
I'm running into this same problem on 10.6 when the migration is automatic or
manual. I can always reproduce it with manual migration.
After migration and the document window is open and the application is made
inactive and active again you may notice the title of the document has suddenly
chan
I keep getting this error when trying to migrate a sql store:
-[Document
configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:]
Error NSCocoaErrorDomain 134110 {
NSUnderlyingException = "I/O error for database at
/Users/mlink/Desktop/Untitled.db.new. SQLit
Did something recently change with sharedHTTPCookieStorage no longer sharing
session cookies?
--
Michael___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators
In the documentation for NSPersistentDocument's method -managedObjectModel it
says the following addition in a subclass can be used to improve efficiency if
all the documents share the same model.
> - (id)managedObjectModel {
> static id sharedModel = nil;
> if (sharedModel == nil) {
>
Is it necessary to use objc_atomicCompareAndSwapInstanceVariableBarrier when
setting an instance variable such as an NSInteger in a GC app? Or would
OSAtomicCompareAndSwap64Barrier be more appropriate?
--
Michael___
Cocoa-dev mailing list (Cocoa-dev@l
If I have a property declared and synthesized (e.g.
@property BOOL foo;
and I use a KVC method to access the value of foo (e.g.
[object valueForKey:@"foo"];
is it still accessed atomically?
--
Michael
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple
26, 2009, at 10:59 PM, Graham Cox wrote:
On 27/10/2009, at 2:55 PM, Michael Link wrote:
Is there a different solution to getting a first responder in a
table cell and not having it resign on 3.1?
I'm unfamiliar with the iPhone version of Cocoa and whether its
rules are different, but
I have a custom UITableViewController that uses a custom cell that
displays a text field. I have this method added to the table view
controller to set the text field as first responder
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
MLPropertyEditing
I'm trying to work around a problem where the latest update of Mac OS
X (10.5.8) has a broken XQuery.framework. I've discovered that
replacing the XQuery.framework on Mac OS X 10.5.8 with a version from
Mac OS X 10.5.7 solves all the problems.
I'd like to embed the XQuery.framework from Mac
After some more investigation I've discovered that XQuery was updated
in Mac OS X 10.5.8 as part of a security vulnerability in the PCRE
library which it includes.
http://support.apple.com/kb/HT3757 (scroll to bottom of page)
Which also explains why all XQuery functions using regular express
I noticed that the recent update of Mac OS X 10.5.8 breaks
compatibility with previous versions regarding XQuery statements in
NSXMLNode, specifically using the XQuery function tokenize. I
originally reported this bug against a future version of Mac OS X and
now seems to have slipped into t
I have a class with the following methods
- (void)save
{
NSError* error = nil;
if (![self save:&error]) {
NSLog(@"caught error during save: %@", error);
}
}
- (BOOL)save:(NSError**)error
{
if (![_thread isCancelled]) {
retu
I'm running into a scenario where it appears the application is
allocating memory faster than it can be reclaimed by garbage
collection. I believe this is how it happens.
There are a pool of threads that are used to collect some data as it
is collected (by using NSXML* objects, XQuery). In
When I see an error on the console that looks like this:
Test(22389,0xb0103000) malloc: *** free() called with 0x1f29ba00 with
refcount 0
Test(22389,0xb0103000) malloc: *** auto malloc[22389]: agc error for
object 0x1f29ba00: Deallocating a non-block
What exactly does 'Deallocating a non-bl
On Dec 23, 2008, at 1:19 PM, Michael Link wrote:
I have a situation with something like this is going on:
CFHTTPMessageRef response =
CFHTTPMessageCreateEmpty(kCFAllocatorMallocZone, FALSE);
CFHTTPMessageAppendBytes(response, bytes, length);
if
I have a situation with something like this is going on:
CFHTTPMessageRef response =
CFHTTPMessageCreateEmpty(kCFAllocatorMallocZone, FALSE);
CFHTTPMessageAppendBytes(response, bytes, length);
if (CFHTTPMessageIsHeaderComplete(response)) {
CFIndex statusCode =
I'm trying to track down a memory leak even though I'm using garbage
collection. I was curious what the "rc:" field means when using "info
gc-roots" in gdb? It doesn't seem to correlate to the Retain Count
when inspecting an address in Instruments and it doesn't seem to
always correlate to
The documentation for
propertyListFromData:mutabilityOption:format:errorDescription: says
that errorDescription needs to be released by the caller. In a garbage
collected environment is this still the case? Should
NSMakeCollectable() be called on errorDescription?
Is it safe to call NSMak
SELECTOR_REFERENCES_4-"L076$pb"(%ebx), %edx
movl%edx, 4(%esp)
movl%eax, (%esp)
call_objc_msgSend
leal12(%esi), %edx
movl%edx, 4(%esp)
movl%eax, (%esp)
call_objc_assign_strongCast
…
-Ken
Cocoa Frameworks
On Wed, Oct 15, 2008 at 9:32 AM, Mich
ough I get confused with the pointer
functions too.
-Ken
On Tue, Oct 14, 2008 at 9:43 PM, Michael Link <[EMAIL PROTECTED]>
wrote:
I have a situation where I create an NSPointerArray on the stack by:
pointers = [NSPointerArray
pointerArrayWithOptions:NSPoint
I have a situation where I create an NSPointerArray on the stack by:
pointers = [NSPointerArray
pointerArrayWithOptions:NSPointerFunctionsStrongMemory|
NSPointerFunctionsOpaqueMemory|NSPointerFunctionsOpaquePersonality];
I then go about adding a few objects a selector and a pointer
(contex
I'm running an application with the Core Data thread assertions on and
am running into some issues on the garbage collection thread.
On the GC thread (#2 usually in GDB), finalizeOneObject() is running
the finalize method of an NSTextValueBinder object. This object is
bound to the attribute
.
--
Michael
On Aug 30, 2008, at 10:00 PM, Michael Link wrote:
I have a situation where I have a source list whose selection
controls the bindings of an NSArrayController, and thus the content
of a view. Depending on what source a user selects in the source
list the NSArrayController can have
I have a situation where I have a source list whose selection controls
the bindings of an NSArrayController, and thus the content of a view.
Depending on what source a user selects in the source list the
NSArrayController can have its MOC bound and a fetch predicate set or
its contentSet bo
I've run into a problem when using NSPersistentDocument that uses a
SQLite store and the application uses garbage collection. After one or
more saves on a document the application will hang while trying to
perform a save. A backtrace indicates that the hang occurs in a sqlite
function that
On Jun 5, 2008, at 4:37 PM, Ben Trumbull wrote:
On Jun 3, 2008, at 8:15 PM, Michael Link wrote:
Is there a reason you're not using Core Data's -
mergeChangesFromContextDidSaveNotification: ?
If the object is modified (inserted, update, or deleted), you
should pass
On Jun 3, 2008, at 5:52 PM, Ben Trumbull wrote:
Michael,
This error is almost always a multi-threading problem. When you
used the _debug version of Core Data, did you enable the threading
assertions with the user default -com.apple.CoreData.ThreadingDebug
3 ?
Yes, I also see this in t
The goal is to do insertions/changes/deletes on a background thread
and then after a save merge those changes into the main threads
managed object context and thus update the UI.
I have a situation where NSManagedObjectContextDidSaveNotification is
forwarded from a background thread's manag
I noticed that if you have a transient attribute in an NSManagedObject
and update that attribute then isUpdated will return that the object
has unsaved changes. I suppose this makes some sense if the attribute
is actually defined in the entity. On the other hand if the managed
object has a
36 matches
Mail list logo