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.

Comments

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 3:12PM
    I got Delphi 7, can't see that particular leak following your steps (although I do believe standard images are consuming a lot of memory).
    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?
  • edited 3:12PM
    File type (JPG, BMP) doesn't matter.
    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:
    MemoryLeak.png
  • Anu de DeusAnu de Deus Hampshire, UK
    edited 3:12PM
    Sorry, I don't have the same problem here, Vista + Delphi 7 SP1, FR.4.9.15
    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.

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 3:12PM
    I just upgraded to Delphi 2010.
    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.
  • edited 3:12PM
    I've created a Delphi project which you can download at http://www.mwore.com/fast-report/FRMemoryLeak.zip (includes source code and executable).
    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.
  • Anu de DeusAnu de Deus Hampshire, UK
    edited 3:12PM
    Mwore, I sent you a private message, please check your forums profile inbox.
    Cheers
  • edited 3:12PM
    Tested with the latest (not officially stable) version 4.9.21 and it seems they've fixed the leak.
    Hope the next stable version comes out soon.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.