Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] predictable_unloader issue #710

Open
vikingo12 opened this issue Sep 30, 2023 · 9 comments
Open

[BUG] predictable_unloader issue #710

vikingo12 opened this issue Sep 30, 2023 · 9 comments

Comments

@vikingo12
Copy link
Contributor

Describe the bug
the plugin sometimes unloads all plugins(except for itself) without loading others back

To Reproduce
Steps to reproduce the behavior:

  1. all players leave server
    2.it either works or not

Server Operating System (if applicable):
Windows

Additional context
played in coop gamemode

@blueblur0730
Copy link
Contributor

blueblur0730 commented Oct 1, 2023

Describe the bug the plugin sometimes unloads all plugins(except for itself) without loading others back

To Reproduce Steps to reproduce the behavior:

  1. all players leave server
    2.it either works or not

Server Operating System (if applicable): Windows

Additional context played in coop gamemode

predictable_unloader won't do anything unless the server command pred_unload_plugins was input. are you using the confogl? confogl do actually triggers predictable_unloader if no one else in the server for a while. and this behavior will refresh all plugins instead of just unloading them.

@blueblur0730
Copy link
Contributor

Describe the bug the plugin sometimes unloads all plugins(except for itself) without loading others back
To Reproduce Steps to reproduce the behavior:

  1. all players leave server
    2.it either works or not

Server Operating System (if applicable): Windows
Additional context played in coop gamemode

predictable_unloader won't do anything unless the server command pred_unload_plugins was input. are you confogl? confogl do actually triggers predictable_unloader if no one else in the server for a while. and this behavior will refresh all plugins instead of just unloading them.

ofc this case needs the confogl_off.cfg be excuted

@vikingo12
Copy link
Contributor Author

Describe the bug the plugin sometimes unloads all plugins(except for itself) without loading others back
To Reproduce Steps to reproduce the behavior:

  1. all players leave server
    2.it either works or not

Server Operating System (if applicable): Windows
Additional context played in coop gamemode

predictable_unloader won't do anything unless the server command pred_unload_plugins was input. are you confogl? confogl do actually triggers predictable_unloader if no one else in the server for a while. and this behavior will refresh all plugins instead of just unloading them.

ofc this case needs the confogl_off.cfg be excuted

I do use confogl and confogl_off

@blueblur0730
Copy link
Contributor

Describe the bug the plugin sometimes unloads all plugins(except for itself) without loading others back
To Reproduce Steps to reproduce the behavior:

  1. all players leave server
    2.it either works or not

Server Operating System (if applicable): Windows
Additional context played in coop gamemode

predictable_unloader won't do anything unless the server command pred_unload_plugins was input. are you confogl? confogl do actually triggers predictable_unloader if no one else in the server for a while. and this behavior will refresh all plugins instead of just unloading them.

ofc this case needs the confogl_off.cfg be excuted

I do use confogl and confogl_off

then I gusse everything is normal. if other plugins didn't reload back I guess you probably put them in plugins/optional folder.
and btw predictable_unloader will unload itself after all plugins unloaded and refreshed.

@vikingo12
Copy link
Contributor Author

Describe the bug the plugin sometimes unloads all plugins(except for itself) without loading others back
To Reproduce Steps to reproduce the behavior:

  1. all players leave server
    2.it either works or not

Server Operating System (if applicable): Windows
Additional context played in coop gamemode

predictable_unloader won't do anything unless the server command pred_unload_plugins was input. are you confogl? confogl do actually triggers predictable_unloader if no one else in the server for a while. and this behavior will refresh all plugins instead of just unloading them.

ofc this case needs the confogl_off.cfg be excuted

I do use confogl and confogl_off

then I gusse everything is normal. if other plugins didn't reload back I guess you probably put them in plugins/optional folder. and btw predictable_unloader will unload itself after all plugins unloaded and refreshed.

the plugins that are not in optional also werent loaded back

@blueblur0730
Copy link
Contributor

have to say that I have encountered this issue too. after typing sm_resetmatch in the server console, all plugins did fully unloaded but predictable_unloader didn't refresh the plugins, also didn't unload itself. kinda wired to be like this. my server is linux dedicated. I will see if I can find more if I have time on this.

@blueblur0730
Copy link
Contributor

probably the reason that timers won't work if server is hibernating. plugin itself is fine.

@fbef0102
Copy link
Contributor

fbef0102 commented Nov 7, 2023

probably the reason that timers won't work if server is hibernating. plugin itself is fine.

You are right, timer won't work if server is hibernating
https://github.com/SirPlease/L4D2-Competitive-Rework/blob/master/addons/sourcemod/scripting/predictable_unloader.sp#L110-L111

	CreateTimer(0.1, RefreshPlugins);
	CreateTimer(0.5, UnloadSelf);

I think the solution is to change hibernate before timer

	FindConVar("sv_hibernate_when_empty").SetBool(false);
	CreateTimer(0.1, RefreshPlugins);
	CreateTimer(0.5, UnloadSelf);

@fbef0102
Copy link
Contributor

fbef0102 commented Feb 12, 2024

Unloading all plugins in game is very dangerous move, some plugins doesn't disable patch or restore offset(Address) in OnPluginEnd().
And then path/move offset(Address) again when load plugin => server crash

If you suffer this problem, suggest use plugin_unload_protect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants