Out of Memory error but what memory? Plenty is free.

170 views
Skip to first unread message

Scott Witte

unread,
Aug 18, 2021, 9:33:55 PM8/18/21
to PTGui Support

Hi Joost,

I've been getting some memory errors lately. For example, right now the error message says, "Assertion failed: TnhGrphicsUtilities.cpp, line 1723" follow by four lines saying, "Out of memory." But what memory? The GPU has 7.7GB free out of 11GB. There is 12.65GB free of RAM out of 32GB. The Paging file has 4.6GB free out of 5GB. The HD has 46GB free. So.... what memory is it out of?

In advanced settings I have max RAM memory set to automatic, and in gray it says 22888MB, which I suspect is the automatic max. The GPU max memory is also set to automatic with a grayed out value of 7885MB. The pano size is 14000 x 7000 which is just about the maximum from the images I am using and those are JPGs. So, nothing too demanding there.

I can get these errors when stitching or, as in this case, when opening an existing PTS file.

One clue: This seems more likely to happen when Lightroom is open and has been running for a while. I just closed it without closing PTGui and now I don't get the memory error when opening the PTS file.

I am using PTGui Pro 12.7, Windows 10.

PTGui Support

unread,
Aug 19, 2021, 11:45:03 AM8/19/21
to pt...@googlegroups.com
Hi Scott,

Out of memory means that PTGui is unable to allocate heap memory. On 64
bit Windows I think this can only happen when the paging file runs full.
So you might try increasing the paging file size.

As soon as you see the error PTGui has already aborted stitching and
released memory, so it might seem there's plenty of free memory.

But indeed it's somewhat surprising if this happens even when just
loading a .pts. But I don't know what Lightroom is doing in the background.

Kind regards,

Joost Nieuwenhuijse
www.ptgui.com
> --
> You received this message because you are subscribed to the Google
> Groups "PTGui Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to ptgui+un...@googlegroups.com
> <mailto:ptgui+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ptgui/5caa9066-6f61-4bd1-a278-cf54771f132fn%40googlegroups.com
> <https://groups.google.com/d/msgid/ptgui/5caa9066-6f61-4bd1-a278-cf54771f132fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Scott Witte

unread,
Aug 19, 2021, 3:31:09 PM8/19/21
to PTGui Support
Well, that is easy enough to test. Instead of letting Windows manage page file size automatically (what does MS know, anyway!) I sextupled the max size. Let's see if that makes a difference.

Thanks.

Scott

Scott Witte

unread,
Aug 21, 2021, 9:41:44 PM8/21/21
to PTGui Support
So. Experiment conducted, I guess. Problem persists.

I loaded 20 bracketed images and immediately got a slew of "out of memory" errors with one new one:

OpenCL error: CL_MEM_OBJECT_ALLOCATION_FAILURE (-4) in function clEnqueueNDRangeKernel Kernel: k12

Again, Lightroom was open. I closed it. Now the images loaded fine, but when I tried to make an 8K preview I got a simple "out of memory" dialog with no codes. Figuring that some memory may still not be released or otherwise corrupted I rebooted. I reloaded the project and stitching worked fine, even at 14K with all the other programs I would usually have running where open. My 11GB of VRAM didn't have much headroom, however. I opened Lightroom then tried stitching again. It completed but VRAM was essentially maxed out with a couple hundred MB free and stitching got much slower.

Perplexing.

PTGui Support

unread,
Aug 22, 2021, 3:43:56 AM8/22/21
to pt...@googlegroups.com
Hi Scott,

On 22/08/2021 03:41, Scott Witte wrote:
> So. Experiment conducted, I guess. Problem persists.
>
> I loaded 20 bracketed images and immediately got a slew of "out of
> memory" errors with one new one:
>
> OpenCL error: CL_MEM_OBJECT_ALLOCATION_FAILURE (-4) in function
> clEnqueueNDRangeKernel Kernel: k12

Running Lightroom at the same time is known to cause problems with GPU
acceleration, especially with nvidia gpus. You might try reducing the
maximum amount of video RAM used by PTGui to a few thousand MBs and see
if the two can get along this way.

Otherwise I'm afraid there's not much that can be done about it. PTGui
tries to run something on the GPU, but the GPU driver reports the above
error message to PTGui.

>
> Again, Lightroom was open. I closed it. Now the images loaded fine, but
> when I tried to make an 8K preview I got a simple "out of memory" dialog
> with no codes. Figuring that some memory may still not be released or
> otherwise corrupted I rebooted. I reloaded the project and stitching
> worked fine, even at 14K with all the other programs I would usually
> have running where open. My 11GB of VRAM didn't have much headroom,
> however. I opened Lightroom then tried stitching again. It completed but
> VRAM was essentially maxed out with a couple hundred MB free and
> stitching got much slower. >
> Perplexing.

Yes the Out of Memory error baffles me too, it implies a lack of host
RAM, not GPU RAM. Given enough swap space, host RAM should never run out.

Although the TnhGrphicsUtilities.cpp, line 1723 assertion you reported
earlier means that a GDI+ (graphics) call failed. Perhaps the Out of
Memory error originates in GDI+ and it's actually referring to a GPU RAM
allocation failure.

So, in short, I think the workaround is to not use Lightroom at the same
time, or disable GPU acceleration in one of them.

Joost

Scott Witte

unread,
Aug 22, 2021, 12:49:01 PM8/22/21
to PTGui Support
Hmmm. I'm starting to wonder if there could be a fault in the Graphics card itself. Not a great time for buying new cards, however.

Thanks for your attention to this, Joost.
Reply all
Reply to author
Forward
0 new messages