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

Module: Okapi


Post New Thread Reply   
 
Thread Tools Display Modes
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-04-2015 , 13:46   Re: Module: Okapi
Reply With Quote #101

You tested under linux, right ? Used 65 or 67 ?

Also tested in a friend server, it crash immediately after you restart the server. Idk what can I do wrong. What I do is:
1. Start the HLDS
2. It works correctly, hook is called, function is found.
3. Change map/do a restart
4. Server crash with the error I have posted.

Hooking a non-virtual function works fine for example.
__________________
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2015 , 13:47   Re: Module: Okapi
Reply With Quote #102

linux, 65. I would wildly guess that your plugin or something do something unexpected. I've tested essentially with base plugin + your short plugin above modified to add the hook. Have nothing else.

If you want me to reproduce an issue, then give me a simple way to reproduce, including what I should have as plugins, amxx version, etc. Ideally having a zip of addons/ so I can test as it is.
__________________

Last edited by Arkshine; 08-04-2015 at 14:12.
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-04-2015 , 14:28   Re: Module: Okapi
Reply With Quote #103

Ok, here is my addons folder. The test plugin is CheckWinConditionsTest.

1.Put the plugin and start the server.
2.It should work fine. Restart/change map.
3.Seg fault should occur.
Attached Files
File Type: zip addons.zip (7.68 MB, 164 views)
__________________

Last edited by HamletEagle; 08-04-2015 at 14:29.
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2015 , 15:42   Re: Module: Okapi
Reply With Quote #104

What is the exact source code of the plugin?
__________________
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-04-2015 , 15:46   Re: Module: Okapi
Reply With Quote #105

The one that I posted.
PHP Code:
#include <amxmodx>
#include <okapi>

public plugin_precache()
{
    new const 
InstallGameRulesSignature[] = {0x68,0xDEF,0xDEF,0xDEF,0xDEF,0xFF,0xDEF,0xDEF,0xDEF,0xDEF,0xDEF,0x83,0xDEF,0xDEF,0xFF,0xDEF,0xDEF,0xDEF,0xDEF,0xDEF,0xA1,0xDEF,0xDEF,0xDEF,0xDEF,0xD9,0xDEF,0xDEF,0xD8,0xDEF,0xDEF,0xDEF,0xDEF,0xDEF,0xDF}
    new const 
InstallGameRulesSymbol[] = "_Z16InstallGameRulesv"

    
new okapi_func:InstallGameRules okapi_build_function(OkapiGetFunctionAddress(InstallGameRulesSignaturesizeof InstallGameRulesSignatureInstallGameRulesSymbol), arg_int)
    
okapi_add_hook(InstallGameRules"OnInstallGameRules", .post 1)
}  

public 
OnInstallGameRules()
{
    new 
Object okapi_get_orig_return()
    new 
CheckWinConditionsFuncOffset 65
    
new okapi_func:CheckWinConditions okapi_build_vfunc_ptr(ObjectCheckWinConditionsFuncOffsetarg_void
}  

OkapiGetFunctionAddress(const FunctionSignature[] = ""SignatureLen, const FunctionSymbol[])
{
    new 
OkapiAddress

    
if
    (
        (
OkapiAddress okapi_mod_get_symbol_ptr(FunctionSymbol)) || 
        (
OkapiAddress okapi_mod_find_sig(FunctionSignatureSignatureLen))
    )
    {
        return 
OkapiAddress
    
}
    
    return 
PLUGIN_CONTINUE

__________________
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-05-2015 , 03:40   Re: Module: Okapi
Reply With Quote #106

Your issue is with csstats.dat file.

I'm not totally sure, but you have likely corrupted data or similar, so when CSX reads this, it fucks up the memory, and as side-effect fucks up Okapi.
I've tried with CSStats editor to change one value, saving, and as result it doesn't crash. So it confirms there is something corrupted somewhere in this file.

Since not used, delete it.
__________________

Last edited by Arkshine; 08-05-2015 at 03:50.
Arkshine is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 08-06-2015 , 01:44   Re: Module: Okapi
Reply With Quote #107

Quote:
Originally Posted by Arkshine View Post
Your issue is with csstats.dat file.

I'm not totally sure, but you have likely corrupted data or similar, so when CSX reads this, it fucks up the memory, and as side-effect fucks up Okapi.
I've tried with CSStats editor to change one value, saving, and as result it doesn't crash. So it confirms there is something corrupted somewhere in this file.

Since not used, delete it.
Shhhhiieeet man, how did you discovered that easily? Wow, nice treatment with finding bugs
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-06-2015 , 03:39   Re: Module: Okapi
Reply With Quote #108

Well I'm not sure. it looks like Okapi fucks up memory at restart. While I could reproduce an issue under my server with HamletEagle's installation where it was crashing at map start because of this .dat file ; it did not solve the crash he has, which happens always after a restart. I was able to reproduce the behavior under a VM with an Ubuntu-based OS though. Basically I would not recommend to use Okapi for now.
__________________
Arkshine is offline
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 11-07-2015 , 04:33   Re: Module: Okapi
Reply With Quote #109

Is Okapi still alive? Any updates?
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 01-07-2016 , 07:05   Re: Module: Okapi
Reply With Quote #110

Quote:
Originally Posted by KORD_12.7 View Post
Is Okapi still alive? Any updates?
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7
Reply



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 07:26.


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