After unity hangs I usually kill it with xkill. After removing Temp folder in project root and relaunch project there is an error message in console “Socket: bind failed, error: Address already in use(98)”
Hi @IC1
Do you use any custom way to start adb services?
If not, looks like it is related to the killing thing.
After killing, could you check(netstat or similar) if anything is still using the port?
At least for me, Unity uses 34999 (based on command which uses tcp:34999), so maybe that port is still “locked” by Unity after manual process kill.
@IC1
Unfortuantely my knowledge about the subject is limited here
I don’t know about other tricks to find the blocking process apart from what you have been doing.
The only thing I can suggest is to try to reproduce it and file a bug report.
As I understand the fact that Unity freezes for you is crucial here.
Few times Unity freezed/crashed for me but after another Unity(not whole PC) restart I didn’t encounter issues you see.
So maybe it is not that easy to reproduce.
I have never cleared “Temp” folder after crash, why do you do it?
Because broken cache interrupts unity launch. It’s just closes without any errors. Sorry for late answer I’ve just stucked into that problem in hope to find a solution and noticed you question
After a big research with ag, grep, find and so on in whole system i’ve found that unity creates a file with name like /tmp/.mount_UnityHDpVLGD. You cannot just remove it even with sudo. The solution is to cd there and execute lsof +D ./ | awk '{print $2}' | tail -n +2 | xargs kill -9 in that directory (Original: files - How to get over "device or resource busy"? - Unix & Linux Stack Exchange), but my approach is better lsof /tmp/.mount_UnityH*/* | awk 'FNR > 1 {print $2}' | uniq | xargs sudo kill -9
After that unity can recreate socket successfully and debugging works fine