Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-3185

SourceTree freezes during startup in OS 10.11 (El Capitan)

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 2.0.5.4
    • None
    • None
    • None

      Note: This affects 2.0.5.3 as well. (It is not yet available in the "Affects Version/s" dropdown list)

      For some users, when they open up SourceTree in El Capitan, it freezes (but does not crash).

      If user performs a right click on the SourceTree app at the dock, user will find that there's another window called "Authenticate" behind the scene, but no one will be able to reach to that window:

      The only known workaround is to wipe off SourceTree's preferences, and then perform a backup:

      SourceTree will then run smoothly.

          Form Name

            [SRCTREE-3185] SourceTree freezes during startup in OS 10.11 (El Capitan)

            Manju added a comment -

            Manju added a comment - Changes pushed to repo and pull requested submitted - https://bitbucket.org/atlassian/sourcetree/pull-requests/13/srctree-3185-sourcetree-freezes-during/diff

            Manju added a comment -

            Analysis -
            For some reason, SourceTree needs the user to authenticate. The Hosting account's task manager needs user's password for a specific URL. While doing this, an instance of STAuthWindowController is instantiated by the class STGeneral. However, this entire operation is happening on a non-main thread and the authWindow is attempted to be shown modally without ensuring its done on main thread.

            Root cause: running NSApp runModalForWindow: on a non main thread.

            Solution: Force all calls to NSApp runModalForWindow: calls to display auth window to main thread.

            Manju added a comment - Analysis - For some reason, SourceTree needs the user to authenticate. The Hosting account's task manager needs user's password for a specific URL. While doing this, an instance of STAuthWindowController is instantiated by the class STGeneral. However, this entire operation is happening on a non-main thread and the authWindow is attempted to be shown modally without ensuring its done on main thread. Root cause: running NSApp runModalForWindow: on a non main thread. Solution: Force all calls to NSApp runModalForWindow: calls to display auth window to main thread.

            Manju added a comment - - edited

            Logs obtained from Vivian,
            Oct 9 01:53:47 SourceTree[3824] <Warning>: void CGSUpdateManager::log() const: conn 0x25a4f: spurious update.
            2015-10-09 01:53:48.116 SourceTree[3824:47063] Total files to gzip: 1
            Time taken to gzip: 0.183206
            2015-10-09 01:53:48.116 SourceTree[3824:47063] Total files to cull: 1
            Time taken to cull: 0.000000
            Files remaining: 1
            2015-10-09 01:53:48.116 SourceTree[3824:47063] Uploading file "20151008_93EFD997-36B8-4A04-A065-2CAA03D4D9D0.txt.gz"
            2015-10-09 01:53:49.569 SourceTree[3824:42765] This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.
            Stack
            0 CoreFoundation 0x00007fff93f4abd2 __exceptionPreprocess + 178
            1 libobjc.A.dylib 0x00007fff8832f4fa objc_exception_throw + 48
            2 CoreFoundation 0x00007fff93fb13fd +[NSException raise:format:] + 205
            3 Foundation 0x00007fff96ee2761 _AssertAutolayoutOnMainThreadOnly + 79
            4 Foundation 0x00007fff96ee25b6 -[NSISEngine withBehaviors:performModifications:] + 31
            5 AppKit 0x00007fff95f9cba2 -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 70
            6 AppKit 0x00007fff96030d4a __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke + 485
            7 AppKit 0x00007fff95fa7906 -[NSView(NSConstraintBasedLayout) _setLayoutEngine:] + 233
            8 AppKit 0x00007fff96030b4a make_and_host_engine + 335
            9 AppKit 0x00007fff960306e8 -[NSView(NSConstraintBasedLayout) _didChangeHostsAutolayoutEngineTo:] + 179
            10 AppKit 0x00007fff9600d3fa -[NSView(NSConstraintBasedLayout) _engageAutolayout] + 81
            11 AppKit 0x00007fff9600d417 -[NSView(NSConstraintBasedLayout) _engageAutolayout] + 110
            12 AppKit 0x00007fff95fd36aa -[NSView(NSConstraintBasedLayout) _layoutEngine_windowDidChange] + 92
            13 AppKit 0x00007fff95fd3527 __21-[NSView _setWindow:]_block_invoke586 + 67
            14 AppKit 0x00007fff95f9e920 -[NSView _setWindow:] + 1567
            15 AppKit 0x00007fff95f9b947 -[NSView addSubview:] + 475
            16 AppKit 0x00007fff95fd9b0a -[NSFrameView addSubview:] + 45
            17 AppKit 0x00007fff95fd9ad0 -[NSThemeFrame addSubview:] + 400
            18 AppKit 0x00007fff95fd96f0 -[NSView addSubview:positioned:relativeTo:] + 211
            19 AppKit 0x00007fff95fd960a -[NSThemeFrame _addKnownSubview:positioned:relativeTo:] + 60
            20 AppKit 0x00007fff96003458 -[NSWindow setContentView:] + 638
            21 AppKit 0x00007fff96047ce7 -[NSWindowTemplate nibInstantiate] + 854
            22 AppKit 0x00007fff95f8b2e3 -[NSIBObjectData instantiateObject:] + 309
            23 AppKit 0x00007fff95f8a967 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 428
            24 AppKit 0x00007fff95f81bc5 loadNib + 384
            25 AppKit 0x00007fff95f810d5 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 300
            26 AppKit 0x00007fff961f26b9 +[NSBundle(NSNibLoadingInternal) _loadNibFile:externalNameTable:options:withZone:] + 150
            27 AppKit 0x00007fff961f2471 -[NSWindowController loadWindow] + 310
            28 AppKit 0x00007fff95fcf614 -[NSWindowController window] + 80
            29 SourceTree 0x0000000100098ae9 getPasswordForURL + 345
            30 SourceTree 0x0000000100230603 -[STHostingAccount taskManager] + 675
            31 SourceTree 0x00000001000b3551 -[STRepoAvatarCache bitbucketIcon:] + 1105
            32 SourceTree 0x00000001000b27f8 __39-[STRepoAvatarCache findIcon:callback:]_block_invoke + 488
            33 SourceTree 0x00000001002ce9b8 __39-[STDispatcher launchBlock:type:entry:]_block_invoke + 40
            34 libdispatch.dylib 0x0000000100740032 _dispatch_call_block_and_release + 12
            35 libdispatch.dylib 0x0000000100732d0d _dispatch_client_callout + 8
            36 libdispatch.dylib 0x000000010073749f _dispatch_root_queue_drain + 2934
            37 libdispatch.dylib 0x00000001007368ed _dispatch_worker_thread3 + 106
            38 libsystem_pthread.dylib 0x0000000100795346 _pthread_wqthread + 1129
            39 libsystem_pthread.dylib 0x0000000100792f9d start_wqthread + 13
            )

            Manju added a comment - - edited Logs obtained from Vivian, Oct 9 01:53:47 SourceTree [3824] <Warning>: void CGSUpdateManager::log() const: conn 0x25a4f: spurious update. 2015-10-09 01:53:48.116 SourceTree [3824:47063] Total files to gzip: 1 Time taken to gzip: 0.183206 2015-10-09 01:53:48.116 SourceTree [3824:47063] Total files to cull: 1 Time taken to cull: 0.000000 Files remaining: 1 2015-10-09 01:53:48.116 SourceTree [3824:47063] Uploading file "20151008_93EFD997-36B8-4A04-A065-2CAA03D4D9D0.txt.gz" 2015-10-09 01:53:49.569 SourceTree [3824:42765] This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release. Stack 0 CoreFoundation 0x00007fff93f4abd2 __exceptionPreprocess + 178 1 libobjc.A.dylib 0x00007fff8832f4fa objc_exception_throw + 48 2 CoreFoundation 0x00007fff93fb13fd + [NSException raise:format:] + 205 3 Foundation 0x00007fff96ee2761 _AssertAutolayoutOnMainThreadOnly + 79 4 Foundation 0x00007fff96ee25b6 - [NSISEngine withBehaviors:performModifications:] + 31 5 AppKit 0x00007fff95f9cba2 - [NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 70 6 AppKit 0x00007fff96030d4a __52- [NSView(NSConstraintBasedLayout) _setLayoutEngine:] _block_invoke + 485 7 AppKit 0x00007fff95fa7906 - [NSView(NSConstraintBasedLayout) _setLayoutEngine:] + 233 8 AppKit 0x00007fff96030b4a make_and_host_engine + 335 9 AppKit 0x00007fff960306e8 - [NSView(NSConstraintBasedLayout) _didChangeHostsAutolayoutEngineTo:] + 179 10 AppKit 0x00007fff9600d3fa - [NSView(NSConstraintBasedLayout) _engageAutolayout] + 81 11 AppKit 0x00007fff9600d417 - [NSView(NSConstraintBasedLayout) _engageAutolayout] + 110 12 AppKit 0x00007fff95fd36aa - [NSView(NSConstraintBasedLayout) _layoutEngine_windowDidChange] + 92 13 AppKit 0x00007fff95fd3527 __21- [NSView _setWindow:] _block_invoke586 + 67 14 AppKit 0x00007fff95f9e920 - [NSView _setWindow:] + 1567 15 AppKit 0x00007fff95f9b947 - [NSView addSubview:] + 475 16 AppKit 0x00007fff95fd9b0a - [NSFrameView addSubview:] + 45 17 AppKit 0x00007fff95fd9ad0 - [NSThemeFrame addSubview:] + 400 18 AppKit 0x00007fff95fd96f0 - [NSView addSubview:positioned:relativeTo:] + 211 19 AppKit 0x00007fff95fd960a - [NSThemeFrame _addKnownSubview:positioned:relativeTo:] + 60 20 AppKit 0x00007fff96003458 - [NSWindow setContentView:] + 638 21 AppKit 0x00007fff96047ce7 - [NSWindowTemplate nibInstantiate] + 854 22 AppKit 0x00007fff95f8b2e3 - [NSIBObjectData instantiateObject:] + 309 23 AppKit 0x00007fff95f8a967 - [NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 428 24 AppKit 0x00007fff95f81bc5 loadNib + 384 25 AppKit 0x00007fff95f810d5 + [NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 300 26 AppKit 0x00007fff961f26b9 + [NSBundle(NSNibLoadingInternal) _loadNibFile:externalNameTable:options:withZone:] + 150 27 AppKit 0x00007fff961f2471 - [NSWindowController loadWindow] + 310 28 AppKit 0x00007fff95fcf614 - [NSWindowController window] + 80 29 SourceTree 0x0000000100098ae9 getPasswordForURL + 345 30 SourceTree 0x0000000100230603 - [STHostingAccount taskManager] + 675 31 SourceTree 0x00000001000b3551 - [STRepoAvatarCache bitbucketIcon:] + 1105 32 SourceTree 0x00000001000b27f8 __39- [STRepoAvatarCache findIcon:callback:] _block_invoke + 488 33 SourceTree 0x00000001002ce9b8 __39- [STDispatcher launchBlock:type:entry:] _block_invoke + 40 34 libdispatch.dylib 0x0000000100740032 _dispatch_call_block_and_release + 12 35 libdispatch.dylib 0x0000000100732d0d _dispatch_client_callout + 8 36 libdispatch.dylib 0x000000010073749f _dispatch_root_queue_drain + 2934 37 libdispatch.dylib 0x00000001007368ed _dispatch_worker_thread3 + 106 38 libsystem_pthread.dylib 0x0000000100795346 _pthread_wqthread + 1129 39 libsystem_pthread.dylib 0x0000000100792f9d start_wqthread + 13 )

              Unassigned Unassigned
              gkoh Gideon Koh (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: