YSI-Includes
YSI-Includes copied to clipboard
Crash
Hello. Faced a problem:
[02:49:44] [debug] Run time error 5: "Invalid memory access"
[02:49:44] [debug] AMX backtrace:
[02:49:44] [debug] #0 0000ef1c in ?? (... <1073741823 arguments>) at c:\server\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:30
[02:49:44] [debug] #1 0000f714 in public OnPlayerClickPlayerTextDraw (... <2 arguments>) at c:\server\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:31
What is the problem? (Sorry for my English)
Hi!
Do you have OnPlayerClickPlayerTextDraw
in your code? Or you don't have it at all and crash happens either way?
Of course.
After updating the library, the compiler began to generate errors, which is longer name public than 31 characters. In all the files I did this:
OnPRClickPlayerTextDraw(playerid, PlayerText:playertextid)
And above is registered
DEFINE_HOOK_REPLACEMENT(Player, PR);
The default shortening for textdraw functions is TD
, try using OnPlayerClickPlayerTD
I registered the replacement of TextDraw with TD, but I got an error that "@_yHTextDraw" already defined
Sorry, never worked with YSI :)
UPD: Compiled, wait please.
No worries. Registered as in added your own DEFINE_HOOK_REPLACEMENT(TextDraw, TD);
? You don't have to register the replacement, it's one of ours "built-in" replacements: https://github.com/Misiur/YSI-Includes/blob/e9cf7a1e4154517f2b06cbd36efd0742c2cc3408/YSI_Coding/y_hooks/impl.inc#L117-L125
Thank you, I understand you.
Now there was another crash
[00:52:03] [debug] AMX backtrace:
[00:52:03] [debug] #0 00000005 in OnPlayerConnect (playerid=6, ... <1073741822 arguments>) at <unknown file>:0
[00:52:03] [debug] #1 00016294 in public OnPlayerConnect () at c:\server\pawno\include\YSI\..\YSI_Data\..\YSI_Coding\..\YSI_Internal\y_cgen.inc:115
Hm, I've got check this as there's a new report in #264 similar to yours. Does this crash happen on a linux host as well? If so, does it work normally on a windows host?
Yes, most likely
UPD: This crash appears during a large influx of people on the server...
I'm testing this on Ubuntu VM, and could not reproduce so far (but my code is a sterile load test sample, not a normal complex gamemode). I have to ask you some more info:
- Are you running the code on CentOS? If so, which version?
- How did you obtain YSI? From releases, via sampctl, or via git?
- How did you obtain amx_assembly? Methods as above
- Which compiler are you using? Standard bundled with samp server, russian one, or latest Zeex's?
- Do you use some nonstandard flags, such as
-d3
or-O2
? - Do you use JIT plugin?
I really want to find what can cause this, and this will help me to do so. Thank you
- Ubuntu 16.04
- Download from your github.
- Download from github.
- Zeex, not the last because the mod does not perceive the last not last.
- -d3.
- No.
Sorry for ambiguity: By github you mean downloaded .tar.gz/.zip
from releases page, or pulled directly using git? That is important as I haven't updated the release package and there were some major updates since then.
I came here: https://github.com/Misiur/YSI-Includes Clicked on Clone or download