Sourcetree not responding on Windows 10
Asked by Mo_Joe:

Hi everyone,

I recently changed my laptop so I took the latest versions of unity and sourcetree.

I cloned my git repository and when I tried to commit the changes due to the new version of unity Sourcetree hanged (not responding). I also tried to create a new repository and to commit just my .gitignore file but sourcetree was not responding again.

Do you have any solution ?

I'm using it on Windows 10 64bit.

Thanks for your time !


Answers:
author: minnsey
body: Hi  

It looks like for some of you at least this maybe due to an issue with 4k monitors, see <https://jira.atlassian.com/browse/SRCTREEWIN-11421> for a workaround.  

A fix is in the works.


author: paza
body: I've updated Sourcetree to v.3.1.2 (Win10) and experienced the same issue. It works for some time and suddenly it hangs. The method SetFinalSizeMaxDiscrepancy appears often in the stack.

:-(

![bug.png](https://community.atlassian.com/t5/image/serverpage/image-id/49354iC787F047C4C6E36C/image-size/large?v=v2&px=999 "bug.png")

comments: author: paza
body: I found out the Sourcetree hangs when its window height is greater than about 2000 px. You can easily reproduce it with a 4K monitor and Sourcetree maximized. It might be needed to click a branch to simulate a refresh. It looks like a UI component doesn't like to be a big one :-) The diff-viewer ?


author: paza
body: In the end, that is .Net bug.

*.Net 4.7 included a new algorithm for allocating space to columns in a Grid*   
*Unfortunately the new algorithm had three bugs (that we know of), all resulting in infinite loops.*

See: <https://github.com/Microsoft/dotnet/issues/604>


author: heniw
body: It's general issue with HD resolution.  
Please install previous source tree (that one with logo of branches and tree ) .


author: chirag ajmeri
body: Any luck of for finding a fix?  

All sudden, I started getting same issue today. Even I am not able to resolve with reinstalling or restarting Source Tree.

comments: author: Gudivada Ajaykumar
body: Same issue for me. Please anyone suggest solution.


author: minnsey
body: [@Gudivada Ajaykumar](/t5/user/viewprofilepage/user-id/1157045)   
see <https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-not-responding-on-Windows-10/qaq-p/870255#M28360>


author: Gudivada Ajaykumar
body: Thanks [@minnsey](/t5/user/viewprofilepage/user-id/502201), It resolved the issue.


author: heniw
body: Hi ! Any news please ?

comments: author: Mo_Joe
body: Hi, I have not been searching too long and did not find the solution.

But If did fix the problem : I downloaded Gitkraken !

Thanks to the Atlassian team for there priceless help.


author: minnsey
body: Hi  

Can you try restarting Sourcetree and then running Tools/Options/Process Viewer and posting up the results? This should give an indication of what processes Sourcetree is running when it freezes

comments: author: Mo_Joe
body: Hi,

Thanks for your answer.

I tried to run the Process Viewer and I got this :

\[  
{  
"Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper=\\"C:/Users/user/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE\\" status --porcelain --ignore-submodules=dirty --untracked-files=all --no-ahead-behind",  
"Directory": "C:\\\\Users\\\\user\\\\Documents\\\\Unity Projects\\\\MobileGameProject",  
"Status": "Finished",  
"Duration": "00:00:00.1635625",  
"CallerContext": "GetStatusProcess",  
"Output": "A Packages/manifest.json\\nA ProjectSettings/PresetManager.asset\\nM ProjectSettings/ProjectVersion.txt\\n"  
},  
{  
"Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper=\\"C:/Users/user/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE\\" status --porcelain --ignore-submodules=dirty --untracked-files=all --no-ahead-behind",  
"Directory": "C:\\\\Users\\\\user\\\\Documents\\\\Unity Projects\\\\MobileGameProject",  
"Status": "Finished",  
"Duration": "00:00:00.1346419",  
"CallerContext": "GetFileStatus",  
"Output": "A Packages/manifest.json\\nA ProjectSettings/PresetManager.asset\\nM ProjectSettings/ProjectVersion.txt\\n"  
},  
{  
"Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper=\\"C:/Users/user/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE\\" tag",  
"Directory": "C:\\\\Users\\\\user\\\\Documents\\\\Unity Projects\\\\MobileGameProject",  
"Status": "Finished",  
"Duration": "00:00:00.1426187",  
"CallerContext": "GetTags",  
"Output": ""  
},  
{  
"Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper=\\"C:/Users/user/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE\\" rev-parse HEAD",  
"Directory": "C:\\\\Users\\\\user\\\\Documents\\\\Unity Projects\\\\MobileGameProject",  
"Status": "Finished",  
"Duration": "00:00:00.1037405",  
"CallerContext": "Summary",  
"Output": "5eb62fe1797fcb9dd185048cb453a058e400bfeb\\n"  
},  
{  
"Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper=\\"C:/Users/user/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE\\" remote show -n origin",  
"Directory": "C:\\\\Users\\\\user\\\\Documents\\\\Unity Projects\\\\MobileGameProject",  
"Status": "Finished",  
"Duration": "00:00:00.1067202",  
"CallerContext": "GetRemoteInfo",  
"Output": "\* remote origin\\n Fetch URL: https://Mo_Joe@bitbucket.org/Mo_Joe/mobile-game-project.git\\n Push URL: https://Mo_Joe@bitbucket.org/Mo_Joe/mobile-game-project.git\\n HEAD branch: (not queried)\\n Remote branch: (status not queried)\\n master\\n Local branch configured for 'git pull':\\n master merges with remote master\\n Local ref configured for 'git push' (status not queried):\\n (matching) pushes to (matching)\\n"  
},  
{  
"Command": "git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c credential.helper= -c credential.helper=\\"C:/Users/user/AppData/Local/ATLASS\~1/SOURCE\~1/GIT_EX\~1/GIT-CR\~1.EXE\\" config push.default",  
"Directory": "C:\\\\Users\\\\user\\\\Documents\\\\Unity Projects\\\\MobileGameProject",  
"Status": "Finished",  
"Duration": "00:00:00.0987443",  
"CallerContext": "GetGeneralConfig",  
"Output": ""  
},  
{  
"Command": "git --version",  
"Directory": "C:\\\\Users\\\\user\\\\AppData\\\\Local\\\\Temp\\\\",  
"Status": "Finished",  
"Duration": "00:00:00.0957432",  
"CallerContext": "GetVersionString",  
"Output": "git version 2.17.1.windows.2\\n"  
}  
\]


author: Mo_Joe
body: Then as soon as I hit the commit buton whith or without commit message, Sourcetree hangs and nothing more is happening.

The Process Viewer hangs too and no other log appear.

Thank you for your time.


author: minnsey
body: Thanks for the extra information.


author: Mo_Joe
body: Hi, [@minnsey](/t5/user/viewprofilepage/user-id/502201) no other clue or idea ?


author: minnsey
body: Sorry we have no further updates.  

None of the entries in the log appear to be taking a significant amount of time.  

Do you have any bookmarks that refer to non-existent folders?


author: kanobuho
body: I also updated to 3.1.2 and after that every time I open up Sourcetree it hangs. No action is required, it just hangs.

I updated from within the app after I got the message on the left up corner. It seems the upgrade process failed at some point. So I erased the 3.1.2 folder inside Sourcetree install directory and it return my version to the previous release that was working.

I have not tried to upgrade again yet.


Tags: windows