Y_Malloc : YSI Warning - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Y_Malloc : YSI Warning (
/showthread.php?tid=642781)
Y_Malloc : YSI Warning -
Dayrion - 07.10.2017
Hello.
I've a warning since some times. I though I solved it but apparently nop.
Код:
YSI Warning: y_malloc set up via "CallLocalFunction", memory corruption is a remote possibility
****** said YSI include should be at the top of the script except before fixes.inc.
But I still have the warning:
PHP код:
#include <a_samp>
#include <fixes>
#include <crashdetect>
#define DYNAMIC_MEMORY 12500
#include <YSI\YSI\y_malloc>
#include <YSI\YSI\y_iterate>
#include <YSI\YSI\y_va>
#include <YSI\YSI\y_inline>
#include <a_mysql_yinline>
Crash detect must be included too otherwise I'll get an error
Re: Y_Malloc : YSI Warning -
Dayrion - 09.10.2017
uppppp :c
Re: Y_Malloc : YSI Warning -
whadez - 09.10.2017
YSI includes should be below a_samp.
Try to put crashdetect below YSI includes.
^ Dont mind the above.
Have you tried to update your includes to the latest?
My gamemode looks like this, and it works perfectly (I had the same issue but I changed the include order and it's gone now)
Maybe do some further debugging and start by temporary "removing" the "useless" includes, to see if the problem still occurs, so you can detect which include is causing the trouble.
Re: Y_Malloc : YSI Warning -
Dayrion - 09.10.2017
Quote:
Originally Posted by ******
That warning comes when you use y_malloc from OnGameModeInit, but it is called by CallLocalFunction, which alters the heap. Try moving the YSI includes to after a_samp and before most other things (except fixes.inc).
|
--------------
Код:
#include <a_samp>
#define DYNAMIC_MEMORY 12500
#include <YSI\YSI\y_malloc>
#include <YSI\YSI\y_iterate>
#include <YSI\YSI\y_va>
#include <YSI\YSI\y_inline>
Error:
Код:
\YSI_Coding\y_malloc/heapalloc.inc(339) : error 004: function "Malloc_OnRuntimeError" is not implemented
crashdetect is needed
--------------
Код:
#include <a_samp>
#include <crashdetect>
#define DYNAMIC_MEMORY 12500
#include <YSI\YSI\y_malloc>
#include <YSI\YSI\y_iterate>
#include <YSI\YSI\y_va>
#include <YSI\YSI\y_inline>
No more warnings but it's contradic what ****** said