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

Bug in Amxmodx mm-p support code. Workaround and fix here.


  
 
 
Thread Tools Display Modes
Author Message
evilspy
Member
Join Date: Jun 2004
Location: Finland
Old 03-11-2005 , 06:25   Bug in Amxmodx mm-p support code. Workaround and fix here.
#1

The mm-p support code that I gave to you guys has a bug. It leaves two "++iter; // Skip core"-lines in fakemeta.cpp active even if mm-p support mode is active. This causes loading first plugin to be skipped. Sorry.

Fixed Amxmodx:
http://forums.alliedmods.net/showthr...?p=96128#99831

Fix (Amxmodx 1.01):
On fakemeta.cpp lines 2609 and 2621:
Code:
	++iter;			// Skip core
change to
Code:
	// evilspy:
	//using metamod p-extensions?
	if(!gpMetaPExtFuncs) {
		++iter;			// Skip core
	}
Old:
Quote:
Workaround:
Use Metamod 1.17.4p20 and unzip attached 'bugfix_amxx.zip' to 'addons/amxmodx/modules'. Add following lines at top of your 'addons/amxmodx/configs/modules.ini':
Code:
bugfix_amxx_i386.so
bugfix_amxx.dll
bugfix_amxx_amd64.so
This module works with normal metamod too.
Attached Files
File Type: zip bugfix_amxx.zip (9.5 KB, 934 views)
__________________
^^ ^^ ^^ ^^
Metamod-P
- http://metamod-p.sf.net/
evilspy is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 03-11-2005 , 08:20  
#2

No problem, it's my fault, should have tested it before commiting; I'm just too lazy ;)
__________________
hello, i am pm
PM is offline
cola
Junior Member
Join Date: Apr 2004
Old 03-11-2005 , 10:39  
#3

i got the error

how can i fix it?
Attached Thumbnails
Click image for larger version

Name:	error.jpg
Views:	954
Size:	53.2 KB
ID:	2502  
__________________
cola is offline
ZodiacMindwarp
Member
Join Date: Jul 2004
Location: Ventura, CA
Old 03-11-2005 , 12:47  
#4

I get the same error. Hullu we need a "p21" to fix it properly.

Z
__________________


RichNet.tv NS:COMBAT:SoCal[RNT]
12.191.247.153:27015
RichNet.tv NS:MvM:SoCal[RNT]
12.191.247.154:27015
RichNet.tv Quake III HeadHunters SoCal[RNT]
66.254.94.10:27960
ZodiacMindwarp is offline
Send a message via AIM to ZodiacMindwarp
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 03-11-2005 , 13:41  
#5

Quote:
Originally Posted by ZodiacMindwarp
I get the same error. Hullu we need a "p21" to fix it properly.

Z
Nope, there should be a new AMXX-fix release soon.
__________________
hello, i am pm
PM is offline
evilspy
Member
Join Date: Jun 2004
Location: Finland
Old 03-11-2005 , 13:44  
#6

Bugfix causes warning message I know. The bugfix fixes the bug by just being first module AMXx sees. Since AMXx skips loading first module with metamod (Meta_Query) and bugfix is the first module bug is avoided. You could use any other metamod plugin (not amxx module) in place of bugfix.

Bug happens because AMXx tries later load (AMXX_Query) and use modules that are not loaded with using metamod (Meta_Query) and when modules are not loaded properly they cause crashes.
__________________
^^ ^^ ^^ ^^
Metamod-P
- http://metamod-p.sf.net/
evilspy is offline
ZodiacMindwarp
Member
Join Date: Jul 2004
Location: Ventura, CA
Old 03-11-2005 , 14:47  
#7

Ah, Ok, I TOTALLY understand now. So this file bugfix_amxx.dll does not actually do anything it is just there to occupy that 1st line module reading. Correct?

Z
__________________


RichNet.tv NS:COMBAT:SoCal[RNT]
12.191.247.153:27015
RichNet.tv NS:MvM:SoCal[RNT]
12.191.247.154:27015
RichNet.tv Quake III HeadHunters SoCal[RNT]
66.254.94.10:27960
ZodiacMindwarp is offline
Send a message via AIM to ZodiacMindwarp
evilspy
Member
Join Date: Jun 2004
Location: Finland
Old 03-11-2005 , 15:01  
#8

right
__________________
^^ ^^ ^^ ^^
Metamod-P
- http://metamod-p.sf.net/
evilspy is offline
BAILOPAN
Join Date: Jan 2004
Old 03-12-2005 , 11:38  
#9

Okay, we've recompiled binaries.
To test, remove evilspy's fix thingy and replace your amxmodx_mm DLL:

http://www.acm.wpi.edu/~dvander/amxmodx_mm.dll
http://www.acm.wpi.edu/~dvander/amxmodx_mm_i386.so
http://www.acm.wpi.edu/~dvander/amxmodx_mm_amd64.so
__________________
egg
BAILOPAN is offline
jsterling
SourceMod Donor
Join Date: Mar 2004
Location: Denver, CO, USA
Old 03-12-2005 , 14:12  
#10

Ok, I've installed it on a win server running version 20 of metamod-p and it has fixed crashes I was getting with certain functions in plugins I still see these meta errors at server startup although functionality seems fine. Why is it trying to load the plugins twice? Is it normal? Thanks.

Code:
L 03/12/2005 - 12:02:29: Log file started (file "logs\L0312020.log") (game "cstrike") (version "47/1.1.2.5/2834")
L 03/12/2005 - 12:02:30: [META] Metamod v1.17.4p20  2005/03/05
L 03/12/2005 - 12:02:30: [META] by Will Day
L 03/12/2005 - 12:02:30: [META]    http://www.metamod.org/
L 03/12/2005 - 12:02:30: [META]  Patch: Metamod-P (mm-p) v20
L 03/12/2005 - 12:02:30: [META]  by Jussi Kivilinna
L 03/12/2005 - 12:02:30: [META]     http://koti.mbnet.fi/axh/
L 03/12/2005 - 12:02:30: [META] compiled: Mar  5 2005, 14:47:15 EET (optimized)
L 03/12/2005 - 12:02:30: [META] Recognized game 'cstrike'; using dllfile 'mp.dll'
L 03/12/2005 - 12:02:30: [META] Game DLL for 'Counter-Strike' loaded successfully
L 03/12/2005 - 12:02:30: [META] ini: Begin reading plugins list: e:/hlserver3/cstrike/addons/metamod/plugins.ini
L 03/12/2005 - 12:02:30: [META] ini: Read plugin config for: <amxmodx_mm.dll>
L 03/12/2005 - 12:02:30: [META] ini: Read plugin config for: <hlguard_mm_optimized.dll>
L 03/12/2005 - 12:02:30: [META] ini: Finished reading plugins list: e:/hlserver3/cstrike/addons/metamod/plugins.ini; Found 2 plugins to load
L 03/12/2005 - 12:02:30: [META] dll: Loading plugins...
L 03/12/2005 - 12:02:30: [FUN] dev: called: GiveFnptrsToDll
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'Fun': Fun v1.01 Mar  9 2005, AMX Mod X Dev Team
L 03/12/2005 - 12:02:30: [ENGINE] dev: called: GiveFnptrsToDll
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'Engine': Engine v1.01 Mar  9 2005, AMX Mod X Dev Team
L 03/12/2005 - 12:02:30: [FAKEMETA] dev: called: GiveFnptrsToDll
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'FakeMeta': FakeMeta v1.01 Mar  9 2005, AMX Mod X Dev Team
L 03/12/2005 - 12:02:30: [MYSQL] dev: called: GiveFnptrsToDll
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'MySQL': MySQL v1.01 Mar  9 2005, AMX Mod X Dev Team
L 03/12/2005 - 12:02:30: [CSTRIKE] dev: called: GiveFnptrsToDll
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'CStrike': CStrike v1.01 Mar  9 2005, AMX Mod X Dev Team
L 03/12/2005 - 12:02:30: [CSX] dev: called: GiveFnptrsToDll
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'CSX': CSX v1.01 Mar  9 2005, AMX Mod X Dev Team
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'AMX Mod X': AMX Mod X v1.01 Mar 11 2005, AMX Mod X Dev Team
L 03/12/2005 - 12:02:30: [HLGUARD] HLGuard 1.72 by The Z Project
L 03/12/2005 - 12:02:30: [HLGUARD] http://www.thezproject.org/
L 03/12/2005 - 12:02:30: [HLGUARD] Compiled: Mar  6 2005 00:19:02
L 03/12/2005 - 12:02:30: [META] dll: Loaded plugin 'HLGuard': HLGuard v1.72 06/03/2005, The Z Project
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Not loading plugin 'Fun'; already loaded (status=running)
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Failed to load plugin 'fun_amxx.dll'
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Not loading plugin 'Engine'; already loaded (status=running)
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Failed to load plugin 'engine_amxx.dll'
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Not loading plugin 'FakeMeta'; already loaded (status=running)
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Failed to load plugin 'fakemeta_amxx.dll'
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Not loading plugin 'MySQL'; already loaded (status=running)
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Failed to load plugin 'mysql_amxx.dll'
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Not loading plugin 'CStrike'; already loaded (status=running)
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Failed to load plugin 'cstrike_amxx.dll'
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Not loading plugin 'CSX'; already loaded (status=running)
L 03/12/2005 - 12:02:30: [META] ERROR: dll: Failed to load plugin 'csx_amxx.dll'
L 03/12/2005 - 12:02:30: [META] dll: Finished loading 2 plugins
L 03/12/2005 - 12:02:42: Log file closed
meta list output

Code:
          [ 1] AMX Mod X        RUN   -    amxmodx_mm.dll    v1.01     ini   ANY   ANY  
          [ 2] HLGuard          RUN   -    hlguard_mm_optim  v1.72     ini   Chlvl Chlvl
          [ 3] Fun              RUN   -    fun_amxx.dll      v1.01     pl1   ANY   ANY  
          [ 4] Engine           RUN   -    engine_amxx.dll   v1.01     pl1   ANY   ANY  
          [ 5] FakeMeta         RUN   -    fakemeta_amxx.dl  v1.01     pl1   ANY   ANY  
          [ 6] MySQL            RUN   -    mysql_amxx.dll    v1.01     pl1   ANY   ANY  
          [ 7] CStrike          RUN   -    cstrike_amxx.dll  v1.01     pl1   ANY   ANY  
          [ 8] CSX              RUN   -    csx_amxx.dll      v1.01     pl1   ANY   ANY  
         8 plugins, 8 running
jsterling is offline
Send a message via AIM to jsterling
 



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 21:14.


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