Sourcetree hangs frequently and randomly
Asked by matthewpritchard:

Edit: I've created a [bug](https://jira.atlassian.com/browse/SRCTREEWIN-11635) for this issue.

Sourcetree has been working fine for months until yesterday when it started hanging. Oddly it seems to work OK when not maximised (although it has occasionally hung in windowed mode too). However, when maximised it seems to hang almost immediately.

I have uninstalled and installed multiple times to no avail.

I am using Sourcetree version 3.1.2. I am using Windows 10 1803 and Visual Studio 2017.

I have tried version 3.0.17 and this does *not* hang however the same exception as below is recorded in the log. Using 3.0.17 solves this issue for me but this seems like a bug introduced in the latest version.

Everytime a hang occurs an exception is recorded in the sourcetree.log.   

ERROR \[2019-04-16 11:59:11,673\] \[6\] \[SourceTree.Analytics.NPS.Service.NPSFeedbackService\] \[Log\] - NPS: Couldn't record shown prompt  
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---\> System.Net.WebException: The remote name could not be resolved: 'sourcetree-nps-bridge.us-east-1.prod.public.atl-paas.net'  
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext\& context)  
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)  
--- End of inner exception stack trace ---  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at SourceTree.Analytics.NPS.Transport.AuthHttpClientHandler.\<SendAsync\>d__2.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at System.Net.Http.HttpClient.\<FinishSendAsyncBuffered\>d__58.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at Refit.RequestBuilderImplementation.\<\>c__DisplayClass17_0.\<\<BuildVoidTaskFuncForMethod\>b__0\>d.MoveNext()  
--- End of stack trace from previous location where exception was thrown ---  
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at SourceTree.Analytics.NPS.Service.NPSFeedbackService.\<RecordShownPromptAsync\>d__18.MoveNext()


Answers:
author: Mike Corsaro
body: Hello! Is there any chance you're using a 4K monitor? If so, could you try the work-around described in this thread: <https://jira.atlassian.com/browse/SRCTREEWIN-11421>

Thanks!

comments: author: matthewpritchard
body: Yes! I'm using dual 4k monitors at 3840x2160 scaled to 150%.

I'm pleased to report that the [workaround](https://jira.atlassian.com/browse/SRCTREEWIN-11421?focusedCommentId=1955977&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1955977) has resolved the issue I was experiencing.

Many Thanks

Matt


author: Stephan Geissb?hler
body: I was on 4K with 150% too. Workaround did it for me.

Thanks for the hard work you put into this guys!!!

Cant wait for the dark theme :)

Wish you all a happy easter!


author: Stephan Geissb?hler
body: I was using 3.1.2 too, and it was constantly crashing. So much more often than previous version. Then someone mentioned the workaround, and now sourcetree is back to its old greatness :)


author: bgannin
body: Hi,

Our apologies for the hassle. Thank you for the report, we're investigating this now.

Brian Ganninger  
Principal Developer, Sourcetree

comments: author: matthewpritchard
body: Thank you for replying. I am pleased to report that my issue has been resolved with the workaround suggested in this thread.


author: Stephan Geissb?hler
body: I was on 4K with 150% too. Workaround did it for me.

Thanks for the hard work you put into this guys!!!

Cant wait for the dark theme :)

Wish you all a happy easter!