Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by LukeFireproof · Oct 30, 2018 at 04:03 PM · buildbuildpipelineautomation

Build hang on compiling scripts in Unity 2018.2

Since we upgraded to Unity 2018.2.11f1 from 2017.4 we're getting random hangs in our automated build process. The hang seems to mostly occur after a successful build when Unity is reimporting scripts. This stops the unity process ending and therefore hangs our automated build setup. I have a workaround in python to manually kill the process if it thinks this has happened, but its still very annoying and adds time to our build turn around. We're running a python build script that runs unity via batchmode on a TeamCity server build machine on our network.

alt text

croppercapture6.png (474.5 kB)
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image andersemil · Mar 14, 2019 at 09:23 AM 0
Share

We are consistently seeing that Unity 2018.3 hangs while building our project in batchmode as well as on UCB. It completely breaks our pipeline but Unity seem O$$anonymous$$ with it. Highly frustrating.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by LukeFireproof · Sep 16, 2021 at 01:44 PM

Hi! This was a while ago and I've had loads of issues with similar thing since but I think the was ultimately down to the cache server failing silently. So if you're using that I'd recommend either switching it off or swithing to the new v2 cache server which seems much better for build stuff. Python-wise all I did was check if the editor log had any new input and if it didn't in minutes I'd kill the process and try again.

I also run KillUnityRelatedProcesses() before and after a build run to clean up any leftover processes. It's all a huge pile of hacks but it works most of the time now!

 def KillUnityRelatedProcesses():
     KillVBCS()
     KillUnity()
     KillUnityShaderCompiler()
 
 def KillVBCS():
     KillProcess("VBCSCompiler.exe", True)
 
 def KillUnity():
     KillProcess("Unity.exe", True)
 
 def KillUnityShaderCompiler():
     KillProcess("UnityShaderCompiler.exe", True)
 
 def KillProcess(processName, recursiveKill = False, killcount = 0):
     if GetArgs().allowKillProcesses != 1:
         return
 
     if killcount > 99:
         return
     else:
         if killcount > 0:
             time.sleep(0.5)
 
     tasks = os.popen('tasklist').read()
     
     if processName in tasks:
         print("Killing process: " + processName)
         try:
             os.system("taskkill /F /im %s" % processName)
             if recursiveKill:
                 KillProcess(processName, True, killcount + 1)
         except WindowsError as e:
             print("Coudn't kill process %s. Error: %s" % (processName, e))
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image visualtaggy · Sep 16, 2021 at 03:40 PM 0
Share

This is perfect, it solved my problem as well. It's kinda hacky but yes it does get the job done, it seems to be the only way to get rid of this problem. Thank you so much buddy, really appreciate it : )

avatar image LukeFireproof visualtaggy · Sep 16, 2021 at 04:12 PM 0
Share

No problem man. I know how infuriating these problems can be!

avatar image
0

Answer by visualtaggy · Sep 13, 2021 at 04:58 PM

@ LukeFireproof can you please help me by telling how you used python to estimate the process is over and terminate it? I am having the same problem :(

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

101 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Building Unity from Batch file using Node.js 0 Answers

Changing File Structure Of Final Output Build 0 Answers

Adding plugins to XCode project from the command line 1 Answer

[Closed]How to Build and Deploy to the Android device from the script 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges