XNA Creators Club Online
Page 1 of 1 (17 items)
Sort Posts: Previous Next

Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

Last post 12-17-2007 12:54 PM by Danny Tuppeny. 16 replies.
  • 12-16-2007 3:37 PM

    Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    I'm trying to get one of the samples running on my laptop (no IDE, just runtimes) for running/testing/debugging network stuff. I've installed .NET 2.0 SP1, VC++ Runtimes (just in case!), Games for Windows redist 1.2. I've got DirectX 9.0c installed too.

    However, when I run the compiled sample, it just gives a Windows crash (Send Error Report etc.) and I can't figure out what's missing.

    Any ideas? Is there still not a single installer with everything wrapped up? Is there a list of what's needed anywhere?

    Thanks

  • 12-16-2007 3:43 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    The XNA Game Studio 2.0 end-user license agreement does not grant you permission to redistribute the Microsoft Games for Windows -- LIVE runtime. Please refer again to the EULA for details.

    If you'd like to redistribute a game you've created for Windows, you should avoid the use of any of the GamerServices types.

     

    Stephen Styrchak | XNA Game Studio Developer
  • 12-16-2007 3:59 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    I didn't redistribute anything. I dowloaded the G4W live redist 1.2 from the MS site on the laptop. I haven't copied anything from the GSE installation to the laptop. If this isn't allowed, maybe it shouldn't be on the site :-)

    I'm trying to run a simple new XNA project that does notrhing but clear the screen to CornfloewrBlue (the default template) and that crashes too. This is what's being written to the Event log:

    EventType clr20r3, P1 laptoptest.exe, P2 1.0.0.0, P3 4765904d, P4 microsoft.xna.framework.game, P5 2.0.0.0, P6 474dd5b0, P7 12f, P8 9e, P9 njpadyxeqiebvhz5waqljbousqcz2x5l, P10 NIL.

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

  • 12-16-2007 4:37 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    Sorry, I thought you'd installed a file that was extracted into the XNA GS 2.0 setup folder.

    Have you read the FAQ forum? There is a topic describing how to set up another machine to run your games.

    Stephen Styrchak | XNA Game Studio Developer
  • 12-16-2007 4:47 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    I hadn't, but I just did. I've got everything mentioned. I ran the web installer for DirectX, I've got .NET 2.0 SP1 (installed it myself, then WindoesUpdate showed it, so I ticked it again just in case). I installed the xna 2.0 redist, and then forcefully installed VC++ runtime too.

    I'm just trying to run the default project template compiled :(

    Always gives the error I gave above in Event Viewer. I clicked the "Send Error Report" option too, in case that's gone anywhere useful!

    In any case - the reason I wanted it working was ultimately to test System Link play (since I don't think I can run two instances on my main machine?). From your mention about the EULA above, am I right in thinking I can't do this anyway, unless I install Visual C# Express and XNA? (I just uninstalled the beta!). It's a naff laptop, so I'd rather have as little installed as possible, but I do need to be able to test System Link.

    Cheers,

  • 12-16-2007 5:00 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    ProcessMonitor lists more errors than I can possible post here for my process :(

    The last ones before DW20.exe appears are "NAME NOT FOUND", "BUFFER OVERFLOW" and "PATH NOT FOUND". Here's a sample of the buffer errors:

    LaptopTest.exe,RegEnumValue,HKCR\Installer\Assemblies\Global,BUFFER OVERFLOW,Index: 0, Length: 220
    LaptopTest.exe,RegEnumValue,HKCR\Installer\Assemblies\Global,BUFFER OVERFLOW,Index: 1, Length: 220
    (indexes go from 0 to 70)

    Also, there's a "NAME NOT FOUND" which says:
    QueryOpen,C:\Windows\Microsoft.Net\Framework\v2.0.50727\VERSION.dll,NAME NOT FOUND

    The dll doesn't exist at that location - not sure if that's related (it doesn't exist on my dev machine either).

    There's so much stuff in there I'm not surprised it doesn't work, but I don't know how to tell which are "normal" and which are fatal :/

  • 12-16-2007 5:01 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    Right, our XNA Framework runtime redist doesn't include all the components necessary for using GamerServices. You'll need to install XNA Game Studio on the other machine in order to test the System Link features in your game.

    As for the crash, you should add an exception handler to your game's top-level function. For example, in the standard template, you should add a try/catch around the using statemet in Program.cs. In the catch block, log the exception text someplace, like

      System.Windows.Forms.MessageBox.Show(e.ToString());

    If your laptop's graphics card doesn't meet the minimum requirements of the XNA Framework (as one example), then you'll get an exception in the Game constructor. On a machine without a debugger installed, this would just appear to be a crash.

    Ideally, you'll want to write "nice" error handling code that will provide a useful error message to the user based on the exception that you catch. But for now, it would do to just find out what exception is being thrown.

    Stephen Styrchak | XNA Game Studio Developer
  • 12-16-2007 5:06 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    DW20.exe is the application that sends error reports to Microsoft. You can ignore those errors -- they are happening as the application tries to gather up diagnostic information from the various code loaded in the process that crashed. The errors occur when an assembly doesn't contain all the possible information -- but these are handled by dw20.exe, so you don't need to worry about it.
    Stephen Styrchak | XNA Game Studio Developer
  • 12-16-2007 5:18 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    Also run the DirectX web installer to make sure the latest version is installed.
    John Sedlak Xna/DirectX MVP
    Focused Games | My Blog
  • 12-16-2007 5:22 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    As mentioned - I'd run the DirectX installer. However, Stephen hit the nail on the head. I didn't realise without the debugger it wouldn't show a nice .NET exception dialog!

    Here's what I got:

    Microsoft.Xna.Framework.NoSuitableGraphicsDeviceException: Could not find a Direct3D device that has a Direct3D9-level driver and supports pixel shader 1.1 or greater.

    So, my question is... I've had stuff working on that laptop before. I tried explicitly setting 1.1 in case that's what I'd been using back then. Is there a "lower" requirement I can set, or does XNA 2.0 just require a better card than 1.0 did? It'd be nice to be able to test network stuff on the laptop, even if I have to disable half the graphics!

  • 12-16-2007 5:31 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    One of the XNA Framework developers would be able to answer this; I'm afraid I don't know. I'm pretty sure you can't get any lower than PS1.1, though.

    If you've run XNA Framework 1.0 games on this laptop, then it's possible that the graphics hardware is capable enough, but a change of driver since the last time could have caused the regression. This could happen if you reinstalled the OS at some point, for example.

    Try updating your driver to be sure you have the latest and greatest version for your card.

     

    Stephen Styrchak | XNA Game Studio Developer
  • 12-16-2007 5:49 PM In reply to

    Re: Redist'ing game. Installed XNA Redist + G4W but game crashes upon start up

    Stephen Styrchak:
    If you've run XNA Framework 1.0 games on this laptop, then it's possible that the graphics hardware is capable enough, but a change of driver since the last time could have caused the regression. This could happen if you reinstalled the OS at some point, for example.

    Aha! Didn'#t think of that. This laptop gets reinstalled every time I play with something new, so I wiped Ubuntu for XP a few days ago =D

    Stephen Styrchak:
    Try updating your driver to be sure you have the latest and greatest version for your card.
    Good idea - I'll give it a go tomorrow. Though I'm thinking maybe shelling out the dosh for a CC membership might be easier, and much cooler for testing =D

    I've obviously not tried it yet - is it easy to push changes to the Xbox? I'd obviously need to compile, push to xbox, launch on PC, launch on xbox. If it's a ballache to do, using the laptop might be easier for debugging networking code!

  • 12-16-2007 6:16 PM In reply to