Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Null reference on Game class instantiation on one caller but not the other caller.

$
0
0

@davidsummers wrote:

I've got two programs that both call a class which has a base class of Microsoft.Xna.Framework.Game:

Example:

public class VOController : Microsoft.Xna.Framework.Game
{
public VOController( )
: base( )
{
}
}

This works when called from one Visual Studio 2017 project (program) but crashes when used by the other project (program), both in the same Visual Studio 2017 solution.

At the moment, I don't know why or what differences there would be in the two programs that would cause this same code to crash with null reference exception on one but not the other one.

Is there some other initialization required by MonoGame before instantiating the Game class?

What might cause a null reference exception in the Microsoft.Xna.Framework.Game constructor?

I'm on Windows 10, Visual Studio 2017, and MonoGame 3.6.

Thanks in advance for any help or ideas on this.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles