سؤال

When launching a monogame game from Linux(Ubuntu 12.04), I get the following error in the console

Pastebin, formatting when pasted here wasn't worth fixing

This bug does not occur when I delay any logic from happening until a certain amount of gameTime has passed, but the amount of gameTime necessary constantly varies and is far too long. Is there any way to work around whatever this error message is?

Code: Initialization

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});
    }
}

I'm not using any threading within my game, it may be done externally through Monogame

هل كانت مفيدة؟

المحلول

One of the libraries you are using is throwing a segmentation fault (SIGSEGV).

I also see in the stack trace that you seem to be using threads.

My best guess (without seeing any source code) is that multiple threads are in a race condition. Sometimes one of them gets to a point where it expects data to be initialized, but that data is not yet initialized.

If you paste relevant source code, you may get more detailed help.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top