game-ci / docker

Series of CI-specialised docker images for Unity.
https://hub.docker.com/u/unityci
MIT License
392 stars 122 forks source link

Segmentation fault unity when trying to open Unity to do an import (unityci/editor:ubuntu-2021.3.0f1-webgl-1.0.1) #174

Closed ldunnplaymint closed 2 years ago

ldunnplaymint commented 2 years ago

Bug description

I have a docker image building and activating. When I try to run the command to open unity in order to import the project it will hit a Segmentation fault

How to reproduce

Use this Dockerfile in a Unity project of the same version:

FROM unityci/editor:ubuntu-2021.3.0f1-webgl-1.0.1

#Copy repository into image
COPY . /opt/repo

ARG UNITY_SERIAL
ARG UNITY_USR_NAME
ARG UNITY_PASS

#Auth with unity
RUN /opt/unity/Editor/./Unity \
-quit \
-batchmode \
-logfile \
-nographics \
-serial $UNITY_SERIAL \
-username $UNITY_USR_NAME \
-password $UNITY_PASS

#Open Unity once so it can do an import
RUN opt/unity/Editor/./Unity \
-quit \
-batchmode \
-logfile \
-nographics \
-buildTarget WebGL \
-projectPath /opt/repo

-

Expected behavior Unity is able to import the project and close successfully

Additional details I am fairly sure the

ERROR:

PlayerPrefs - Creating folder: /root/.config/unity3d/DefaultCompany
PlayerPrefs - Creating folder: /root/.config/unity3d/DefaultCompany/Frontier Unity Prototype
Unable to load player prefs
[Subsystems] No new subsystems found in resolved package list.
Package Manager log level set to [2]
[Package Manager] Done registering packages in 0.21s seconds
Targeting platform: WebGL
Refreshing native plugins compatible for Editor in 67.83 ms, found 0 plugins.
Preloading 0 native plugins for Editor in 0.02 ms.
Initialize engine version: 2021.3.0f1 (6eacc8284459)
[Subsystems] Discovering subsystems at path /opt/unity/Editor/Data/Resources/UnitySubsystems
[Subsystems] Discovering subsystems at path /opt/repo/Assets
Forcing GfxDevice: Null
GfxDevice: creating device client; threaded=0; jobified=0
NullGfxDevice:
    Version:  NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor:   Unity Technologies
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
ldunnplaymint commented 2 years ago

I have tried a lot of different things. This used to work on a previous version of Unity (2020 something). I thought it might have been that I am using an M1 chip Mac but I reproduced it on a windows machine.

ldunnplaymint commented 2 years ago

I have resolved this issue, a git clean of the repository got me past it but there is a new error where unity cannot find mono, going to dig into that and produce a new ticket if I can't work it out.