Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSRAM leakage? #710

Closed
SanZamoyski opened this issue Mar 28, 2024 · 8 comments
Closed

PSRAM leakage? #710

SanZamoyski opened this issue Mar 28, 2024 · 8 comments
Labels

Comments

@SanZamoyski
Copy link

SanZamoyski commented Mar 28, 2024

Hi!

I think that something is not ok here. When song ends or is rewinded to next my free PSRAM lowers.
I've left my player overnight and result is recorded in attached txt file.

[24.03.19]-mod.txt

I can not provide at the moment right software version, since it was modified since then. But I'll try to give You some useful informations. I'm using platformio:

platformio.ini.txt
UAP_PinDef.inch.txt
UAP_SdArrays.inc.txt
UAP_DBG.inc.txt
main.cpp.txt
UAP_CoreLoop.inc.txt

Can we delete those files after solving/nofix this problem?

Is there anything wrong in my source or this is a bug? Sorry for the mess in source.

All my audio files are full-albums flac.

Best regards!

schreibfaul1 added a commit that referenced this issue Mar 28, 2024
@schreibfaul1
Copy link
Owner

The memory leak will have existed for a long time, the samplesBuffer was not released correctly. Thanks for the tip.

@SanZamoyski
Copy link
Author

SanZamoyski commented Mar 28, 2024

Can You provide some workaround?
I.e. what should I do if PSRAM gets too low to play another song?

if(ESP.getFreePsram() < 32*1024){
  //do something smart here...
}

Currently I'm rebooting ESP when I realise there is PSRAM shortage.

@schreibfaul1
Copy link
Owner

The loss was about 64KB at each initialisation of the FLAC decoder. I used ESP.getFreePsram() too to plug the leak.

@SanZamoyski
Copy link
Author

but how?

@FatherMarco1971
Copy link
Contributor

@SanZamoyski he has committed a correction or i'm not understandign what you are asking for?

image

@PMKrol
Copy link

PMKrol commented Apr 3, 2024

I have checked it. Still free PSRAM lowers each time I play next flac.

Copy link

github-actions bot commented May 4, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label May 4, 2024
@SanZamoyski
Copy link
Author

Updated libraries, it is in fact working now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants