【问题标题】:Game working on Win7 but not Vista?游戏可以在Win7上运行,但不能在Vista上运行?
【发布时间】:2012-07-30 14:42:30
【问题描述】:

我一直在开发一款游戏,每次更新后,我都会向我的朋友发送一个 setup.exe,以使用我通过 Inno Setup 制作的。到目前为止,它一直运行良好。他能够安装游戏,但是当他运行 .exe 时,他得到“游戏已停止工作”。虽然安装后对我来说效果很好。我唯一能想到的可能是我使用存储容器添加了保存和加载。我选择保存位置:

 asyncResult = StorageDevice.BeginShowSelector(playerIndex, null, null);

 storageDevice = StorageDevice.EndShowSelector(asyncResult);

 asyncResult = storageDevice.BeginOpenContainer("Game1StorageContainer", null, null);

这会将文件放置在:Desktop\Libraries\Documents\SavedGames\Game\Game1StorageContainer\Player1\

这是一个模糊的问题,但也许有人有想法?

:: 更新 ::

好的,我已经让我的朋友重新安装了 XNA Runtime,同样的问题。

他的 minidump 文件夹中没有文件,即使显示了隐藏文件夹。

但是我这里有一个 Windows 错误日志:

 Application: My Game.exe
 Framework Version: v4.0.30319
 Description: The process was terminated due to an unhandled exception.
 Exception Info:Microsoft.Xna.Framework.GamerServices.GamerServicesNotAvailableException
 Stack:
    at Microsoft.Xna.Framework.GamerServices.KernelMethods+ProxyProcess..ctor(Microsoft.Xna.Framework.GamerServices.UserPacketBuffer)
    at Microsoft.Xna.Framework.GamerServices.KernelMethods.Initialize(Microsoft.Xna.Framework.GamerServices.UserPacketBuffer)
    at Microsoft.Xna.Framework.GamerServices.GamerServicesDispatcher.Initialize(System.IServiceProvider)
    at Microsoft.Xna.Framework.GamerServices.GamerServicesComponent.Initialize()
    at Microsoft.Xna.Framework.Game.Initialize()
    at My_Game.Game1.Initialize()
    at Microsoft.Xna.Framework.Game.RunGame(Boolean)
    at Microsoft.Xna.Framework.Game.Run()
    at My_Game.Program.Main(System.String[])

所以,它在 Game1.Initialize(); 处崩溃,其中包含:

 protected override void Initialize()
    {
        this.graphics.PreferredBackBufferWidth = 800;
        this.graphics.PreferredBackBufferHeight = 600;
        this.graphics.IsFullScreen = false;
        this.graphics.ApplyChanges();

        base.Initialize();
    }

所以肯定是 base.Initialize();,我猜这是因为我从框架中包含了一些新库。所以我不知道该怎么做,我以前的游戏版本对他来说很好。

有人知道我能做什么吗?

谢谢

【问题讨论】:

  • 在全局异常处理程序中显示更多细节——尤其是消息、类型和堆栈跟踪。或者(更好,但需要您朋友的更多工作)捕获异常时的进程转储。有关获取和使用转储的更多信息,请参阅最近的 C9 系列生产调试:channel9.msdn.com/Series/…
  • 所以我猜这与 InnoSetup 无关...
  • 记录并转储,然后记录更多内容,尝试-捕获-最终所有内容,然后告诉您的朋友将返回的内容发送给您。或者,在他的装备上进行调试。

标签: c# windows-7 xna windows-vista inno-setup


【解决方案1】:
  1. 他是否安装了XNA Runtime
  2. 检查 Windows 事件日志,它应该有崩溃的详细条目
  3. 当应用程序崩溃时,会创建一个minidump。您应该能够将其加载到 Visual Studio 中并查看它崩溃的位置。

【讨论】:

  • 谢谢!我已经用一些新信息更新了我的第一篇文章,你知道我能做什么吗?
猜你喜欢
  • 2013-01-15
  • 1970-01-01
  • 2011-06-10
  • 1970-01-01
  • 2021-11-23
  • 2021-06-26
  • 2017-08-09
  • 2021-05-07
  • 1970-01-01
相关资源
最近更新 更多