gpt4 book ai didi

ubuntu - Monogame Linux 在启动时崩溃

转载 作者:行者123 更新时间:2023-12-03 16:55:21 25 4
gpt4 key购买 nike

从 Linux(Ubuntu 12.04)启动单人游戏时,我在控制台中收到以下错误

Pastebin, formatting when pasted here wasn't worth fixing

当我延迟任何逻辑的发生直到一定数量的游戏时间过去时,这个错误不会发生,但是必要的游戏时间量不断变化并且太长了。有什么方法可以解决此错误消息吗?

代码:初始化

public class Husk : Game
{
public GraphicsDeviceManager graphics;
public SpriteBatch regBatch;
public World world;
public static Texture2D pixel;
string title;

public Husk(string Title = "") // :base() seems to make the required elapsed time lesser.
{
title = Title;
graphics = new GraphicsDeviceManager(this);
HuskLib.Content.content = this.Content;
}

protected override void Initialize ()
{
regBatch = new SpriteBatch(graphics.GraphicsDevice);

Window.Title = title;

pixel = new Texture2D(graphics.GraphicsDevice, 1, 1);
pixel.SetData<Color>(new Color[1]{Color.White});
}
}

我没有在我的游戏中使用任何线程,它可以通过 Monogame 在外部完成

最佳答案

您正在使用的库之一是引发段错误 (SIGSEGV)。

我还在堆栈跟踪中看到您似乎正在使用线程。

我最好的猜测(没有看到任何源代码)是多个线程处于竞争状态。有时它们中的一个会达到期望数据被初始化的程度,但该数据尚未初始化。

如果您粘贴相关的源代码,您可能会得到更详细的帮助。

关于ubuntu - Monogame Linux 在启动时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11387399/

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