gpt4 book ai didi

linux - Unity3D Linux Build 在启动时崩溃。 (Ubuntu 16.04 长期支持版)

转载 作者:太空宇宙 更新时间:2023-11-04 10:36:41 25 4
gpt4 key购买 nike

我正在努力让 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.
=================================================================

如果有人能帮助我解决这个问题,我会很高兴。

谢谢

最佳答案

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

这很可能是 Unity 本身的错误 - 如果您在网上搜索,就会发现一些关于类似错误的投诉。

关于linux - Unity3D Linux Build 在启动时崩溃。 (Ubuntu 16.04 长期支持版),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37072779/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com