Re: Memory increase over time

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi,


You have to post some code


--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


"Benny" <bennyandlinds@xxxxxxxxx> wrote in message
news:1150992749.995905.249970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am having a memory problem with my application. Plain and simple all
the program does is runs through a bunch of images and prints them to a
PCL Printer. The first part of the application that I am noticing the
memory increase is when its scanning the specified directory I get an
error like this:

ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context
0x1b1a58 to COM context 0x1b1bc8 for 60 seconds. The thread that owns
the destination context/apartment is most likely either doing a non
pumping wait or processing a very long running operation without
pumping Windows messages. This situation generally has a negative
performance impact and may even lead to the application becoming non
responsive or memory usage accumulating continually over time. To avoid
this problem, all single threaded apartment (STA) threads should use
pumping wait primitives (such as CoWaitForMultipleHandles) and
routinely pump messages during long running operations.

If I have a smaller amount of images to print the printing *starts*
without any errors. After my application starts printing the memory
eventually gets up to an insane amount (ive seen it up to >300MB) and
then crashes. I am using a helper class that uses the ThreadPool object
to print several documents at a time. It simply acts as a event-driven
WorkQueue with WorkItem objects that contain the information the queue
is to process. I am trying to dispose of objects such as graphics and
PrintDocument but I am still getting this problem. If anyone can help I
would greatly appreciate it.



.



Relevant Pages

  • Re: Memory increase over time
    ... library does is act the same as a queue but has events to execute a job ... The CLR has been unable to transition from COM context ... pumping Windows messages. ... responsive or memory usage accumulating continually over time. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Memory increase over time
    ... what code does the scanning? ... The CLR has been unable to transition from COM context ... pumping Windows messages. ... responsive or memory usage accumulating continually over time. ...
    (microsoft.public.dotnet.languages.csharp)
  • Memory increase over time
    ... I am having a memory problem with my application. ... The CLR has been unable to transition from COM context ... pumping Windows messages. ... If I have a smaller amount of images to print the printing *starts* ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: 2.6, 3.0, and truly independent intepreters
    ... have an additionalfieldthat would point back to their parent context ... one memory buffer to another memory buffer may be given two proxies as ... if a target context is idle you can enter it (acquiring its ... C and it's a simple object (no pointers). ...
    (comp.lang.python)
  • Re: Quagga as border router
    ... I'm going to reply this first response in full context, ... already have my router config pretty well done, on a flash memory card, ... substantial enough Cisco router can house the entire v4 route table via ... Quagga, but I really didn't hear any 'technical' reason as to the ...
    (freebsd-net)