New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Occassional crash when asynchronous save occurs during edits #663
Comments
I have 6 recent crash reports where the "Application Specific Information:" is The failure sequence for the crashes have similar patterns, but are not a precise set of steps. Typically, I'm using CotEditor to gather some notes (often related to some code I'm writing.) So, I'm doing the following types of actions quicky:
Mutiple quick copy and paste between applications with multiple quick selection, copy & paste within CotEditor in a short period of time seems to trigger the crash. (Long time just editing in only CotEditor does not seem to have the problem.) From the crash report, it appears that something on an asynchronous Default Quality of Service dispatch queue makes an illegal access. Maybe something is not thread safe or not done on the appropriate thread? The 6 reports have the following example information in common:
|
Based on the collection of crash reports that I've saved, this issue may be affected within ...
based on the common crash pattern ...
... where Alternately, this may be an issue of how |
Possibly, the "Crash on Replace All" title would better represent the problem as "(Occassional) Crash when asynchronous save occurs during edits." For me, this crash is infrequent, but always with the same crash report signature as noted in previous comments. I've not found a precise sequence, but the following factors are common to the crash event:
Since the specific edits are different with each crash, it's likely that the crash is not specific to any particular edit. |
The "Application Specific Information: selector name: addBreadcrumb:" seems to indicate that NSDocument save internals The Objective-C RuntimeBrowser output of macOS/10.12/AppKit.framework/_NSDocumentSerializationObject.h shows the selector @interface _NSDocumentSerializationObject : NSObject {
NSMutableArray * _breadcrumbs;
// …
}
@property (atomic, readonly) NSArray *breadcrumbs;
// …
- (void)addBreadcrumb:(id)arg1;
- (id)breadcrumbs;
// …
@end Maybe some path or path component (breadcrumb?) which is passed to NSDocument |
@marc-medley Thank you for digging into the bug. It helps me a lot.
That's right. This crash may happen on the competition between text editing and background saving. I changed the title follwing your suggestion. Probably, I need to check whether text is being editing and delay (or cancel) saving while the editing. NSDocument's async-saving is complex & buggy though... |
According to the following discussions and @marc-medley's comment, I now guess this is a kind of bug by Apple. cf. |
In CotEditor 3.2.3, I'll abandon async-autosaving as a trial. |
According to my test with
|
I've finally abandoned async-saving on CotEditor 3.2.3, which was released today. Please reopen this issue thread or open a new issue, if you still have a crash that seems related to this issue. |
It seems that the replacing all conflicts with Document's auto-saving.
Environment
Short Description
CotEditor crashes often during processing Replace All.
Example of Crash Logs
The text was updated successfully, but these errors were encountered: