TfrxPictureView.HightQuality huge memory leak
Tested with Delphi 2010 and FastReport 4.9:
1. Create a new VCL project.
2. Put TfrxReport on the form.
3. Run report designer.
4. Put a TfrxPictureView on a page by itself.
5. Load a larger (1MB) picture into TfrxPictureView.
6. Scroll the page up and down a bit and watch memory consumption - everyting still works.
7. Set TfrxPictureView.HightQuality to True.
8. Scroll the page up and down again and watch memory go through the roof.
1. Create a new VCL project.
2. Put TfrxReport on the form.
3. Run report designer.
4. Put a TfrxPictureView on a page by itself.
5. Load a larger (1MB) picture into TfrxPictureView.
6. Scroll the page up and down a bit and watch memory consumption - everyting still works.
7. Set TfrxPictureView.HightQuality to True.
8. Scroll the page up and down again and watch memory go through the roof.
Comments
Is it loading a jpg or bmp? What dimensions does the original picture have?
Can you save your example to a FR3 file and put it in the binaries forum, please?
Dimensions are also not important, although smaller images have a less dramatic effect on memory consumption.
I've created an example, available at http://www.mwore.com/fast-report/MemoryLeak.zip
Loaded the example in report designer, scrolled the page up and down for a few seconds and the result is this:
I suggest you open a support ticket for that.
My memory usage (ProcessXP) is 91.5MB, with peaks of 112Mb while scrolling up and down.
If I had to guess, I would say it's related to FR4.9 under Delphi 2010 only, maybe they didn't test it thoroughly in this case.
Good luck, please let us know of any improvements on this.
I'm afraid I don't have the same problem as you. When I open your FR3 file, I get 151.2 MB of usage for the entire process (Delphi), and scrolling up and down hundreds of times only gives me some peaks of 172MB, nothing more.
Again, let me know if you find anything about it, I suspect you have some library/package/tool loaded that might be affecting it.
Just as a suggestion, create a blank project with only a FRXreport and frxDesigner objects, and one button to open the FastReport designer.
Generate the exe and run it OUTSIDE Delphi, click the button to open the designer, open your fr3 file, and compare the results.
Compiled with Delphi 2010 Update 5 and Fast Report Basic 4.9 (stable) on Vista with all the latest updates.
I've also tested the executable on XP SP2 and it does the same thing.
Cheers
Hope the next stable version comes out soon.