{"action":"created","issue":{"url":"https://api.github.com/repos/coteditor/CotEditor/issues/663","repository_url":"https://api.github.com/repos/coteditor/CotEditor","labels_url":"https://api.github.com/repos/coteditor/CotEditor/issues/663/labels{/name}","comments_url":"https://api.github.com/repos/coteditor/CotEditor/issues/663/comments","events_url":"https://api.github.com/repos/coteditor/CotEditor/issues/663/events","html_url":"https://github.com/coteditor/CotEditor/issues/663","id":197123129,"number":663,"title":"Crash on Replace All","user":{"login":"1024jp","id":1165044,"avatar_url":"https://avatars2.githubusercontent.com/u/1165044?v=3","gravatar_id":"","url":"https://api.github.com/users/1024jp","html_url":"https://github.com/1024jp","followers_url":"https://api.github.com/users/1024jp/followers","following_url":"https://api.github.com/users/1024jp/following{/other_user}","gists_url":"https://api.github.com/users/1024jp/gists{/gist_id}","starred_url":"https://api.github.com/users/1024jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024jp/subscriptions","organizations_url":"https://api.github.com/users/1024jp/orgs","repos_url":"https://api.github.com/users/1024jp/repos","events_url":"https://api.github.com/users/1024jp/events{/privacy}","received_events_url":"https://api.github.com/users/1024jp/received_events","type":"User","site_admin":false},"labels":[{"id":449626183,"url":"https://api.github.com/repos/coteditor/CotEditor/labels/bug%20(works%20for%20me)","name":"bug (works for me)","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":{"login":"1024jp","id":1165044,"avatar_url":"https://avatars2.githubusercontent.com/u/1165044?v=3","gravatar_id":"","url":"https://api.github.com/users/1024jp","html_url":"https://github.com/1024jp","followers_url":"https://api.github.com/users/1024jp/followers","following_url":"https://api.github.com/users/1024jp/following{/other_user}","gists_url":"https://api.github.com/users/1024jp/gists{/gist_id}","starred_url":"https://api.github.com/users/1024jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024jp/subscriptions","organizations_url":"https://api.github.com/users/1024jp/orgs","repos_url":"https://api.github.com/users/1024jp/repos","events_url":"https://api.github.com/users/1024jp/events{/privacy}","received_events_url":"https://api.github.com/users/1024jp/received_events","type":"User","site_admin":false},"assignees":[{"login":"1024jp","id":1165044,"avatar_url":"https://avatars2.githubusercontent.com/u/1165044?v=3","gravatar_id":"","url":"https://api.github.com/users/1024jp","html_url":"https://github.com/1024jp","followers_url":"https://api.github.com/users/1024jp/followers","following_url":"https://api.github.com/users/1024jp/following{/other_user}","gists_url":"https://api.github.com/users/1024jp/gists{/gist_id}","starred_url":"https://api.github.com/users/1024jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024jp/subscriptions","organizations_url":"https://api.github.com/users/1024jp/orgs","repos_url":"https://api.github.com/users/1024jp/repos","events_url":"https://api.github.com/users/1024jp/events{/privacy}","received_events_url":"https://api.github.com/users/1024jp/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-12-22T08:49:06Z","updated_at":"2017-05-24T14:07:23Z","closed_at":null,"body":"It seems that the replacing all conflicts with Document's auto-saving.\r\n\r\n\r\n## Environment\r\n\r\n- CotEditor: 3.1.2 (177)\r\n- System: macOS Version 10.12.2 (Build 16C67)\r\n- Language: Japanese\r\n\r\n\r\n## Short Description\r\n\r\nCotEditor crashes often during processing Replace All.\r\n\r\n## Example of Crash Logs\r\n\r\n```\r\nProcess:               CotEditor [306]\r\nPath:                  /Applications/CotEditor.app/Contents/MacOS/CotEditor\r\nIdentifier:            com.coteditor.CotEditor\r\nVersion:               3.1.2 (177)\r\nApp Item ID:           1024640650\r\nApp External ID:       820007077\r\nCode Type:             X86-64 (Native)\r\nParent Process:        ??? [1]\r\nResponsible:           CotEditor [306]\r\nUser ID:               501\r\n\r\nDate/Time:             2016-12-20 23:16:52.479 +0900\r\nOS Version:            Mac OS X 10.12.2 (16C67)\r\nReport Version:        12\r\nAnonymous UUID:        2BAC21A0-2E0B-42E9-B137-22D63C67CB01\r\n\r\n\r\nTime Awake Since Boot: 46000 seconds\r\n\r\nSystem Integrity Protection: enabled\r\n\r\nCrashed Thread:        4  Dispatch queue: com.apple.root.default-qos\r\n\r\nException Type:        EXC_BAD_ACCESS (SIGSEGV)\r\nException Codes:       KERN_INVALID_ADDRESS at 0x000057521b88bec0\r\nException Note:        EXC_CORPSE_NOTIFY\r\n\r\nTermination Signal:    Segmentation fault: 11\r\nTermination Reason:    Namespace SIGNAL, Code 0xb\r\nTerminating Process:   exc handler [0]\r\n\r\nVM Regions Near 0x57521b88bec0:\r\n    mapped file            00000001349ea000-0000000134f0b000 [ 5252K] r--/rwx SM=COW  p\\Q\u000E\r\n--> \r\n    MALLOC_NANO            0000600000000000-0000600001c00000 [ 28.0M] rw-/rwx SM=PRV  \r\n\r\nApplication Specific Information:\r\nobjc_msgSend() selector name: addBreadcrumb:\r\n\r\n\r\nThread 0:: Dispatch queue: com.apple.main-thread\r\n0   libsystem_kernel.dylib        \t0x00007fffd38003b2 __ulock_wait + 10\r\n1   libsystem_platform.dylib      \t0x00007fffd38e1b5f _os_ulock_wait + 25\r\n2   libsystem_platform.dylib      \t0x00007fffd38e1432 _os_unfair_lock_lock_slow + 130\r\n3   com.apple.QuartzCore          \t0x00007fffc3e22fb7 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 145\r\n4   com.apple.CoreFoundation      \t0x00007fffbe0f32d7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23\r\n5   com.apple.CoreFoundation      \t0x00007fffbe0f3247 __CFRunLoopDoObservers + 391\r\n6   com.apple.CoreFoundation      \t0x00007fffbe0d426e __CFRunLoopRun + 1214\r\n7   com.apple.CoreFoundation      \t0x00007fffbe0d3b54 CFRunLoopRunSpecific + 420\r\n8   com.apple.HIToolbox           \t0x00007fffbd65eacc RunCurrentEventLoopInMode + 240\r\n9   com.apple.HIToolbox           \t0x00007fffbd65e901 ReceiveNextEventCommon + 432\r\n10  com.apple.HIToolbox           \t0x00007fffbd65e736 _BlockUntilNextEventMatchingListInModeWithFilter + 71\r\n11  com.apple.AppKit              \t0x00007fffbbc04ae4 _DPSNextEvent + 1120\r\n12  com.apple.AppKit              \t0x00007fffbc37f21f -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2789\r\n13  com.apple.AppKit              \t0x00007fffbbbf9465 -[NSApplication run] + 926\r\n14  com.apple.AppKit              \t0x00007fffbbbc3d80 NSApplicationMain + 1237\r\n15  com.coteditor.CotEditor       \t0x000000010d242ae9 0x10d23b000 + 31465\r\n16  libdyld.dylib                 \t0x00007fffd36d1255 start + 1\r\n\r\nThread 4 Crashed:: Dispatch queue: com.apple.root.default-qos\r\n0   libobjc.A.dylib               \t0x00007fffd2de1b5d objc_msgSend + 29\r\n1   com.apple.AppKit              \t0x00007fffbc742a7f __85-[NSDocument(NSDocumentSaving) _saveToURL:ofType:forSaveOperation:completionHandler:]_block_invoke_4.1040 + 271\r\n2   libdispatch.dylib             \t0x00007fffd36a3ef7 _dispatch_call_block_and_release + 12\r\n3   libdispatch.dylib             \t0x00007fffd369b0b8 _dispatch_client_callout + 8\r\n4   libdispatch.dylib             \t0x00007fffd36aa266 _dispatch_queue_override_invoke + 743\r\n5   libdispatch.dylib             \t0x00007fffd369ce70 _dispatch_root_queue_drain + 476\r\n6   libdispatch.dylib             \t0x00007fffd369cc47 _dispatch_worker_thread3 + 99\r\n7   libsystem_pthread.dylib       \t0x00007fffd38e8712 _pthread_wqthread + 1299\r\n8   libsystem_pthread.dylib       \t0x00007fffd38e81ed start_wqthread + 13\r\n```"},"comment":{"url":"https://api.github.com/repos/coteditor/CotEditor/issues/comments/303734671","html_url":"https://github.com/coteditor/CotEditor/issues/663#issuecomment-303734671","issue_url":"https://api.github.com/repos/coteditor/CotEditor/issues/663","id":303734671,"user":{"login":"1024jp","id":1165044,"avatar_url":"https://avatars2.githubusercontent.com/u/1165044?v=3","gravatar_id":"","url":"https://api.github.com/users/1024jp","html_url":"https://github.com/1024jp","followers_url":"https://api.github.com/users/1024jp/followers","following_url":"https://api.github.com/users/1024jp/following{/other_user}","gists_url":"https://api.github.com/users/1024jp/gists{/gist_id}","starred_url":"https://api.github.com/users/1024jp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1024jp/subscriptions","organizations_url":"https://api.github.com/users/1024jp/orgs","repos_url":"https://api.github.com/users/1024jp/repos","events_url":"https://api.github.com/users/1024jp/events{/privacy}","received_events_url":"https://api.github.com/users/1024jp/received_events","type":"User","site_admin":false},"created_at":"2017-05-24T14:07:23Z","updated_at":"2017-05-24T14:07:23Z","body":"@marc-medley Thank you for digging into the bug. It helps me a lot.\r\n\r\n> Possibly, the \"Crash on Replace All\" title would better represent the problem as \"(Occassional) Crash when asynchronous save occurs during edits.\"\r\n\r\nThat's right. This crash may happen on the competition between text editing and background saving. I changed the title follwing your suggestion.\r\n\r\nProbably, 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..."}}
{"actor":{"display_login":"1024jp"}}