alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
985 stars 423 forks source link

Failed to load extension if more than 40 extensions #1722

Closed Kxnrl closed 2 years ago

Kxnrl commented 2 years ago

Help us help you

Environment

Description

The 40th one extension always failed to load. The problem has nothing to do with the extension itself.

Problematic Code (or Steps to Reproduce)

install 40+ extensions
load one by one

Logs

image

asherkin commented 2 years ago

Operating System version: Win2016/2019

It looks like this is likely a Windows limitation around FLS slots. Windows XP through to Windows 10 1809 had a limit of 128 slots, each CRT instance can require 1-2 slots, we statically link it so each SM and extension DLL will have an instance, combined with the game that seems in the right ballpark.

In Windows 10 1903 the limit was raised to 4096 slots, so if this is the issue that would certainly solve it.

I can't find the information on the limits for the Server editions, Server 2016 would definitely not have the increased limit, Server 2019 appears to be 1809 which is just before the limit was increased. The "Windows Server" (no year) SKUs start from 1909 which would have the increased limit as long as they have kernel parity with the desktop versions.