At first I thought this was similar to the previously reported bug, that just got fixed in the Jan 26 release, but the log of that bug doesn't show any out of memory issues.
Each loop of my image capturing sequencer script was live stacking 2 three minute exposures, saving the raw images of these during live stacking, and then saving an RGB fits of the 2 exposure stack as a fits and also a PNG with stretch of the stack, reseting the stack and starting again. After the first exposure of the each live-stack is captured, I am also doing a plate solve of the first live stacked image with Python code to make sure the dithering between live stack loops hasn't drifted me too far away from the original target.
I have plenty of disk space, and I Windows seems to have enough memory remaining when I look at the error on screen a couple hours after it happens (when I wake up!)
Let me know if you need to see the more of the logs below...
Below are snips of the errors:
Code: Select all
Debug 02:47:59.409663 #1 Sequencer : Starting : Save current live stack (FITSRawStack32Bit) in void SharpCap.Sequencer.SequencerContext.OnStepStart(ISequencerStep step, bool excludeFromProgressCalcs)
Info 02:47:59.696613 #1 Initializing FitsFileWriter at 4552x3032x3x0bits, RGB, 4 bytes per PEL for ZWO ASI2400MC Pro in void SharpCap.Base.FileWriters.FileWriterBase.Initialize(IFileNameProvider fnp, ColourSpaceId colourSpaceId, int width, int height, int bytesPerPixelElement, int significantBitDepth, int colourPlanes, string DeviceName)
Debug 02:47:59.711472 #1 Failed to allocate buffer of category Unpooled in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 02:47:59.711796 #1 Dumping memory because: Failing to allocated 157.95 MB for a buffer in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 02:47:59.712121 #1 GC Memory 1.02 GB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 02:47:59.716364 #1 Process Memory 6.50 GB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 02:47:59.719631 #1 Total Physical Memory 7.98 GB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 02:47:59.719871 #1 Available Physical Memory 1.03 GB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Info 02:47:59.722338 #1 Allocator is using VirtualAlloc in void SharpCap.Base.Memory.Allocator.DumpStatus()
Info 02:47:59.731688 #1 Buffer info for category Pooled in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.739517 #1 Total memory size in category : 939.045MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.743939 #1 26 buffers of size 12271512, totalling 304.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.744546 #1 4 buffers of size 49086048, totalling 187.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.744848 #1 17 buffers of size 27603328, totalling 447.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.746046 #1 Buffer info for category Unpooled in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.746634 #1 Total memory size in category : 137.475MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.747154 #1 1 buffers of size 6135756, totalling 5.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.747488 #1 2 buffers of size 27603328, totalling 52.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.747849 #1 1 buffers of size 82809984, totalling 78.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.748233 #1 1 buffers of size 882, totalling 0.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.748590 #1 Buffer info for category External in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.749712 #1 Total memory size in category : 0.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 02:47:59.757414 #1 BufferFrame (4552x3032, RGB, BitDepth=16, ColorPlanes=3, EffectiveBitDepth=16, BytesPerPixel=6, Binning=1x1 Index=5394 LiveStackDisplayFrame in void SharpCap.Base.BufferFrame.DumpDebug()
Info 02:47:59.758763 #1 Memory 82809984 bytes (78.97 MB) : Unpooled in void SharpCap.Base.BufferFrame.DumpDebug()
Code: Select all
Debug 03:26:01.499291 #1 Sequencer : Starting : Save current live stack (FITSRawStack32Bit) in void SharpCap.Sequencer.SequencerContext.OnStepStart(ISequencerStep step, bool excludeFromProgressCalcs)
Info 03:26:01.603776 #1 Initializing FitsFileWriter at 4552x3032x3x0bits, RGB, 4 bytes per PEL for ZWO ASI2400MC Pro in ICaptureFileWriter SharpCap.FrameTransforms.LiveStacking.LiveStackSaveManager.CreateWriter(int bitDepth, bool autoSave, string toFilename, FrameInfo info)
Info 03:26:03.413398 #1 Writing capture settings file to \\Mac\Home\Desktop\SharpCap Captures\2026-01-25\NGC3726\03_22_52(NoFilter)\NGC3726@2026-01-25T11_22_52Z-11_25_51Z_32b_2fr_360s.CameraSettings.txt in void SharpCap.Models.Camera.WriteCaptureSettingsTextAndHistogram(bool writeHistogram, string filename, string contents)
Debug 03:26:03.415761 #1 Notification (Status=OK): Stack saved to \\Mac\Home\Desktop\SharpCap Captures\2026-01-25\NGC3726\03_22_52(NoFilter)\NGC3726@2026-01-25T11_22_52Z-11_25_51Z_32b_2fr_360s.fits in void SharpCap.UI.NotificationViewModel.DisplayMessage(NotificationMessage message)
Debug 03:26:03.417955 #1 Sequencer : Completed : Save current live stack (FITSRawStack32Bit) in void SharpCap.Sequencer.SequencerContext.OnStepEnd(ISequencerStep step, bool excludeFromProgressCalcs)
Debug 03:26:03.532658 #1 Sequencer : Starting : Save current live stack (PNGWithStretch) in void SharpCap.Sequencer.SequencerContext.OnStepStart(ISequencerStep step, bool excludeFromProgressCalcs)
Warning 03:26:03.877051 #39 Possible dispatcher overload/UI Freeze. Background priority not run for 11.0s since 11:25:52 AM. Dispatcher queue length is 48, currently 1 in progress. Dispatcher disable count : 0 in async Task SharpCap.UISwitcher+DispatcherWatchDog.MonitorDispatcher()
Debug 03:26:03.877173 #39 Attempting to dump diagnostic thread state in string[] SharpCap.Base.ThreadDumper.GetThreadStacks()
Error 03:26:03.935265 #1 Out of memory error within OpenCV : Exception of type 'OutOfMemoryException' : bad allocation error in OpenCV (AdjustSaturation)
Stack Trace: at object SharpCap.Base.OpenCVFrameExtensions+ResultWrapper.GetResult() in C:/Documents/Source Code/SharpCap4.1/src/SharpCap.Base/OpenCVInterop.cs:line 144
at T SharpCap.Base.OpenCVFrameExtensions+TypedResultWrapper<T>.GetResult() in C:/Documents/Source Code/SharpCap4.1/src/SharpCap.Base/OpenCVInterop.cs:line 187
at TRet SharpCap.Base.OpenCVFrameExtensions+ActionRunner<TRet, TInter, TParser>.RunActionWithErrorHandling(INeedToLogParams needToLogParameters, string action, Action<ResultData> func) in TRet SharpCap.Base.OpenCVFrameExtensions+ActionRunner<TRet, TInter, TParser>.Run<T1>(Action<ResultData, FrameWrapper, T1> func, string action, FrameWrapper targetFrame, T1 param1)
Debug 03:26:03.937939 #1 Failed to allocate buffer of category Unknown in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 03:26:03.938064 #1 Dumping memory because: OpenCV failed to create matrix in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 03:26:03.939445 #1 GC Memory 878.89 MB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 03:26:03.940674 #1 Process Memory 7.27 GB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 03:26:03.943356 #1 Total Physical Memory 7.98 GB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Debug 03:26:03.943564 #1 Available Physical Memory 930.89 MB in void SharpCap.Base.Memory.MemoryDiagnostics.Dump(BufferCategory falureCategory, string reason)
Warning 03:26:03.943745 #39 Unexpected Pss function error, cannot create snapshot : Exception of type 'InvalidOperationException' : Could not create snapshot to process. Error 1455.
Stack Trace: at new Microsoft.Diagnostics.Runtime.WindowsProcessDataReader(int processId, WindowsProcessDataReaderMode mode)
at DataTarget SharpCap.Base.ThreadDumper.CreateSnapshot(int pid) in C:/Documents/Source Code/SharpCap4.1/src/SharpCap.Base/ThreadDumper.cs:line 211 in string[] SharpCap.Base.ThreadDumper.GetThreadStacks()
Info 03:26:03.943859 #39 Current thread status: in void SharpCap.Watchdog.DumpThreadStacks()
Info 03:26:03.943926 #39 in void SharpCap.Watchdog.DumpThreadStacks()
Info 03:26:03.944259 #1 Allocator is using VirtualAlloc in void SharpCap.Base.Memory.Allocator.DumpStatus()
Info 03:26:03.949596 #1 Buffer info for category Pooled in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.955929 #1 Total memory size in category : 1187.727MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.957107 #1 33 buffers of size 12271512, totalling 386.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.957321 #1 7 buffers of size 49086048, totalling 327.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.957443 #1 18 buffers of size 27603328, totalling 473.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.957799 #1 Buffer info for category Unpooled in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.957951 #1 Total memory size in category : 222.301MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.958142 #1 2 buffers of size 6135756, totalling 11.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.958261 #1 2 buffers of size 27603328, totalling 52.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.958377 #1 2 buffers of size 82809984, totalling 157.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.958494 #1 1 buffers of size 882, totalling 0.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.958634 #1 Buffer info for category External in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.959931 #1 Total memory size in category : 0.000MB in void SharpCap.Base.Memory.BufferMonitor.LogAndWrite(string message, TextWriter writer)
Info 03:26:03.962263 #1 BufferFrame (4552x3032, RGB, BitDepth=16, ColorPlanes=3, EffectiveBitDepth=14, BytesPerPixel=6, Binning=0x0 Index=6158 LiveStackReget in void SharpCap.Base.BufferFrame.DumpDebug()
Info 03:26:03.962692 #1 Memory 82809984 bytes (78.97 MB) : Unpooled in void SharpCap.Base.BufferFrame.DumpDebug()