Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. "Not enough storage is available to process this command"

"Not enough storage is available to process this command"

Scheduled Pinned Locked Moved C#
performancehelpcsharpgraphicsquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alan Balkany
    wrote on last edited by
    #1

    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

    Y A 2 Replies Last reply
    0
    • A Alan Balkany

      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

      Y Offline
      Y Offline
      Yusuf
      wrote on last edited by
      #2

      Have you seen this blog[^]. Could it help in your situation?

      Yusuf May I help you?

      1 Reply Last reply
      0
      • A Alan Balkany

        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

        A Offline
        A Offline
        Alan Balkany
        wrote on last edited by
        #3

        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!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups