I build a Linux standalone version of my game. And I want it to run in batch mode in Ubuntu so that I can write some code to get screenshot automatically for further usage.
My env:
- Ubuntu 16.04
- Unity 5.4.3
- Nvidia K2200 graphic card
- Nvidia Drider version: 367.57-0ubuntu0.16.04.1
- xvfb-run
But when I tried to run my game through SSH with this kind of command, I came across a core dumped and everything aborted:
>xvfb-run --auto-servernum --server-args='-screen 1 2560x1600x24:32' -e /home/unreal/video/error_xvfb ./test.x86_64 -batchmode -logFile /home/unreal/video/stdout_unity
And in that log file "stduo_unity", some error happened but I have no idea what it is talking about:
Stacktrace:
Native stacktrace:
/home/unreal/Unity/New Unity Project/test_Data/Mono/x86_64/libmono.so(+0x91a46) [0x7f61216dba46]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f6125c28390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f61243fc428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f61243fe02a]
./test.x86_64() [0x886397]
/home/unreal/Unity/New Unity Project/test_Data/Mono/x86_64/libmono.so(+0xd07eb) [0x7f612171a7eb]
/home/unreal/Unity/New Unity Project/test_Data/Mono/x86_64/libmono.so(+0x348d3) [0x7f612167e8d3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f6125c28390]
./test.x86_64() [0xf92d9f]
./test.x86_64() [0xf8a1c6]
./test.x86_64() [0xf8b97b]
./test.x86_64() [0x4a2d5e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f61243e7830]
./test.x86_64() [0x4ac679]
Debug info from gdb:
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: operation not allowed.
No threads.
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Then I try to uninstall Nvidia driver and everything works fine. But as it cannot use graphic card, the app is with low efficiency.
Then I re-install driver again, and try building Linux standalone app with from Unity 5.2 to Unity 5.5. Nothing better.
Now I really don't know want should I do. Can someone help me with this? Thanks!
↧