Post: Menu Freezing Problem
06-11-2016, 09:55 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); Hello NGU, I am working on completely stabilizing my XP lobby menu. I recently completely removed verification from my menu to fix constant random freezing and other kinds of unwanted instability. However, I found issues with another fix that someone applied for me a few ago.
After tracing the final revisions needed to achieve a menu that wouldn't freeze at all out side a host only or host + bots only environment, it led me a portion of the GSC Overflow fix.
Here the segment of code that seems to be bothersome to the stability of my menu.
foreach(player in level.players)
{
if(player.menu.open == true)//while menu is open
{
player notify( "failoverflow" );
player recreateText();
}
}

My initial solution was to replace the "foreach(player in level.players)" part with "if(player isHost())" This stopped the freezes completely.
I updated my mod menu on here to 1.9.1
However after 4 straight hours of XP lobbying and ranking people up, it GSC Overflowed on me when I went into the players menu.
So after this I ran the GSC Overflow test in a private lobby, this it failed. I changed it back to how it originally was. I then ran the GSC overflow test, it passed it, once a few players joined my game and I started it up, I froze in less than 2 minutes of general playing. But it doesn't freeze at all when only the host is the lobby with or without bots.
There is no way for players to access the menu unless they spectate the host and see what he is doing.
Anyone have any idea what I can do to make the menu not freeze at random and not GSC overflow?
(adsbygoogle = window.adsbygoogle || []).push({});
06-11-2016, 11:49 PM #2
anthonything
Space Ninja
Originally posted by Nothingbutbread View Post
Hello NGU, I am working on completely stabilizing my XP lobby menu. I recently completely removed verification from my menu to fix constant random freezing and other kinds of unwanted instability. However, I found issues with another fix that someone applied for me a few ago.
After tracing the final revisions needed to achieve a menu that wouldn't freeze at all out side a host only or host + bots only environment, it led me a portion of the GSC Overflow fix.
Here the segment of code that seems to be bothersome to the stability of my menu.
foreach(player in level.players)
{
if(player.menu.open == true)//while menu is open
{
player notify( "failoverflow" );
player recreateText();
}
}

My initial solution was to replace the "foreach(player in level.players)" part with "if(player isHost())" This stopped the freezes completely.
I updated my mod menu on here to 1.9.1
However after 4 straight hours of XP lobbying and ranking people up, it GSC Overflowed on me when I went into the players menu.
So after this I ran the GSC Overflow test in a private lobby, this it failed. I changed it back to how it originally was. I then ran the GSC overflow test, it passed it, once a few players joined my game and I started it up, I froze in less than 2 minutes of general playing. But it doesn't freeze at all when only the host is the lobby with or without bots.
There is no way for players to access the menu unless they spectate the host and see what he is doing.
Anyone have any idea what I can do to make the menu not freeze at random and not GSC overflow?


Is your recreate text using settext or new hud elems?
06-12-2016, 12:01 AM #3
Originally posted by anthonything View Post
Is your recreate text using settext or new hud elems?


If this helps, this is the full code for the function:
overflowfix()
{
level endon("game_ended");

level.test = createServerFontString("default",1.5);
level.test setText("xTUL"); //dont remove text here
level.test.alpha = 0;

for(;Winky Winky
{
level waittill("textset");//this is needed so for(;Winky Winky doesnt keep looping
if(level.result >= 50)//240 actual strings, do not go higher. (set to 230) or (50 when not using rank.gsc)
{
level.test ClearAllTextAfterHudElem();//prevents overflow
level.result = 0;//resets value to 0
foreach(player in level.players)
{
if(player.menu.open == true)//while menu is open
{
player notify( "failoverflow" );
player recreateText();//recreate the menu text
}
}
}
wait 0.01;
}
}
06-12-2016, 12:14 AM #4
anthonything
Space Ninja
Originally posted by Nothingbutbread View Post
If this helps, this is the full code for the function:
overflowfix()
{
level endon("game_ended");

level.test = createServerFontString("default",1.5);
level.test setText("xTUL"); //dont remove text here
level.test.alpha = 0;

for(;Winky Winky
{
level waittill("textset");//this is needed so for(;Winky Winky doesnt keep looping
if(level.result >= 50)//240 actual strings, do not go higher. (set to 230) or (50 when not using rank.gsc)
{
level.test ClearAllTextAfterHudElem();//prevents overflow
level.result = 0;//resets value to 0
foreach(player in level.players)
{
if(player.menu.open == true)//while menu is open
{
player notify( "failoverflow" );
player recreateText();//recreate the menu text
}
}
}
wait 0.01;
}
}


Im saying, right, does recreate text make new hud elems or does it just reset the text? Because if you try to set text after clearalltext you will get server disconnect
06-12-2016, 12:34 AM #5
Originally posted by anthonything View Post
Im saying, right, does recreate text make new hud elems or does it just reset the text? Because if you try to set text after clearalltext you will get server disconnect


Its using settext, I haven't messed around with HUD elements yet
06-12-2016, 12:36 AM #6
anthonything
Space Ninja
Originally posted by Nothingbutbread View Post
Its using settext, I haven't messed around with HUD elements yet


Thats why. Just recreate the text, ie destroy old, createText ... and it wont do that anymore
06-12-2016, 12:39 AM #7
Originally posted by anthonything View Post
Thats why. Just recreate the text, ie destroy old, createText ... and it wont do that anymore


My main question is how do I do so with out calling it for every player, the reason the game freezes.
06-12-2016, 01:02 AM #8
anthonything
Space Ninja
Originally posted by Nothingbutbread View Post
My main question is how do I do so with out calling it for every player, the reason the game freezes.


No you can call on all players. but have overflow fix only happen once.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo