Re: Crash when move open document based app file to trash

2015-04-15 Thread Martin Wierschin
I’m not sure how careful that monitoring is, though, whether it happens continuously, or only at the moment the app or document regains focus. Even if it’s continuous, it can’t be continuous enough, since the OS is multithreaded. There’s always the possibility of a race condition where the

Re: Crash when move open document based app file to trash

2015-04-13 Thread Jonathan Mitchell
On 13 Apr 2015, at 15:01, Mike Abdullah mabdul...@karelia.com wrote: I think the document system monitors the file, and calls -setFileURL: when it detects a change. Good catch there Mike! -setFileURL: does indeed get called immediately the file gets renamed, moved or trashed, I am not

Re: Crash when move open document based app file to trash

2015-04-13 Thread Mike Abdullah
I think the document system monitors the file, and calls -setFileURL: when it detects a change. I’m not sure how careful that monitoring is, though, whether it happens continuously, or only at the moment the app or document regains focus. On 13 Apr 2015, at 14:19, Jonathan Mitchell

Crash when move open document based app file to trash

2015-04-13 Thread Jonathan Mitchell
I have a Cocoa document app that represents a sqlite backed document type (its not CoreData). Users can (and do) delete documents while they are open in the app. The app then crashes in the sqlite data layer whenever data access occurs. The data layer is Mono based, not Cocoa. I want to try and

Re: Crash when move open document based app file to trash

2015-04-13 Thread Jonathan Mitchell
On 13 Apr 2015, at 17:10, Jens Alfke j...@mooseyard.com wrote: On Apr 13, 2015, at 7:01 AM, Mike Abdullah mabdul...@karelia.com wrote: I’m not sure how careful that monitoring is, though, whether it happens continuously, or only at the moment the app or document regains focus. Even

Re: Crash when move open document based app file to trash

2015-04-13 Thread Jens Alfke
On Apr 13, 2015, at 9:36 AM, Jonathan Mitchell jonat...@mugginsoft.com wrote: Of these lack of network support is probably the killer. But I will dig a bit deeper. In my experience, relying on file locking on networked filesystems is playing with fire. There are too many situations

Re: Crash when move open document based app file to trash

2015-04-13 Thread Jens Alfke
On Apr 13, 2015, at 7:01 AM, Mike Abdullah mabdul...@karelia.com wrote: I’m not sure how careful that monitoring is, though, whether it happens continuously, or only at the moment the app or document regains focus. Even if it’s continuous, it can’t be continuous enough, since the OS is