"Not enough storage is available to process this command"
-
I've been working on this one for two days, and I DON'T think it's a memory or disk-space problem. I have a C# image-processing application that uses Win32 to do the graphics for speed. I restructured it so that different threads could work on different images in parallel (so far with just one thread), and got the above error message. The Google entries for this problem all assume there are memory/disk space limitations, but I know this isn't the problem because the old (non-threaded) version runs fine, and Process Explorer tells me the threaded version isn't using any more memory. Has anyone seen this error message before? Any suggestions what to look for to track down the cause of this error? Thanks, Alan
-
I've been working on this one for two days, and I DON'T think it's a memory or disk-space problem. I have a C# image-processing application that uses Win32 to do the graphics for speed. I restructured it so that different threads could work on different images in parallel (so far with just one thread), and got the above error message. The Google entries for this problem all assume there are memory/disk space limitations, but I know this isn't the problem because the old (non-threaded) version runs fine, and Process Explorer tells me the threaded version isn't using any more memory. Has anyone seen this error message before? Any suggestions what to look for to track down the cause of this error? Thanks, Alan
-
I've been working on this one for two days, and I DON'T think it's a memory or disk-space problem. I have a C# image-processing application that uses Win32 to do the graphics for speed. I restructured it so that different threads could work on different images in parallel (so far with just one thread), and got the above error message. The Google entries for this problem all assume there are memory/disk space limitations, but I know this isn't the problem because the old (non-threaded) version runs fine, and Process Explorer tells me the threaded version isn't using any more memory. Has anyone seen this error message before? Any suggestions what to look for to track down the cause of this error? Thanks, Alan
The cause of the problem is that apparently Win32 bitmap handles become STALE, i.e. they're for temporary use only. This led to the problem showing up in different places, depending on when Windoze decided to make the handles invalid. The solution was to pass bitmaps into the lower-level C# functions, then obtain the handles at the last possible moment, inside a loop, just before descending into Win32. These handles were fresh for each iteration, and worked perfectly. I think the Win32 system should provide a less-misleading error message when a stale handle has been used. &*($! Microsoft!