home

Topics Topics Edit Profile Profile Help/Instructions Help Register Register  
Search Last 1 | 3 | 7 Days Search Search Tree View Tree View  

Out of Memory Error

The Panorama Factory Forum » The Panorama Factory FAQ » Out of Memory Error « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Scott H Cooley
New member
Username: Traquino98

Post Number: 1
Registered: 3-2007
Posted on Friday, March 23, 2007 - 11:13 pm:   Edit PostDelete Post

I am attempting to stitch 9 TIFF files, approx. 75MB in size for each of them. I received an error this morning about being out of memory. So I upgraded my memory from 1 GB to 2 GB (4X512). I am still receiving the same problem. I have increased the page file size, but cannot locate the boot.ini file to attempt to edit it. What other options are there to complete this stitch?
Top of pagePrevious messageNext messageBottom of page Link to this message

Holger Lang
New member
Username: Holger_lang

Post Number: 1
Registered: 5-2008
Posted on Friday, May 30, 2008 - 6:03 pm:   Edit PostDelete Post

This seems to be a very difficult problem.
I spent nearly one day testing to make a panorama of 15 pictures - TIF Files about 57 MB size each.
So I've read the FAQ section - changed my paging file to 3070 MB - I use 2 GB RAM an Windows xp Professional - no success.
Then I monitored the memory usage during the processing of Panorama Factory - the peak was about 933 MB.
PF was writing the stitched tiff file. The indicator for progress reached th right end of the display !boing! out of memory.
That meant again a sudden breakdown of th PF.
But than surprise:
In the temp directory the stitched tiff file had arived - it was easy to open it with photoshop to make the cropping.
I hope someone can use this description to get an idea of the reason of this memory problem.

Here is my question
Is this really caused by insufficient hardware?
If yes: what hardware and what operating system do I need to work with PF without problems?

Thanks in advance for your attention
Top of pagePrevious messageNext messageBottom of page Link to this message

John Strait
Moderator
Username: Jstrait

Post Number: 363
Registered: 5-2001
Posted on Monday, June 02, 2008 - 10:19 am:   Edit PostDelete Post

Hi Holger,

First I'll explain what you can do about the "out of memory" problem and then I will respond to some of the details in your question.


What to do on 32-bit Windows

The definitive articles about how to address the memory limitations of 32-bit Windows are in these articles:

Increase the virtual memory available under Windows XP and Vista

Increase swap file size for Windows NT, 2000, XP and Vista

These articles explain how to increase the virtual memory available to The Panorama Factory up to the maximum possible under 32-bit Windows.

Unfortunately, some panoramas still cannot be stitched even with the maximum memory on 32-bit Windows. This is because of fundamental limitations inherent in the 32-bit Windows operating system.


The ultimate solution: the x64 Edition of The Panorama Factory

The ultimate solution is to use the x64 Edition of The Panorama Factory on a 64-bit version of Windows. The "out of memory" problem just goes away. This is how I work on large panoramas and I can attest to never getting this error from the x64 Edition.

But this might mean upgrading your computer and/or version of Windows.

The 3GB option (Windows XP) or IncreaseUserVA option (Vista) discussed in Increase the virtual memory available under Windows XP and Vista
is the best way to address the problem on a 32-bit Windows system.

The Mac Edition currently has better memory performance than 32-bit Windows but not as good as 64-bit Windows. The 64-bit upgrade for the Mac Edition is still some time in the future.


"memory usage ... peak was about 933 MB ... out of memory"

It may seem strange to you that you received the out of memory error when Windows was reporting peak memory usage of only 933 MB. Here are a couple reasons that the Windows memory usage report may be misleading:

  1. Windows reports several different memory statistics. The relevent memory statistic on Windows XP is VM Size (I think Vista uses a different name). This number represents the total reserved virtual memory space. Under XP without the 3GB option, the maximum VM size is about 2000 MB.
     
    The Mem Usage number represents Windows' best guess of how much of the data in memory is being used at any given instant--the "working set size". It can be much smaller than the amount of reserved virtual memory. The Mem Usage number doesn't include data in virtual memory that is "swapped out" to the page file. This data may be needed momentarily and occupies virtual memory space even though it is not in the physical memory (RAM) at the current time
     
  2. Even VM Size doesn't tell you how much usable virtual memory is available because memory can be "fragmented". The easiest way to explain this is by analogy. In a restaurant that seats 100 people, when there are only 60 people in the restaurant, you might think that there is room for 40 more people, right? But it might be impossible to find a table for 12. There may be 40 empty chairs, but if each one is at a table that is already in use, it is impossible to seat anyone at all!
     
    Virtual memory has similar behavior. If the maximum VM size is 2000 MB and 1000 MB are reserved, it may be impossible to allocate memory for a 800 MB image because the largest contiguous free block is less than 800 MB in size.

In the temp directory the stitched tiff file had arived - it was easy to open it with photoshop

This means that the "out of memory" error happened on the very next step after The Panorama Factory finished stitching your original images. After stitching, The Panorama Factory crops the image to remove the scalloping effect at the top and bottom of the image and also to correct minor rotations of the image.

Cropping the image is one of the more memory intensive parts of the process. To crop the stitched image, The Panorama Factory must hold the stitched image and the cropped image in memory simultaneously. So if the stitched image was about 800 MB (15 times 57 MB = 855 MB), then it needed to hold two 800 MB images in memory simultaneously. This is probably beyond the default capability of 32-bit Windows.

However, it may be possible to complete stitching and cropping if you use the 3GB option I explained earlier.


Is this really caused by insufficient hardware?

Yes, partly.

32-bit Windows on 32-bit hardware has a 2 GB limitation on virtual memory. With the 3GB option you can increase this to 3 GB, but this is the best you can do.


If yes: what hardware and what operating system do I need to work with PF without problems?

The ultimate solution is this combination:
  1. The x64 Edition of The Panorama Factory
  2. Running on a 64-bit computer running 64-bit Windows
  3. with a sufficiently large page file
I feel confident saying that you will not receive the "out of memory" error with this configuration.
Top of pagePrevious messageNext messageBottom of page Link to this message

Holger Lang
New member
Username: Holger_lang

Post Number: 4
Registered: 5-2008
Posted on Monday, June 02, 2008 - 11:04 am:   Edit PostDelete Post

I do thank you so much for your quick and detailed answer - thanks again for your assistance.

I have to realize how little I know abaout Windows.

Anyway, as I mentioned I had set the page file size to 3070 MB.

So if cropping needs 1.6 GB (it should be a bit less because of the overlapping parts of 15 pictures) out of a total memory of 3.070 GB this is only 52 % of the theoretically available memory besides of the free space of further 2 GB RAM - and there was no other user-programm running while I used PF. This is quite confusing.

Obviously there is no reliable calculation method to calculate in advance what PF can realize on a given hardware system with xp 32.

I am not a software specialist, but it would be really great if PF would offer the possibility of using a special allocated section of the harddisk for itself - there may exist reasons why that's not possible.

Well anyway, I love the functionality of the program and I like to make panoramas of many pictures - so I will check whether it is possible to use xp 64 on my computer - I only hope that I do not need a new one.

Even that would be a possibility - in that case I only can hope that this will not end in other unexpected disappointments.

Sorry for talking a bit in a negative way - I have to thank you for your generous help.

Holger

Top of pagePrevious messageNext messageBottom of page Link to this message

John Strait
Moderator
Username: Jstrait

Post Number: 365
Registered: 5-2001
Posted on Monday, June 02, 2008 - 11:47 am:   Edit PostDelete Post

Hi Holger,

Setting the page file to 3070 MB is only part of the "best practices" for 32-bit Windows. You are still limited to 2 GB unless you set the 3GB option as I explained in Increase the virtual memory available under Windows XP and Vista. For reasons known only to Microsoft, the default setting for Windows is 2 GB, not 3 GB.

I agree that it would be nice if PF could do something special to avoid the memory limitation on 32-bit Windows.

It may surprise you to know that this is a very small company, just two people. I am the single software developer that does all development.

It might be possible, in theory, to modify PF as you described. However, it would require a nearly complete re-engineering of the software. And, considering that the x64 Edition of The Panorama Factory has eliminated memory problems, I feel it's better to concentrate on other development.

I think almost all new computers sold these days contain 64-bit processors, although for some reason 32-bit Windows is still the default.

If your computer is fairly recent, it's possible you might be able to run 64-bit Windows on it. But if not, at least 64-bit hardware has gotten to be very inexpensive. A quick price check at one of our US retail stores shows 64-bit computers as low as $370 USD. Purchased separately, Windows XP Pro x64 Edition costs approximately $150 USD. I do not know if it is possible to get a discount if you choose only Windows x64 without 32-bit Windows.
Top of pagePrevious messageNext messageBottom of page Link to this message

Holger Lang
New member
Username: Holger_lang

Post Number: 6
Registered: 5-2008
Posted on Tuesday, June 03, 2008 - 6:42 am:   Edit PostDelete Post

Hi John,

you do have my full respect. You are making a great job and to manage your company with only two persons deserves great apreciation.

Thanks for checking the prices for 64-systems. (I have to find out it in Germany as I am living here)

I am quite happy to have realized the memory problem before buying the wrong PF 32/64
- and to have a solution for this problem makes me hoping.

I will get my computer checked for Windows xp 64.

Thanks again you deliver a great service -
(and just a little remark by the side: I've set the boot.ini file to 3 GB already -
and if PF makes a ponorama spherical without sharpening it ends up with a perfect panorama without memory problems.)

Thanks again for assistance - after having checked my computer problem I'll by the proper version for me.

! Great program - anyway!

Keep on going - you are doing very well.
Thanks again

Holger
Top of pagePrevious messageNext messageBottom of page Link to this message

Larry R
New member
Username: Larry_r

Post Number: 11
Registered: 8-2006
Posted on Tuesday, June 03, 2008 - 9:46 am:   Edit PostDelete Post

Hi John, thanks for the detailed summary of memory issues. I've just finished my first 360 deg. pan using my new 12 mp camera - 16 shots for the complete 360 deg. (The sharpness is excellent by the way; here's a link if anyone is curious:

http://www.larryscascaderesource.com/qtvr/FossVR.html


It's a big file. 17 mb. The DevalVR viewer is required to see the image.

As expected, I ran into memory problems. I'm using Vista SP1, 32 bit, 4 gig ram, swap file 4096. I've been chicken so far to try to use the boot editor until I know how to reverse changes should I crash things.

Using 45 bit color would cause an out of memory error, but I was able to save a tiff file. So my workaround was to edit the tiff file in Photoshop, then import the edited file (8 bit color) into PF, set the pan properties for 360 degrees, and save as qtvr. That worked. Besides, It gave me the opportunity to do more retouching.

By the way, do you happen to have a link to reversing changes with the boot editor in Vista? That is, what to do if the system doesn't boot for ??? reason. Yes, it should not happen, but I don't take these things for granted anymore. '

Here are a few links that give me pause about using the 3 gig option:

http://blogs.technet.com/askperf/archive/2007/03/23/memory-management-demystifying-3gb.aspx

http://support.microsoft.com/kb/316739

I'm hoping to hang on to 32 bit until the next version of Windows. I gather that there is still a fair amount of hardware that does not have 64 bit drivers available. I would bet that that issue will be solved by the next edition of Windows.

Gee, is it too early to start thinking about my next computer?


Larry


(Message edited by larry_r on June 03, 2008)
Top of pagePrevious messageNext messageBottom of page Link to this message

Larry R
New member
Username: Larry_r

Post Number: 12
Registered: 8-2006
Posted on Tuesday, June 03, 2008 - 11:00 am:   Edit PostDelete Post

Edited to add:

Here's a better article for Vista 32 bit that I just found; it explains the risks in more detail, and tells you what to do if the system will not boot.

http://www.prophotowiki.com/w/index.php/IncreaseUserVa

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image

Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page