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

Run time error: Heap Low


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-18-2021 , 13:49   Run time error: Heap Low
Reply With Quote #1

Hello,
I tried to format a ML String using fmt()

PHP Code:
05/18/2021 20:36:20: [AMXXDisplaying debug trace (plugin "most_valuable_player.amxx"version "1.9")
05/18/2021 20:36:20: [AMXXRun time error 8heap low
05
/18/2021 20:36:20: [AMXX] [0most_valuable_player.sma::Clcmd_ChooseTrack (line 1166)
05/18/2021 20:36:20: [AMXX] [1most_valuable_player.sma::mvp_menu_handle (line 1124
Here is the code:
Code:
if(g_bExistTracks)     {         for(new i; i < g_iTracksNum; i++)         {             ArrayGetArray(g_aTracks, i, eTrack)             if(i == g_iUserSelectedTrack[id])             {                 bUsed = true             }             else             {                 bUsed = false             }             // Here is the line 1166
            formatex(szTemp, charsmax(szTemp), "\w%s %s \r%s", eTrack[szNAME], (eTrack[iVipOnly] == 1 ? fmt("%L", LANG_PLAYER, "MVP_VIP_ONLY") : ""), bUsed == true ? "#" : "")
            menu_additem(menu, szTemp)         }     }

I did some research and this may be a compiler bug.
Code above decompiled:
Code:
if (g_bExistTracks)     {         new i;         while (i < g_iTracksNum)         {             ArrayGetArray(g_aTracks, i, eTrack, -1);             if (g_iUserSelectedTrack[id] == i)             {                 bUsed = true;             }             else             {                 bUsed = false;             }             new var1;             if (bUsed == true)             {                 var1 = 22792;             }             else             {                 var1 = 22800;             }             new var2;             if (eTrack[128] == 1)             {                 fmt("%L", -1, "MVP_VIP_ONLY");
/* ERROR! Can't print expression: Heap */
 function "Clcmd_ChooseTrack" (number 31)
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 05-18-2021 at 14:11.
Shadows Adi is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-18-2021 , 15:01   Re: Run time error: Heap Low
Reply With Quote #2

I had some troubles with that aswell, you can find more info in my thread here: https://forums.alliedmods.net/showth...=170660&page=2
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-19-2021 , 00:57   Re: Run time error: Heap Low
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
I had some troubles with that aswell, you can find more info in my thread here: https://forums.alliedmods.net/showth...=170660&page=2
Thank you, but it won't work, because I need to print a ML Entry and some strings, as you can see in the code that I given.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-19-2021 , 03:32   Re: Run time error: Heap Low
Reply With Quote #4

Perhaps you could share some more of your code? I've done some research and there was a bug found in 2006, but other than that, there's been a couple reports of this, but it's always been fixed by adjusting the code (adding a beauty check here or there).
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-19-2021 , 08:37   Re: Run time error: Heap Low
Reply With Quote #5

Quote:
Originally Posted by Napoleon_be View Post
Perhaps you could share some more of your code? I've done some research and there was a bug found in 2006, but other than that, there's been a couple reports of this, but it's always been fixed by adjusting the code (adding a beauty check here or there).
Only that code have trouble, it seems working when I remove the condition operator:
PHP Code:
formatex(szTempcharsmax(szTemp), "\w%s %s \r%s"eTrack[szNAME], fmt("%L"LANG_PLAYER"MVP_VIP_ONLY"), bUsed == true "#" "")
menu_additem(menuszTemp
So, it's true, is a compiler bug that won't be fixed soon, isn't that?
In this case, I will leave it like it is: most_valuable_player.sma
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 05-19-2021 , 08:51   Re: Run time error: Heap Low
Reply With Quote #6

I'd suggest trying to upgrade to 1.10.

I just realized i made another thread about this a while ago, you might wanna check this out: https://forums.alliedmods.net/showthread.php?t=323270
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 05-19-2021 , 14:05   Re: Run time error: Heap Low
Reply With Quote #7

Quote:
Originally Posted by Shadows Adi View Post
[AMXX] Run time error 8: heap low
Any luck adjusting heap?

#pragma dynamic value
__________________
DJEarthQuake is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-20-2021 , 07:30   Re: Run time error: Heap Low
Reply With Quote #8

Quote:
Originally Posted by DJEarthQuake View Post
Any luck adjusting heap?

#pragma dynamic value
Thank you, but didn't worked on compiled script with 1.9.0 but

Quote:
Originally Posted by Napoleon_be View Post
I'd suggest trying to upgrade to 1.10.

I just realized i made another thread about this a while ago, you might wanna check this out: https://forums.alliedmods.net/showthread.php?t=323270
on 1.10.0 it worked without any error, so it was a long standing compiler bug until 1.10.0 release. I will try some more methods to make the code more efficient, thank you all.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi 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 15:20.


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