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

Question. Do i fail over this code4

Last post 11/11/2009 18:07 by The ZMan. 10 replies.
  • 06/11/2009 18:48

    Question. Do i fail over this code4

    I know as a rule we fail for any code4 error but i am unsure about this.

    select mu and immediately pull out the mu. even before the guide closes and in some games makes it crash. I'm not sure that this is a real world example but i was wondering what the more experienced users think. :)
  • 06/11/2009 19:13 In reply to

    Re: Question. Do i fail over this code4

    A Code4 is a fail. That basicallyly sums it up. Doesn't really matter how you got it. There's plenty of real world examples I can think of (especially since I have 4 kids and witness this type of thing) where what you're describing could happen.

    But even if there wasn't. The rules are fairly simple. If the game crashes, fail it.
  • 06/11/2009 19:29 In reply to

    Re: Question. Do i fail over this code4

    The only time I don't fail over a code 4 is if I can't repro it... but even then I post as much as I can in the forums to help the person and I dont pass it.

    This is why we enourage people to add better exception code in their playtest builds so that code 4's give stack traces etc.
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 06/11/2009 19:43 In reply to

    Re: Question. Do i fail over this code4

    Any Code 4 is a fail. Period. No exceptions. [edit: unless of course as ZMan says you can't repro it - but that still means there's a problem lurking somewhere in the game, waiting to manifest itself on some poor user's console]

    See this thread for more discussion on the subject of MUs.
    "No programmer can pick up a TV remote without thinking what it would take to add a stun gun. [...] Their motto is 'if it ain't broke, it doesn't have enough features yet'" - Scott Adams, The Dilbert Principle

    The signature that was too big for the 512 char limit
  • 06/11/2009 20:32 In reply to

    Re: Question. Do i fail over this code4

    George Clingerman:
    A Code4 is a fail. That basicallyly sums it up. Doesn't really matter how you got it. ...

    But even if there wasn't. The rules are fairly simple. If the game crashes, fail it.

    UberGeekGames:
    Any Code 4 is a fail. Period. No exceptions. ...


    In my opinion not every Code4 could be a fail. I think hundreds of Indie Games on the Marketplace, Playtest and Review will crash with a Code4 if you pull the MU while loading content and the game is installed on the MU. I tried this with a handfull well known titles and all of them crashed with a Code4. Should we fail all games because of not checking if content exists before loading it?

    What should the games do in such a situation - immediatly exit like all full price titles do if you open the tray or should they display a text with an information to reinsert the correct MU?

    Are you aware of how slow file access is on Xbox360? If you only load 10 large files the File.Exists calls doesn't matter at all but if you have a game that loads 300 small files at once and the initial loading time nearly doubles because of the File.Exists calls this is often not acceptable for the consumer, playtester, reviewer and developer.

  • 06/11/2009 20:43 In reply to

    Re: Question. Do i fail over this code4

    Traeuma:
    Are you aware of how slow file access is on Xbox360? If you only load 10 large files the File.Exists calls doesn't matter at all but if you have a game that loads 300 small files at once and the initial loading time nearly doubles because of the File.Exists calls this is often not acceptable for the consumer, playtester, reviewer and developer.


    It is very easy to add a try/catch code for each sensitive thing you do, that should avoid any crash. (I know people who put everything inside try/catch, but that's not recommended - better let it crash so you can find the problem and fix it).
  • 06/11/2009 21:37 In reply to

    Re: Question. Do i fail over this code4

    Traeuma:


    In my opinion not every Code4 could be a fail. I think hundreds of Indie Games on the Marketplace, Playtest and Review will crash with a Code4 if you pull the MU while loading content and the game is installed on the MU. I tried this with a handfull well known titles and all of them crashed with a Code4. Should we fail all games because of not checking if content exists before loading it?

    What should the games do in such a situation - immediatly exit like all full price titles do if you open the tray or should they display a text with an information to reinsert the correct MU?

    Are you aware of how slow file access is on Xbox360? If you only load 10 large files the File.Exists calls doesn't matter at all but if you have a game that loads 300 small files at once and the initial loading time nearly doubles because of the File.Exists calls this is often not acceptable for the consumer, playtester, reviewer and developer.



    Just becuase some games were not tested properly doesn't mean everyone should do it. Its TRVIAL to wrap load code in an exception hadnler to prevent a crash. What you do after that is up to yo as the developer but a crash is a crash is a crash.... You dont need to call file exists... let the exception handler work for you.
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 06/11/2009 22:01 In reply to

    Re: Question. Do i fail over this code4

    The ZMan:
    Just becuase some games were not tested properly doesn't mean everyone should do it. Its TRVIAL to wrap load code in an exception hadnler to prevent a crash. What you do after that is up to yo as the developer but a crash is a crash is a crash.... You dont need to call file exists... let the exception handler work for you.

    Exactly.

    TellUser("Loading, do not touch that MU!"); 
    try 
        LoadStuff() 
    catch 
        TellUser("What did I tell you about pulling out the MU?!"); 
        continue_without_loadedstuff(); 

    @Fabian Viking:
    If you're doing something you can recover from, it is a good idea to use try/catch just on the off chance something bad happens. But before then, test the heck out of it and print whatever exceptions occur to the screen so you can debug them.

    Even if a block of code is fully tested to be safe, I think it's a good practice to use try/catch, so that should some solar flares happen to occur while the user is kicking their Xbox and cause an exception, politely inform the user that something broke and the program is continuing on, rather than just Code 4-ing.
    "No programmer can pick up a TV remote without thinking what it would take to add a stun gun. [...] Their motto is 'if it ain't broke, it doesn't have enough features yet'" - Scott Adams, The Dilbert Principle

    The signature that was too big for the 512 char limit
  • 11/11/2009 16:13 In reply to

    Re: Question. Do i fail over this code4

    Traeuma:
    In my opinion not every Code4 could be a fail. I think hundreds of Indie Games on the Marketplace, Playtest and Review will crash with a Code4 if you pull the MU while loading content and the game is installed on the MU.


    Traeuma pointed out that I didn't fully cover the part in bold...

    When a game is installed to a MU and you remove it then all bets are off. No XBLA or XBLIG should be expected to continue to run after you pull the device storing the game. Its like expecting windows to keep running if you pull the hard drive.

    The Code4's you are testing for are games that load/save settings/highscores etc to a device.

    I've added this to the Not So Evil Checklist.

    If you ONLY have MU so have to store the game AND the settings/etc on that one device then its impossible for you to test for MU crashes. You need at least 2 devices.
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
  • 11/11/2009 17:53 In reply to

    Re: Question. Do i fail over this code4

    Thanks a lot ZMan,

    forget my last post in your game thread. Now everything is clear. Sorry for the misunderstanding.
  • 11/11/2009 18:07 In reply to

    Re: Question. Do i fail over this code4

    No worries, glad you pointed out that we all misread your question in here so we can get the right asnwers in FAQs etc.
    Play Kissy Poo - a game for 4 year olds on Xbox and windows
    The ZBuffer
    News and information for XNA
      Follow The Zman on twitter, Email me
        Please read the forum FAQs - Bug/Feature reporting
          Don't forget to mark good answers and good playtest feedback when you see it!!!
Page 1 of 1 (11 items) Previous Next