Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: RetroJay on Sun 09/10/2016 07:50:28

Title: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: RetroJay on Sun 09/10/2016 07:50:28
Hi, All good peeps of AGS.:-D

Tis I RetroJay.(laugh)
I have been lurking around here for some time now but have been busy working on a project with a friend, using ags 3.2.1
I am also using Windows 10 and have just come across a rather strange Error text file in my compiled folder that says this...

!!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes.(wtf)

For the life of me I can't understand what the hell is going on here.
Can anyone tell me why this is happening, please ? ???

Yours.
Jay.

p.s. For some unknown reason my Kerbal Avatar has buggered off too.(laugh)
P.P.S. Actually. This is not a laughing matter, because I have just discovered that my site has also followed my avatar and I have no clue as to how long it has been gone.???
Title: Re: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: RetroJay on Sun 09/10/2016 19:25:37
Hmm... I think really I should have posted this in 'Beginners Technical Questions'.
Why the hell I put it here I don't know.

My dear Mr Snarky. Would you be so kind as to place my question in the aforementioned thread please.

Yours.
Jay.
Title: Re: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: Snarky on Sun 09/10/2016 19:51:17
Sure.
Title: Re: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: Crimson Wizard on Sun 09/10/2016 20:03:14
AGS writes those messages to file if your game is compiled in Debug mode.
This message is not addressed to game creator, that is a notification for engine developer (CJ), it seems.
Engine's sprite cache is a strange thing, it has some quirks that I could never understand (then again, I never really tried hard yet). If nothing else is going wrong in your game, then I suggest to simply ignore this message.
Title: Re: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: RetroJay on Sun 09/10/2016 21:06:07
Thank you Snarky.(laugh)

Hi CW.

Ah... I see.
I thought it was strange because I have never seen this before and have always compiled my games the same way.
But... At least I know that its nothing to worry about because our project is working beautifully, thank you.(laugh)

Yours.
Jay.
Title: Re: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: RetroJay on Mon 10/10/2016 04:47:55
Sorry.
I just wanted to say that I seem to have cured the problem by increasing the sprite cache setting (within our games winsetup) from the default 20mb to 50 and now the error file isn't being generated.
I am not sure if this okay to change though.
I am wondering if the problem lies with 2 rather massive objects I have created for a diagonal scrolling effect. One object is the horizon that scrolls right and the other object scrolls diagonally over top of the horizon to give the effect that you are traveling up a mountain.
Could this be the reason for the error file and also why I have had to increase the sprite cache setting ?

Yours.
Jay.
Title: Re: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: Crimson Wizard on Mon 10/10/2016 09:46:23
I have no idea, but in the engine code near that error message there is a comment about possibly deleting big sprite... so it could be related to your case.

Sprite cache size is the size of the RAM your game is allowed to use to keep sprites loaded at the same time. That does not mean that your game will actually use that much at all times, just that it is allowed to.
In latest AGS we even increased that to 100 MB by default, because that's not a problem for modern computers.
Title: Re: !!!! SPRITE CACHE ERROR: Sprite cache should be empty, but still has 4 bytes
Post by: RetroJay on Mon 10/10/2016 23:57:47
Great !!

Thanks for your help, as usual, CW.

As you may have noticed my avatar is back and I have a new site AND... most importantly of all, my 2 games are now downloadable again.(laugh)
All is well with the world again... For a while.(laugh)

Yours.
Jay.