【问题标题】:Unity3D Linux Build crashes on start. (Ubuntu 16.04 LTS)Unity3D Linux Build 在启动时崩溃。 (Ubuntu 16.04 LTS)
【发布时间】:2016-05-06 12:44:11
【问题描述】:

我正在努力使 Unity3D Build 在 Ubuntu Linux 环境中工作。 我刚刚创建了一个没有任何对象的空场景构建了一个 linux 发行版,但它在 linux 中崩溃并给出了以下错误。

'/home/jayanth/Desktop/EmptyLinuxTest/Empty_Linux.x86' 
Found path: /home/jayanth/Desktop/EmptyLinuxTest/Empty_Linux.x86
Mono path[0] ='/home/jayanth/Desktop/EmptyLinuxTest/Empty_Linux_Data/Managed'
Mono path[1] = '/home/jayanth/Desktop/EmptyLinuxTest/Empty_Linux_Data/Mono'
Mono config path = '/home/jayanth/Desktop/EmptyLinuxTest/Empty_Linux_Data/Mono/etc'
displaymanager : xrandr version warning. 1.5
client has 2 screens
displaymanager screen (0)(VGA-0): 1368 x 768
Using libudev for joystick management


Importing game controller configs
Aborted (core dumped)

这是 Player.log 文件输出。

Selecting FBConfig
GLX_FBCONFIG_ID=227
GLX_BUFFER_SIZE=32
GLX_DOUBLEBUFFER=1
GLX_RED_SIZE=8
GLX_GREEN_SIZE=8
GLX_BLUE_SIZE=8
GLX_ALPHA_SIZE=8
GLX_DEPTH_SIZE=24
GLX_STENCIL_SIZE=8
GLX_SAMPLES_ARB=0
GLX_SAMPLE_BUFFERS_ARB=0
GLX_STEREO=0
GLX_CONFIG_CAVEAT=NONE

Desktop is 1368 x 768 @ 60 Hz
XError: BadMatch (invalid parameter attributes) (error 8, opcode 154/34, serial 37, XID 00000004, display 0xa96bdf0
XError: BadMatch (invalid parameter attributes) (error 8, opcode 154/34, serial 40, XID 00000004, display 0xa96bdf0
XError: BadMatch (invalid parameter attributes) (error 8, opcode 154/34, serial 43, XID 00000004, displaterminate called after throwing an instance of    'std::logic_error'
what():  basic_string::_S_construct null not valid

堆栈跟踪:

Native stacktrace:

/home/jayanth/Desktop/EmptyLinuxTest/Empty_Linux_Data/Mono/x86/libmono.so(+0x8960f) [0xb4da760f]
[0xb775cc20]
[0xb775cc31]
/lib/i386-linux-gnu/libc.so.6(gsignal+0x39) [0xb7160e89]
/lib/i386-linux-gnu/libc.so.6(abort+0x157) [0xb71623e7]
/usr/lib/i386-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x155) [0xb73cfd45]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x70843) [0xb73cd843]
/usr/lib/i386-linux-gnu/libstdc++.so.6(+0x708bd) [0xb73cd8bd]
/usr/lib/i386-linux-gnu/libstdc++.so.6(__cxa_rethrow+0) [0xb73cdb80]
/usr/lib/i386-linux-gnu/libstdc++.so.6(_ZSt19__throw_logic_errorPKc+0x44) [0xb73f78b4]
./Empty_Linux.x86() [0x8b66b48]
./Empty_Linux.x86() [0x8b5802e]
./Empty_Linux.x86() [0x8b4a2ba]
./Empty_Linux.x86() [0x8b568c9]
./Empty_Linux.x86() [0x8adb803]
./Empty_Linux.x86() [0x8ad81f7]
./Empty_Linux.x86() [0x82ce6bf]
./Empty_Linux.x86() [0x83efceb]
./Empty_Linux.x86() [0x83c6c12]
./Empty_Linux.x86() [0x808e473]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf7) [0xb714d637]
./Empty_Linux.x86() [0x80988e9]

来自 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 permitted.
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.
=================================================================

如果有人在这个问题上帮助我,我会很高兴。

谢谢

【问题讨论】:

  • 您使用的是操纵杆或类似的东西??
  • 不,我没有使用任何操纵杆。如果我为 Windows/Mac 制作相同的版本,它工作得很好,但不确定为什么它会在 Linux 中产生问题
  • 同样的问题@Niks,你碰巧解决了吗?

标签: linux ubuntu unity3d game-engine game-physics


【解决方案1】:

在抛出 'std::logic_error' 的实例后调用“终止”行 what(): basic_string::_S_construct null not valid" 在您的日志中表明 Unity3d 正在尝试从一个空指针构造一个 std::string 对象,根据 C++ 标准和当前的 libstdc++ 版本,这是未定义的行为,抛出一个 std::如果您的代码尝试这样做,则会出现 logic_error 异常。

这很可能是 Unity 本身的一个错误 - 如果您在网上搜索,会有一些关于类似错误的抱怨。

【讨论】:

  • 好吧,只是为了随机测试,我在我的系统中安装了一个 nVidia 显卡,然后它开始在 linux 中工作,但它仍然非常慢。我无法得出任何结论,因为在没有显卡的 Windows 和同一系统中同样如此。所以,我认为 Unity 还没有完全为 Linux 做好准备(可能)......
猜你喜欢
  • 2017-01-27
  • 2020-05-29
  • 1970-01-01
  • 1970-01-01
  • 2023-01-26
  • 1970-01-01
  • 2016-10-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多