The infamous Black Screen

2»

Comments

  • HosHos Join Date: 2011-09-19 Member: 122016Members
    I also get a black screen when I start NS2 and when a round ends.

    The black screen from starting NS2 is recoverable, I can ctrl-alt-del or windows key to desktop, click NS2 to return and I get the main menu screen.
    The black screen from round end is not recoverable and I have to ctrl-alt-del and kill process or type exit at NS2 console to exit game.

    I have been experimenting with the start up black screen and have had some interesting results.

    I have edited the MainMenu.lua file by commenting out the following lines in function MainMenu_Loaded():

    MenuManager.SetMenuCinematic("cinematics/main_menu.cinematic")
    MenuManager.PlayMusic(mainMenuMusic)

    This stops the cinematic of the marine, alien and mac from playing behind the main menu options screen.

    I have yet to have a start up black screen since doing this, perhaps someone else can test and confirm.


    The black screen from the round end is another matter. I can reproduce it using the reset spamming technique mentioned earlier.

    I do not use GmOvrmind mod.
    I rarely get any console errors when it happens.

    Once I got:
    “Script Error: lua/ConsoleCommands_Server.lua:21: attempt to index local 'player' (a nil value)lua/ConsoleCommands_Server.lua:21”

    When I type location command in console to see where I am, I get :
    “Script Error: lua/NS2ConsoleCommands_Client.lua:149: attempt to index local 'player' (a nil value)lua/NS2ConsoleCommands_Client.lua:149
    Script Error: lua/NS2ConsoleCommands_Server.lua:530: attempt to index local 'player' (a nil value)lua/NS2ConsoleCommands_Server.lua:530”

    index local player (a nil value) seems to be a common error in previous black screen topics relating to scoreboard issues.

    By looking at the code it seems that local player assignments with calls to “client:GetControllingPlayer()” and “Client.GetLocalPlayer()” always result in a nil value and generate errors when referenced after a black screen occurs.

    I am not sure if the nil value is the cause of the black screen or just a symptom of the black screen.

    I hope this info is helpful to the developers and members in fixing this bug.

    P.S. I apologize if this post is tldr or has already been posted.
  • KalabalanaKalabalana Join Date: 2003-11-14 Member: 22859Members
    edited September 2011
    Someone needs to spam a million echo commands into the lua round restart process. This will narrow down the issue in no time flat.

    EDIT: Not sure if LUA has an echo command, just output to console the round restart process, pushing out the function calls, and variables. See where you hit ground.
  • playerplayer Join Date: 2010-09-12 Member: 73982Members
    <!--quoteo(post=1875575:date=Sep 19 2011, 07:54 PM:name=Hos)--><div class='quotetop'>QUOTE (Hos @ Sep 19 2011, 07:54 PM) <a href="index.php?act=findpost&pid=1875575"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Once I got:
    “Script Error: lua/ConsoleCommands_Server.lua:21: attempt to index local 'player' (a nil value)lua/ConsoleCommands_Server.lua:21”

    When I type location command in console to see where I am, I get :
    “Script Error: lua/NS2ConsoleCommands_Client.lua:149: attempt to index local 'player' (a nil value)lua/NS2ConsoleCommands_Client.lua:149
    Script Error: lua/NS2ConsoleCommands_Server.lua:530: attempt to index local 'player' (a nil value)lua/NS2ConsoleCommands_Server.lua:530”

    index local player (a nil value) seems to be a common error in previous black screen topics relating to scoreboard issues.

    By looking at the code it seems that local player assignments with calls to “client:GetControllingPlayer()” and “Client.GetLocalPlayer()” always result in a nil value and generate errors when referenced after a black screen occurs.<!--QuoteEnd--></div><!--QuoteEEnd-->
    There is some truth there. Clients are tied to player-entities in the game-world, GetControllingPlayer is a function to fetch such a player-entity, however upon a round-end\restart such entities are rapidly destroyed and re-created, it's certainly possible that once every so often the game tries to fetch the client's entity but catches the server inbetween (entities), and without proper error-handling that may well lead into oblivion (ea. a black-screen) for that particular client.
  • KalabalanaKalabalana Join Date: 2003-11-14 Member: 22859Members
    <!--quoteo(post=1875580:date=Sep 19 2011, 02:04 PM:name=player)--><div class='quotetop'>QUOTE (player @ Sep 19 2011, 02:04 PM) <a href="index.php?act=findpost&pid=1875580"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->There is some truth there. Clients are tied to player-entities in the game-world, GetControllingPlayer is a function to fetch such a player-entity, however upon a round-end\restart such entities are rapidly destroyed and re-created, it's certainly possible that once every so often the game tries to fetch the client's entity but catches the server inbetween (entities), and without proper error-handling that may well lead into oblivion (ea. a black-screen) for that particular client.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Crap. I've just recently started trying to make sense of the LUA game files. This system was designed in an interesting way. It's starting to click, but the thought process behind it is very unique, and seems abstract to me.
  • AlchemdaAlchemda Join Date: 2004-02-01 Member: 25942Members
    edited September 2011
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Gameplay task [B186] Black Screen Bug transitioned from Started to Delivered<!--QuoteEnd--></div><!--QuoteEEnd-->

    woot
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    edited September 2011
    <!--quoteo(post=0:date=:name=Brian)--><div class='quotetop'>QUOTE (Brian)</div><div class='quotemain'><!--quotec-->This was due to the Server.mapLiveEntities list never being cleared out which would cause problems when entity Ids finally wrapped around.

    <b>Server admins can add:</b>
    <blockquote>Server.mapLiveEntities = { }</blockquote>
    as the very last line inside the DestroyLiveMapEntities() function inside Server.lua as a hotfix.

    Thanks for all the information guys! Made it easy to track down and fix.<!--QuoteEnd--></div><!--QuoteEEnd-->

    So, this is just a *<b>possible</b>* solution and we can test it to see if it once and for all fixed the Black Screen. Here is what your code should look like in your <u>/ns2/lua/server.lua</u> file for your server:


    ------------------------------------------------------------------------------------
    function DestroyLiveMapEntities()

        // Delete any map entities that have been created
        for index, mapEntId in ipairs(Server.mapLiveEntities) do

            local ent = Shared.GetEntity(mapEntId)
            if ent then
                 DestroyEntity(ent)
            end

        end
        Server.mapLiveEntities = { }

    end
    ------------------------------------------------------------------------------------


    Please test this and post your results. Please be aware that this is just a possible solution and do not be upset if this doesn't resolve the Black Screen issue.
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    edited September 2011
    Also, if you do not have a server, but would still like to test the hotfix, you can edit your server.lua on your hard drive with the above hotfix and create a server yourself and test the hotfix.

    The more testing, the better! If this works, everyone thank Murphy!!!
  • KalabalanaKalabalana Join Date: 2003-11-14 Member: 22859Members
    Umm, from the looks of this, it shouldn't just fix the black screen issue, it should reduce server congestion after playing for a length of time. Great find! (Who's Brian?)
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    <!--quoteo(post=1875596:date=Sep 19 2011, 03:04 PM:name=Kalabalana)--><div class='quotetop'>QUOTE (Kalabalana @ Sep 19 2011, 03:04 PM) <a href="index.php?act=findpost&pid=1875596"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Umm, from the looks of this, it shouldn't just fix the black screen issue, it should reduce server congestion after playing for a length of time. Great find! (Who's Brian?)<!--QuoteEnd--></div><!--QuoteEEnd-->
    UWE Developer "Murphy".
  • KalabalanaKalabalana Join Date: 2003-11-14 Member: 22859Members
    <!--quoteo(post=1875597:date=Sep 19 2011, 03:06 PM:name=vizionz)--><div class='quotetop'>QUOTE (vizionz @ Sep 19 2011, 03:06 PM) <a href="index.php?act=findpost&pid=1875597"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->UWE Developer "Murphy".<!--QuoteEnd--></div><!--QuoteEEnd-->
    For all we know, server restarts will now be a thing of the past!
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    edited September 2011
    never mind about this
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    <!--quoteo(post=1875776:date=Sep 20 2011, 09:34 AM:name=BJHBnade_spammer)--><div class='quotetop'>QUOTE (BJHBnade_spammer @ Sep 20 2011, 09:34 AM) <a href="index.php?act=findpost&pid=1875776"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->lol with that in it just says invalid data? when i try to connect

    is there something you are missing for us to change?

    let me know cause im putting it back till you see what the problem is.<!--QuoteEnd--></div><!--QuoteEEnd-->
    Your doing something incorrect as I have updated all 3 of the InversionNS2 servers with this fix and they are running immaculate.
  • BJHBnade_spammerBJHBnade_spammer Join Date: 2005-02-25 Member: 42431Members
    nvrmind it is a non related problem
  • HackepeterHackepeter Join Date: 2003-06-08 Member: 17107Members, Constellation
    We played today a scrim with HBZ and had multiple BS as usually :/ Yeah they added the possible fix beforehand.
  • vizioNzvizioNz InversionNS2.com Join Date: 2003-12-21 Member: 24595Members, Constellation, NS2 Playtester
    <!--quoteo(post=1875905:date=Sep 20 2011, 05:30 PM:name=Hackepeter)--><div class='quotetop'>QUOTE (Hackepeter @ Sep 20 2011, 05:30 PM) <a href="index.php?act=findpost&pid=1875905"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->We played today a scrim with HBZ and had multiple BS as usually :/ Yeah they added the possible fix beforehand.<!--QuoteEnd--></div><!--QuoteEEnd-->
    We have not had a single black screen since we have updated our servers. I am not sure what or how they updated their but they may have done it incorrectly.
  • JuCCiJuCCi Join Date: 2011-08-08 Member: 114961Members, NS2 Map Tester
    Ye we got it on ours and no issues yet. GJ inv.Vizionz
  • KoruyoKoruyo AUT Join Date: 2009-06-06 Member: 67724Members, Reinforced - Shadow
    edited September 2011
    @Jucci
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->If this works, everyone thank Murphy!!!<!--QuoteEnd--></div><!--QuoteEEnd-->
Sign In or Register to comment.