NSImage leaks open file in 10.8.2?

2013-02-13 Thread norbert
Hi,

while testing the latest version of my software in 10.8.2, I noticed that there 
are a lot of open files, more than in 10.6.8. 

I tracked it down to an animation I use, and the png files I load for that.

In Mac OS X 10.6.8, it works fine, and closes the image files after use. But in 
10.8.2, it keeps every single one of them open.

Here is the code I use:

NSImage *nextImage = [NSImage 
imageNamed:@"Animator1.png"];
if (nextImage != NULL)
[myImageView setImage:nextImage];

myImageView is a regular NSImageView. The app is non GC, and non ARC.

Is that a new "feature" of Mountain Lion?

The problem is that my software deals with a LOT of files, and so it would be 
nice to keep the number of open files as small as possible at any time.

And ideas?

Thank you!


Norbert M. Doerner
ndoer...@wfs-apps.de

CEO, West-Forest-Systems
In der Trift 13
56459 Langenhahn, Germany
Fon: +49 (2663) 91 70 128   (Central European Time Zone...)
Fax: +49 (2663) 91 70 126
AIM (iChat), Skype: cdfinderceo
Twitter: http://www.twitter.com/neofinder
Facebook: http://www.facebook.com/NeoFinder
---
NeoFinder - The Search Is Over!  http://www.neofinder.de/
Catalog and organize your photos, music, videos, disks, data, anything...
NEW:  NeoFinder 6.0.1 for Mac (was CDFinder)
---

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSUserNotificationCenter: Spoofing the app name/icon?

2013-02-13 Thread jonat...@mugginsoft.com
Is it not possible to use IPC to have the helper message the client app so that 
the client does the actual posting?

Regards

Jonathan Mitchell
Mugginsoft LLP


On 12 Feb 2013, at 22:01, Nick Zitzmann  wrote:

> Short question: How do I spoof the application name & icon when a 
> notification from an application is posted to NSUserNotificationCenter?
> 
> Long question: I've searched around and didn't find a solution to this 
> problem. We have a helper app, and we'd like that helper app to post user 
> notifications. Since the helper app is a menu-less LSUIElement, the app is 
> invisible to users. But when it posts a user notification, it posts the 
> notification under the name of the helper app. We'd like it to post the user 
> notification under the name of the app that the helper app helps, and use a 
> different icon if at all possible. How do I do that? It should be possible 
> because I suspect CalendarAgent is spoofing Calendar.app…
> 
> Nick Zitzmann
> 
> 
> 

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Pointer was being free was not allocated

2013-02-13 Thread anni saini


Hi,

Can anybody know how to resolve the issue of  "Pointer was being free was not 
allocated" I was facing this issue with my project on 10.7 and 10.8 however the 
code works perfectly fine on 10.6. Any idea what is causing this?

Thanks.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Pointer was being free was not allocated

2013-02-13 Thread Uli Kusterer
Sounds like a classic memory management error. Either you are using a pointer 
to an object after you've released it, or you are keeping an autoreleased 
pointer beyond the lifetime of the current autorelease pool without retaining 
it, or a pointer to an object inside an NSArray or NSDictionary after you've 
released the array. Often people also do this by e.g. forgetting to retain an 
object when they place it into an instance variable of another object. Or 
handing the -bytes pointer of an NSData object to some C code that then tries 
to call DisposePtr() or free() on it (in which case you should copy the NSData 
into a newly malloc()ed pointer.

If it's not that, then you're likely declaring a local variable or malloc()ing 
a struct somewhere and forgetting to initialize it to 0 (or in some other way 
remembering that you haven't allocated memory of a pointer in it). Only objects 
are initialized to 0 when you allocate them.

A good exercise is to set all pointer variables to nil (or NULL, for 
non-objects) right when declaring them, and setting them back to that again 
right after you call release on them.

There's also a final, much less likely possibility: That there is actually a 
bug in some MacOS API you are using. But that is rather unlikely. That you have 
the bug on 17.7+ but not on 10.6 could mean the bug is new with 10.6. OTOH it 
could also mean that 10.6 had a bug that was fixed in 10.7, or that you wrote 
code assuming a bug in 10.6 was how it's supposed to be even though the 
documentation (and fixed behavior in 10.7 and later) corrected it. Much more 
likely, however, the bug is yours and already there in 10.6, and Apple just 
added a few more sanity checks in 10.7 and hence it's the first time you get 
reliably warned about your mistake.

(Of course, if you're using ARC instead of manual retain/release, the above can 
also happen, but are much harder to track down because you're only indirectly 
causing the compiler to insert the "wrong" retain/release calls, they're not 
explicit in your code)

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

On Feb 13, 2013, at 12:50 PM, anni saini  wrote:
> Can anybody know how to resolve the issue of  "Pointer was being free was not 
> allocated" I was facing this issue with my project on 10.7 and 10.8 however 
> the code works perfectly fine on 10.6. Any idea what is causing this?


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Pointer was being free was not allocated

2013-02-13 Thread Scott Ribe
On Feb 13, 2013, at 4:50 AM, anni saini wrote:

> Can anybody know how to resolve the issue of  "Pointer was being free was not 
> allocated" I was facing this issue with my project on 10.7 and 10.8 however 
> the code works perfectly fine on 10.6. Any idea what is causing this?

You're probably freeing a pointer that has already been freed--in other words 
"not currently allocated" as opposed to "never allocated".

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSLinguisticTagger & alarm strings

2013-02-13 Thread Eric E. Dolecki
Greetings,

I am new to NSLinguisticTagger and I'm trying to set up an alarm set based
on string... "Wake me up at 9 AM" "Set alarm for 10 AM tomorrow" - that
sort of thing.

What is the best way to tackle this? Should I use NSLinguisticTagger? If
so, what's the best way to set it up? I could use something where I look
for ranges of expected strings and set it up that way but it seems like
that could be long-winded and fragile.

Interesting that "Wake me up at 9 AM" has the "Wake" translate as a noun.
Perhaps I just don't know how to properly set the thing up...

Thanks,
Eric
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Uploading photos to iCloud programatically

2013-02-13 Thread James Montgomerie
If you save images to the camera roll the system will automatically upload them 
to the photo stream, just as if they'd been taken with the camera.

Jamie.

On 7 Feb 2013, at 05:42, Balaji M  wrote:

> Hi,
> 
> I am writing a Mac application which is expected to support uploading
> photos to iCloud.
> After browsing many sites, I feel there is NO developer API to enable
> application to upload directly to photostream.
> My question is:
> Is there any alternative way for applications to upload photos to
> Photostream?
> If not, how about considering photos as NSDocuments and uploading to iCloud?
> 
> Please provide me some pointers for accomplishing this feature in my Mac
> app.
> Thanks in advance.
> 
> Regards,
> Balaji M.
> +91 8088640610
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/jamie%40montgomerie.net
> 
> This email sent to ja...@montgomerie.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Uploading photos to iCloud programatically

2013-02-13 Thread Kyle Sluder
On Wed, Feb 13, 2013, at 08:26 AM, James Montgomerie wrote:
> If you save images to the camera roll the system will automatically
> upload them to the photo stream, just as if they'd been taken with the
> camera.

I don't think you can save them to named photo streams this way though.

I know that I have to manually move images into my named photo streams
in order to share them.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSUserNotificationCenter: Spoofing the app name/icon?

2013-02-13 Thread Nick Zitzmann

On Feb 13, 2013, at 3:25 AM, jonat...@mugginsoft.com wrote:

> Is it not possible to use IPC to have the helper message the client app so 
> that the client does the actual posting?

The client might not be running at the time.

Nick Zitzmann



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSUserNotificationCenter: Spoofing the app name/icon?

2013-02-13 Thread Lee Ann Rucker
I know from experience that it doesn't use the name from the app that sent the 
notification; we hit a case where someone who'd been testing an earlier version 
that they'd renamed to include the version number was seeing that name in the 
Notification Center even after that copy had been deleted. I checked; it wasn't 
pulling it from the Launch Services database either.

I filed a bug, it was marked as a dup of rdar://12171824

On Feb 13, 2013, at 9:51 AM, Nick Zitzmann wrote:

> 
> On Feb 13, 2013, at 3:25 AM, jonat...@mugginsoft.com wrote:
> 
>> Is it not possible to use IPC to have the helper message the client app so 
>> that the client does the actual posting?
> 
> The client might not be running at the time.
> 
> Nick Zitzmann
> 
> 
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com
> 
> This email sent to lruc...@vmware.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSImage leaks open file in 10.8.2?

2013-02-13 Thread Nick Zitzmann

On Feb 13, 2013, at 2:12 AM, norbert  wrote:

> In Mac OS X 10.6.8, it works fine, and closes the image files after use. But 
> in 10.8.2, it keeps every single one of them open.
> 
> Here is the code I use:
> 
>   NSImage *nextImage = [NSImage 
> imageNamed:@"Animator1.png"];
>   if (nextImage != NULL)
>   [myImageView setImage:nextImage];
> 
> myImageView is a regular NSImageView. The app is non GC, and non ARC.
> 
> Is that a new "feature" of Mountain Lion?

Maybe. +imageNamed: does some caching behind the scenes, and this is explained 
in the method's documentation. If you need image files to be opened, read into 
memory, and then closed, then the first thing I would try is initializing them 
from unmapped NSData objects created using 
+dataWithContentsOfURL:options:error:.

Nick Zitzmann



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


iOS Document Interaction Technology

2013-02-13 Thread koko
I have the CFBundleDocumentTyes array properly defined.

I run my app on the iPad, which I understand, should register support for the 
document types in CFBundleDocumentTyes with the system.

What I expect is that choosing a file of my supported type in DropBox will 
inform the user that my app can handle the file type.  This does not happen.

Am I overlooking something?

-koko
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Pointer was being free was not allocated

2013-02-13 Thread Sean McBride
On Wed, 13 Feb 2013 19:50:29 +0800, anni saini said:

>Can anybody know how to resolve the issue of  "Pointer was being free
>was not allocated" I was facing this issue with my project on 10.7 and
>10.8 however the code works perfectly fine on 10.6. Any idea what is
>causing this?

There are lots of great debug tools to track this kind of thing down.  Search 
for: valgrind, guard malloc, address sanitizer.

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSImage leaks open file in 10.8.2?

2013-02-13 Thread Kyle Sluder
On Wed, Feb 13, 2013, at 12:54 PM, Nick Zitzmann wrote:
> 
> On Feb 13, 2013, at 2:12 AM, norbert  wrote:
> 
> > In Mac OS X 10.6.8, it works fine, and closes the image files after use. 
> > But in 10.8.2, it keeps every single one of them open.
> > 
> > Here is the code I use:
> > 
> > NSImage *nextImage = [NSImage 
> > imageNamed:@"Animator1.png"];
> > if (nextImage != NULL)
> > [myImageView setImage:nextImage];
> > 
> > myImageView is a regular NSImageView. The app is non GC, and non ARC.
> > 
> > Is that a new "feature" of Mountain Lion?
> 
> Maybe. +imageNamed: does some caching behind the scenes, and this is
> explained in the method's documentation. If you need image files to be
> opened, read into memory, and then closed, then the first thing I would
> try is initializing them from unmapped NSData objects created using
> +dataWithContentsOfURL:options:error:.

Easier than that, you can just call -setCacheMode:NSImageCacheNever to
disable caching.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS Document Interaction Technology

2013-02-13 Thread Jerry Krinock

On 2013 Feb 13, at 13:31, koko  wrote:

> I run my app on the iPad, which I understand, should register support for the 
> document types in CFBundleDocumentTyes with the system.  What I expect is 
> that choosing a file of my supported type in DropBox will inform the user 
> that my app can handle the file type.  This does not happen.

I think the problem is: "Welcome to iOS".  The iPad is not a Mac, koko.

More to the point, I think that you need Dropbox to explicitly support your 
document type.  A more practical alternative is to pass the document via Apps > 
File Sharing in iTunes.

But I'm only writing as an iPad user.  Maybe an iOS developer who has actually 
done this could please reply with more accurate information.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


faster deep copies?

2013-02-13 Thread James Maxwell
I've run into a situation where I really need a deep copy of an object. I've 
implemented this using Apple's recommended approach with 
NSKeyedArchiver/Unarchiver, and it's nice, simple, and functional. But it's 
also pretty darn slow -- as in a clear, subjectively apparent performance hit.
Has anybody had to find a way around this, and if so, what did you do? Or if 
anybody just has a nice, creative thought about another way of doing it, I'd 
love to hear about it.
 
The object(s) being copied are custom classes, and there's a chance I may be 
able to get away with copying only certain properties (i.e., rather than 
archiving the entire graph from the root object), so I'll look into making a 
"deepCopy" method that's more selective. But I'd appreciate any thoughts in the 
meantime.

Thanks in advance.

J.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: faster deep copies?

2013-02-13 Thread Ken Thomases
On Feb 13, 2013, at 8:07 PM, James Maxwell wrote:

> I've run into a situation where I really need a deep copy of an object. I've 
> implemented this using Apple's recommended approach with 
> NSKeyedArchiver/Unarchiver, and it's nice, simple, and functional. But it's 
> also pretty darn slow -- as in a clear, subjectively apparent performance hit.
> Has anybody had to find a way around this, and if so, what did you do? Or if 
> anybody just has a nice, creative thought about another way of doing it, I'd 
> love to hear about it.
> 
> The object(s) being copied are custom classes, and there's a chance I may be 
> able to get away with copying only certain properties (i.e., rather than 
> archiving the entire graph from the root object), so I'll look into making a 
> "deepCopy" method that's more selective. But I'd appreciate any thoughts in 
> the meantime.

I'd expect a -deepCopy method to be substantially faster even if it weren't any 
more selective about which properties get copied.  The main difficulty is when 
your object graph may have cycles or diamonds.  Archiving will store each 
object exactly once and all references to it will refer to that; then, on 
unarchiving, the references will be restored properly.  A naive deep copy will 
cause an object which is referenced from two points in the object graph to end 
up as two separate objects in the new graph.  And cycles can cause infinite 
recursion.

Your question prompted me to try to design an analog of NSKeyedArchiver, 
NSCode, and NSCoding that would generate the new object graph on the fly as it 
went instead of producing a data object.  The idea is that the copier (the 
analog of the archiver/coder) would know which objects had already been copied 
and so would avoid over-duplicating them in the new graph.  However, that ends 
up being hard because each object has to copy its related object before it's 
complete enough to be registered with the copier.  So, it isn't successful in 
avoiding the potential for infinite recursion.

An obvious question is: have you analyzed the NSKeyedArchiver approach to 
understand why it's slow?

Regards,
Ken


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Is CoreData on iOS ready for prime time for serious work?

2013-02-13 Thread Laurent Daudelin
I just added CoreData to an app I'm working on. I've been working with CoreData 
for about a year, not exclusively but pretty regularly so I think I'm 
experienced enough to set it up properly.

However, our testers are experiencing what I feel is more than normal crashes 
in the main part of the app that depends on CoreData. I'm using an 
NSFetchedResultsController to drive my main table view and that part seems very 
weak and will break or raise an exception at any time for any reason. I'm 
collecting those crashes that can be detected by TestFlight and there is no 
relation between them but they all resolve around CoreData or the main 
tableview.

The heaviest load is when I get a bunch of data from a server that is turned 
into JSON objects and then saved to the database. There can be 200 pretty large 
dictionaries coming at once and they are all saved to the database in a serial 
queue, while at the same time, the fetched results controller sends the usual 
delegate messages to adds those rows to the table view. I would say that 80% of 
the time, it works just fine, but for about 20% of the loads, some involved 
object will raise an exception. Since I'm using multiple threads, and as 
recommended in the doc, I'm using the thread confinement method to perform the 
needed operations that involve the database and managed objects. I have one 
managed object context per thread, but there is really only one, in that serial 
queue, plus the one in the main thread. I implement the 
didReceiveManagedObjectContextSaveNotification: methods to merge the changes on 
the main thread, as recommended. I pass object IDs when I need to access a 
managed object context from one thread to another.

Still, I feel there are way too many crashes.

I have read from older messages that the fetched results controller could get 
confused when issuing updates, moves and inserts back in iOS 3 and 4. But I 
haven't found anything that would lead me to believe that these bugs are still 
present. But, are they? Is it safe to use this technology for some serious 
database work?

Any advice, pointer or info would be greatly appreciated.

Thank you.

-Laurent.
-- 
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 
http://www.nemesys-soft.com/
Logiciels Nemesys Software  
laur...@nemesys-soft.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Is CoreData on iOS ready for prime time for serious work?

2013-02-13 Thread Mark Woollard
I've used CoreData extensively in various apps developed over several years, 
including multi-threaded use on two or more threads, and across multiple data 
stores. Like you have used the confinement method. I've found it very reliable 
except when bugs have broken the confinement model. Then things become 
unreliable with crashes or deadlocks happening unpredictably. I've build a 
framework on top of CoreData to manage contexts across threads and multiple 
data stores and a lot of convenience extensions to CoreData classes to simply 
my code and reduce errors.

Anyway hope this helps.

Regards
Mark

On 14 Feb 2013, at 07:34, Laurent Daudelin  wrote:

> I just added CoreData to an app I'm working on. I've been working with 
> CoreData for about a year, not exclusively but pretty regularly so I think 
> I'm experienced enough to set it up properly.
> 
> However, our testers are experiencing what I feel is more than normal crashes 
> in the main part of the app that depends on CoreData. I'm using an 
> NSFetchedResultsController to drive my main table view and that part seems 
> very weak and will break or raise an exception at any time for any reason. 
> I'm collecting those crashes that can be detected by TestFlight and there is 
> no relation between them but they all resolve around CoreData or the main 
> tableview.
> 
> The heaviest load is when I get a bunch of data from a server that is turned 
> into JSON objects and then saved to the database. There can be 200 pretty 
> large dictionaries coming at once and they are all saved to the database in a 
> serial queue, while at the same time, the fetched results controller sends 
> the usual delegate messages to adds those rows to the table view. I would say 
> that 80% of the time, it works just fine, but for about 20% of the loads, 
> some involved object will raise an exception. Since I'm using multiple 
> threads, and as recommended in the doc, I'm using the thread confinement 
> method to perform the needed operations that involve the database and managed 
> objects. I have one managed object context per thread, but there is really 
> only one, in that serial queue, plus the one in the main thread. I implement 
> the didReceiveManagedObjectContextSaveNotification: methods to merge the 
> changes on the main thread, as recommended. I pass object IDs when I need to 
> access a managed object context from one thread to another.
> 
> Still, I feel there are way too many crashes.
> 
> I have read from older messages that the fetched results controller could get 
> confused when issuing updates, moves and inserts back in iOS 3 and 4. But I 
> haven't found anything that would lead me to believe that these bugs are 
> still present. But, are they? Is it safe to use this technology for some 
> serious database work?
> 
> Any advice, pointer or info would be greatly appreciated.
> 
> Thank you.
> 
> -Laurent.
> -- 
> Laurent Daudelin
> AIM/iChat/Skype:LaurentDaudelin   
> http://www.nemesys-soft.com/
> Logiciels Nemesys Software
> laur...@nemesys-soft.com
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/mark.woollard%40mac.com
> 
> This email sent to mark.wooll...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com