This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Module: Okapi


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

Not again for the bug, I'm here again asking something

It crash when getting a virtual function(tried more than one, it's not necessary about CheckWinConditions). Tried with +2(I remember it is 65, but eh), still crash.

Code:
assert_20150804093827_1.dmp[3631]: Uploading dump (out-of-process)
/tmp/dumps/assert_20150804093827_1.dmp
Segmentation fault (core dumped)
__________________

Last edited by HamletEagle; 08-04-2015 at 12:50.
HamletEagle is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-04-2015 , 13:21   Re: Module: Okapi
Reply With Quote #2

Tried, no issue. Even after several restart. Hook is well called.
Sounds like again something you did not tested properly.
Using latest dev version + official okapi version.
__________________
Arkshine is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-04-2015 , 13:46   Re: Module: Okapi
Reply With Quote #3

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 #4

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 #5

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, 176 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 #6

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 #7

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 #8

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 #9

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 #10

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


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