Memory leak problem [SOLVED]

Stimulsoft Reports.Flex discussion
Vyccus
Posts: 14
Joined: Tue Jul 24, 2012 11:38 am

Memory leak problem [SOLVED]

Post by Vyccus »

Hello guys,
I don't know if this is the right place for this, let me know if it is not.

I was having trouble with memory in my application and I did some profiling sessions on it to find out what was wrong.
I found a few instances of BitmapData consuming alot of memory. I did some research about it and found that BitmapData is one of the most common reasons for Memory leaks using flex. After a lot of tests I realized that when I was using my StimulReport those instances of BitmapData were increasing as well.
After a lot of reports I end up with those results in my uploaded images and, as I think that is a bug because it's not being collected by the GC, I'm sending to you guys in order to analyse and to fix it up.

My english is really bad, so if you need more info just let me know.


Cheers
Attachments
after the app crashed
after the app crashed
leak2.jpg (304.16 KiB) Viewed 6000 times
during the process
during the process
leak1.jpg (293.81 KiB) Viewed 6000 times
Last edited by Vyccus on Thu Sep 27, 2012 4:20 pm, edited 1 time in total.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Memory leak problem

Post by Vladimir »

Hello,

Please specify, the memory leaks occur when generating any report or report with images? Is this related to the generation of the report?

Thank you.
Vyccus
Posts: 14
Joined: Tue Jul 24, 2012 11:38 am

Re: Memory leak problem

Post by Vyccus »

Thank you for your reply.
It happens in every page I load in every report. I use only one image for each report, so we can assume that the problem is how you guys create a page inside your report and don't release the Bitmap object. That's my guess, of course.

cheers
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Memory leak problem

Post by Vladimir »

Hello,

We tested the latest version of the product. Each report page is cached in memory as the bitmap for quick drawing. If the report contains, for example, 100 pages and all of them in the cache, the memory consumption will be about 400 mb at 100% page zoom. At a smaller zoom, the memory consumption is reduced, because the bitmaps are rebuilt with a smaller width and height.
Untitled.png
Untitled.png (16.2 KiB) Viewed 5971 times
Thank you.
Vyccus
Posts: 14
Joined: Tue Jul 24, 2012 11:38 am

Re: Memory leak problem

Post by Vyccus »

I will upgrade to the latest version and see whether the problem persists or not.

Thank you for your attention.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Memory leak problem

Post by Vladimir »

Hello,

The new release 2012.2 will be available on our website this week.

Thank you.
Vyccus
Posts: 14
Joined: Tue Jul 24, 2012 11:38 am

Re: Memory leak problem

Post by Vyccus »

Yeah, I got the new version today and I also made some tests.
As I could observe you have only mentioned that the memory decreases when you zoom down the report and that's ok, it worked fine for me, but what I meant with my original issue is when you close the report the memory that was allocated (being zoomed or not) is not being released. Example:

I start my application and it has 160mb allocated.
Then I open a report with 100% of zoom it increases to 180mb.
Then I decrease my zoom and it decreases 10mb of memory.
When I close my report it's supposed to release the other 10mb, but it's not happening, and when I open another one it's accumulating memory and not releasing till the application crash.

ps: Those are not the real values from my app, this is just an example.

Thoughts?

Thank you
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Memory leak problem

Post by Vladimir »

Hello,

We have made some fixes, please check the attached archive:
FXFLEX_2012.09.21_Trial.zip
(4.77 MiB) Downloaded 321 times
Thank you.
Vyccus
Posts: 14
Joined: Tue Jul 24, 2012 11:38 am

Re: Memory leak problem

Post by Vyccus »

Hello,
I'll test it.

Thank you very much
Vyccus
Posts: 14
Joined: Tue Jul 24, 2012 11:38 am

Re: Memory leak problem

Post by Vyccus »

Hi,

After a lot of tests the problem still happening. Those BitmapData objects are still allocated and nothing has changed.

Any suggestion?

Thank you
Locked