ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TImageEnFolderMView - Out of Memory
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

fourwhey

20 Posts

Posted - Feb 14 2014 :  10:18:21  Show Profile  Reply
When StoreType = ietNormal, ImageCacheSize = 10
If I page down or drag the scrollbox along the trough a few times, I receive an Out of memory exception in TIEFileBuffer.Map line 25806.

I've attempted to set TImageEnFolderMView.EnableImageCaching := False, but other than making thumbnails draw painfully slow, it has no impact on the occurrence of the error.

For now I've set the StoreType = ietFastThumb, but would like to have the full image available if possible.

Any ideas?

Thanks.

w2m

USA
1990 Posts

Posted - Feb 14 2014 :  12:48:01  Show Profile  Reply
I never get out of memory exceptions here... with ietNormal even if I load 60, 18 mb. pictures. I guess it depends on your operating system, how much memory you have installed, etc... I am not sure what is causing your problem, but you could try compiling as Win64.

With ietFastThumb, you can always get access to the full image by loading the image from a file using the ImageEnMView1.MIO.Params[iIndex].Filename however.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Go to Top of Page

fourwhey

20 Posts

Posted - Feb 14 2014 :  13:09:22  Show Profile  Reply
William,

Thank you for the suggestion. However compiling as x64 isn't an option for me at the moment, since the application code base is still in D6. I plan to bring it up to date in the future, but unfortunately this means replacing the now deprecated Netmaster controls from circa 2000 with Indy equivalents. I wish our development schedule had time for these changes, since sometimes the D6 IDE crashes 10+ times a day.

The machine I'm working on is Win7 32bit with 4gb of ram.

I have already altered my handling to retrieve the full image using the path as you suggested.

Thanks again.
Go to Top of Page

xequte

38616 Posts

Posted - Feb 14 2014 :  13:11:13  Show Profile  Reply
Hi

While you shouldn't be getting out of memory errors, the more important point from a software design standpoint is that there are relatively few situations where you want to load entire images into a thumbnail grid view as it would tie up a lot of memory for many images when in all likelihood you are only accessing the memory of one image at a time.

As Bill suggested it is usually best to use ietFastThumb and load the full image into memory (e.g. using ImageEnMView1.MIO.Params[iIndex].Filename) as required.

However if your requirements are different, let us know so we can resolve your memory error.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

fourwhey

20 Posts

Posted - Feb 14 2014 :  15:01:10  Show Profile  Reply
Nigel,

Thank you for responding. I agree, I don't need the full size image in the grid and can load it as needed. I switched over to this type of handling shortly after posting.

Should ietNormal not be disabled for TImageEnFolderMView? Since any folder with a large number files may result in an OOM exception.

I don't have that many, only 150 2-3MB files.

Thanks.

Go to Top of Page

xequte

38616 Posts

Posted - Feb 14 2014 :  19:36:00  Show Profile  Reply
Hi

I just ran a series of tests with over 500 3MB JPEG images and did not encounter any errors using ietNormal, though naturally speed was an issue.

If you have more detail so we can reproduce this, please advise.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

fourwhey

20 Posts

Posted - Feb 17 2014 :  09:34:12  Show Profile  Reply
Nigel,

It may be the result of high memory utilization on my machine (2GB+ used of the 4GB, which only 3 is really usable since it's x86), in conjunction with ietNormal.

I'll try to reproduce the error when I have a moment.
Go to Top of Page

fourwhey

20 Posts

Posted - Feb 18 2014 :  06:35:40  Show Profile  Reply
I'm able to easily reproduce the conditions that cause the error in my app but not in the demo. I'm working on trying to figure out why it's happening in one place and not the other. Maybe it's a memory leak on my part? I'm not sure what though, since I am not doing anything -- at least to my knowledge -- that might have an impact on this other than modifying the StoreType.

Thanks.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: