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
7
Question by StewVanB · Mar 30, 2018 at 03:42 PM · networkingcrashserverclient-serverlevel load

Crash in headless build, not present in headed build

I'm currently working on a networked project in Unity 2017.1.0p5. The architecture I'm shooting for is running a Linux build of the game in headless mode as a server on Amazon GameLift that clients connect to. Throughout development, I have been testing with two non-headless builds on Windows with no major problems. I've come to the point in development where I need to test the game in the target configuration and am running into some issues.

Here's how it has gone:

I tried testing directly on Amazon GameLift with a headless Linux build of the game as a server. The client can get into my Lobby scene just fine, but during LevelLoad on the server the server crashes, disconnecting the client. (Note: The way my project is configured, the server loads the level entirely before it send a message to tell the clients to load into the next scene.)

I tested with a headless Linux build locally on a Linux machine for better and faster debugging. The same server crashing problem occurred. I also tested a non-headless Linux build as the server and connected to it with a client on a Windows machine. This worked just fine, and produced the same behavior I have been seeing in testing 2 non-headless builds simultaneously on a Windows machine. By my measure, these tests show that it is not a GameLift issue and not a Linux issue.

I tested a headless Windows build of the game locally by running the game through the command line with the arguments -batchmode -nographics. This produces the same crash as seen in the above two scenarios. Again, as always, connecting to a Windows build of a non-headless server works fine.

Other important things to note:
- Loading into a blank scene works fine.
- There does not appear to be a specific"offending" object that is causing the crash in the scene. I went through the whole scene, deleting objects two or three at a time until I was able to load into the scene on the server without a crash. Restoring the scene, then deleting the last few objects I deleted and trying that as a build still produces a crash. (This, of course, does not rule out the possibility of multiple offending objects.)
- As far as I have been able to log, all Awake and Start methods on all Monobehaviours in my scene are finishing before the crash happens. I am loading the scene asynchronously and have a coroutine that is waiting for the AsyncOperation to be done that is never completing, so I know the crash is happening before the level has been loaded completely.
- There are no meaningful errors (that I can see) preceding the crash in the unity log file itself.

I have attached the crash log as it is substantial.link text

networkloadcrash.txt (16.4 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 Glurth · Mar 30, 2018 at 03:58 PM 0
Share

total shot in the dark here: Does the scene that runs on the headless machine have any camera? If so, perhaps the headless-ness(?) is confusing the system when trying to render camera outputs?

1 Reply

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

Answer by StewVanB · Apr 02, 2018 at 03:06 PM

After a bunch of testing we have discovered the source of our issue. It was that our particle systems were on and attempting to run on our server, causing it to crash. The particle systems in unity are threaded and this was resulting in the memory access violation.

The fix for this was to disable all the particle systems(at the component level) then have the clients turn them on if/when needed. If the server does need to reference the particle emitters from time to time, this will be accomplished by turning the particle components on when they are needed.

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

119 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 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

Unity networking tutorial? 6 Answers

NetworkManager.ServerChangeScene from client to server 0 Answers

Rigidbody that two players can move/interact with over network? 1 Answer

are client hosted servers limited by my 20 person ccu? 0 Answers

UNet NetworkServer.Spawn() not working / Failed to spawn server object, assetId= 2 Answers


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