Raised This Month: $51 Target: $400
 12% 

[1.76] Not all plugins-*.ini files get loaded & miscstats error


  
 
 
Thread Tools Display Modes
deejay87
Senior Member
Join Date: Apr 2004
Location: Pays du Glaude - France
Old 09-19-2006 , 16:32   Re: [1.76] Not all plugins-*.ini files get loaded & miscstats error
#11

i have the same errors
Code:
2:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-enterleavemessage.ini")
22:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-chickenmod.ini")
22:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-banmicro.ini")
22:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-autorestart.ini")
22:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-atac.ini")
22:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-anticamping.ini")
22:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-teamalert.ini")
22:24:46 L 09/19/2006 - 22:28:18: [AMXX] Plugins list not found (file "addons/amxmodx/plugins/plugins-stopsay.ini")
just to tell with amxmodx 1.75a i don't have this problems , all work perfect, it's in 1.76 this problems comes ......

Files in configs
amxx_configsdir addons/amxmodx/configs

Why the files don't work in configs dir ?
__________________

Last edited by deejay87; 09-19-2006 at 16:40.
deejay87 is offline
Send a message via MSN to deejay87 Send a message via Skype™ to deejay87
BAILOPAN
Join Date: Jan 2004
Old 09-19-2006 , 16:54   Re: [1.76] Not all plugins-*.ini files get loaded & miscstats error
#12

I'm looking into this...
__________________
egg
BAILOPAN is offline
juKay
Member
Join Date: Mar 2004
Location: Sweden
Old 09-20-2006 , 08:41   Re: [1.76] Not all plugins-*.ini files get loaded & miscstats error
#13

I have done some testing today and this error occurs if you have 5 custom plugins-*.ini files or more, it will load the first four it finds in the directory.

Here is what a strace gives:

Code:
munmap(0x43b7a000, 4096)                = 0
open("cstrike/addons/amxmodx/configs/plugins.ini", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43b7a000
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x43b7a000, 4096)                = 0
open("cstrike/addons/amxmodx/configs/", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 5
fstat64(5, {st_mode=S_IFDIR|0755, st_size=24576, ...}) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
getdents64(5, /* 21 entries */, 4096)   = 704
getdents64(5, /* 0 entries */, 4096)    = 0
close(5)                                = 0
open("cstrike/addons/amxmodx/configs/plugins-5.ini", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43b7a000
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x43b7a000, 4096)                = 0
open("cstrike/addons/amxmodx/configs/plugins-4.ini", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43b7a000
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x43b7a000, 4096)                = 0
open("cstrike/addons/amxmodx/configs/plugins-3.ini", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43b7a000
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x43b7a000, 4096)                = 0
open("cstrike/addons/amxmodx/configs/plugins-2.ini", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43b7a000
read(5, "", 4096)                       = 0
close(5)                                = 0
munmap(0x43b7a000, 4096)                = 0
open("cstrike/addons/amxmodx/plugins/plugins-1.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
Check the last open() for the plugins-1.ini file. It has suddenly switched from cstrike/addons/amxmodx/configs/ to cstrike/addons/amxmodx/plugins.

So I added some debug code and found out that the problem is inside meta_api.cpp. The function LoadExtraPluginsFromDir should loop the config directory for any plugins-*.ini files and it also does this. However in the while loop after, BuildPluginFileList(initialdir, files);, initaldir gets changed after four times hence the fifth time it have changed to say addons/amxmodx/plugins instead of addons/amxmodx/configs.

Quick fix is to change:

Code:
                snprintf(path, sizeof(path)-1, "%s/%s",
                        initialdir,
                        pString->c_str());
to:

Code:
                snprintf(path, sizeof(path)-1, "%s/%s",
                        get_localinfo("amxx_configsdir", "addons/amxmodx/configs"),
                        pString->c_str());
also I think the thing that causing this is a memory corruption thing in the build_pathname_r() from modules.cpp

Last edited by juKay; 09-20-2006 at 09:09.
juKay is offline
juKay
Member
Join Date: Mar 2004
Location: Sweden
Old 09-20-2006 , 20:55   Re: [1.76] Not all plugins-*.ini files get loaded & miscstats error
#14

Here you have binaries for Linux, fixed temporary untill the dev team has a chanse to look at this.

Last edited by BAILOPAN; 09-21-2006 at 13:19.
juKay is offline
BAILOPAN
Join Date: Jan 2004
Old 09-21-2006 , 13:21   Re: [1.76] Not all plugins-*.ini files get loaded & miscstats error
#15

Thanks for the reports, and thanks for the helpful analysis juKay. This is fixed as revision 3092 and will be distributed in a quick update, 1.76a, in the next day or two.

I decided this was best fixed by adding a get_localinfo_r() as there is a build_pathname_r(). As you can see, re-entrancy is a huge problem in AMX Mod X. When OLO wrote AMX Mod, he did everything through global storage/buffers, and this has been a plague to me ever since.

Side note, in the future please ask before distributing binaries of core on the forums, especially in bug reports, where people are more likely to download fixes thinking they're official.
__________________
egg
BAILOPAN is offline
juKay
Member
Join Date: Mar 2004
Location: Sweden
Old 09-21-2006 , 13:22   Re: [1.76] Not all plugins-*.ini files get loaded & miscstats error
#16

sorry about that.
juKay is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode