burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Memory issue

shock-wave007 opened this issue · comments

screenshot 24

if i change filter multiples time without "largerHeap="true" application crashes and as u can see in screenshot that it take upto 1.2Gb no phone, it some kind of memory leak or something.

We are using GLSurfaceView for image filtering which takes more resources to filter images. Thanks for the update I will look into it

Its ok if we apply 2-3 filter, but as we keep cycling through filters, memory keep increasing.

Setps to reproduce result
Run in ADV or device
Open resource monitor in Android studios
And change fliter

As u change it just keep consuming memory
The slope in memory graph

@shock-wave007 @burhanrashid52

call GLES20.glDeleteTextures(2, mTextures, 0) before GLES20.glGenTextures(2, mTextures, 0) at loadTextures() method to resolve memory issue.

@kustraslawomir I applied your solution, yet it has not helped to conserve memory and the App continually crashes after resuming filter selection.

Hey there did anyone manage to find a solution to this issue?

Hi,
No solution? :(

I have this issue to, I submitted this problem in stackoverflow

@shock-wave007 @burhanrashid52

call GLES20.glDeleteTextures(2, mTextures, 0) before GLES20.glGenTextures(2, mTextures, 0) at loadTextures() method to resolve memory issue.

Thank you dear Kustra,
I tested your solution and helped me a few to control memory. ( after set filter, memory will be back to old step ).
But still its high memory usage...

The solution by @kustraslawomir worked @mohammad1ta ?

Yes, at the first time, When I use filter, memory will grow up from about 130MB to 232MB ( Because Graphics memory 0MB to 96MB ).
after second changing in filter, memory increases to 260MB and decrease back to 235MB.

hi, Is there is any permanent Solution For this Problem..? @burhanrashid52 @kustraslawomir

@shock-wave007 @burhanrashid52
call GLES20.glDeleteTextures(2, mTextures, 0) before GLES20.glGenTextures(2, mTextures, 0) at loadTextures() method to resolve memory issue.

Thank you dear Kustra,
I tested your solution and helped me a few to control memory. ( after set filter, memory will be back to old step ).
But still its high memory usage...

Your tip help me, but that its help me, you need export this project like module, not implement in gradle. Memory not increase but app still crash