.net - OutOfMemoryException issue : Exception while having plenty of space and no LOH fragmentation -


i'm having weird outofmemory exception.

we have application, draws charts data coming hardware devices.

if run application memoryprofiler, after time, got outofmemoryexception. know same exception happens of our customers, without debugger.

the weird part:

  • we have still plenty of free memory space
  • when having exception, application only using 360mb

we using nevron library draw charts, exception is:

system.outofmemoryexception: out of memory.    @ system.drawing.graphics.checkerrorstatus(int32 status)    @ system.drawing.graphics.drawimage(image image, int32 x, int32 y, int32 width, int32 height)    @ nevron.graphicscore.nbitmapgdirendersurface.paint(object sender, painteventargs e, l1ll11il1 contentpainter)    @ nevron.chart.winform.ncontrolview.paint(object sender, painteventargs e)    @ nevron.chart.winform.nchartcontrol.onpaint(painteventargs e)    @ system.windows.forms.control.paintwitherrorhandling(painteventargs e, int16 layer)    @ system.windows.forms.control.wmpaint(message& m)    @ system.windows.forms.control.wndproc(message& m)    @ system.windows.forms.control.controlnativewindow.onmessage(message& m)    @ system.windows.forms.control.controlnativewindow.wndproc(message& m)    @ system.windows.forms.nativewindow.callback(intptr hwnd, int32 msg, intptr wparam, intptr lparam) 

we using devexpress every other part of application. managed error them(i'm not sure related, i've feeling do):

system.componentmodel.win32exception (0x80004005): not enough storage available process command    @ devexpress.utils.drawing.xtrabufferedgraphicscontext.createcompatibledib(intptr hdc, intptr hpal, int32 ulwidth, int32 ulheight, intptr& ppvbits)    @ devexpress.utils.drawing.xtrabufferedgraphicscontext.createbuffer(intptr src, int32 offsetx, int32 offsety, int32 width, int32 height)    @ devexpress.utils.drawing.xtrabufferedgraphicscontext.allocbuffer(graphics targetgraphics, intptr targetdc, rectangle targetrectangle)    @ devexpress.utils.drawing.xtrabufferedgraphicscontext.allocbufferintempmanager(graphics targetgraphics, intptr targetdc, rectangle targetrectangle)    @ devexpress.utils.drawing.xtrabufferedgraphicscontext.allocate(graphics targetgraphics, intptr targetdc, rectangle targetrectangle)    @ devexpress.utils.drawing.xtrabufferedgraphicscontext.allocate(graphics targetgraphics, rectangle targetrectangle)    @ devexpress.xtrabars.docking2010.views.baseviewpainter.draw(graphicscache cache, rectangle clip)    @ devexpress.xtrabars.docking2010.views.baseview.draw(graphicscache cache, rectangle clip)    @ devexpress.xtrabars.docking2010.documentmanager.paintcore(graphics g, rectangle bounds)    @ devexpress.xtrabars.docking2010.documentmanager.devexpress.xtrabars.docking2010.idocumentshostowner.paint(graphics g)    @ devexpress.xtrabars.docking2010.documentshost.onpaint(graphics g)    @ devexpress.xtrabars.docking2010.documentshost.dopaint(message& m)    @ devexpress.xtrabars.docking2010.documentshost.wndproc(message& m)    @ system.windows.forms.control.controlnativewindow.onmessage(message& m)    @ system.windows.forms.control.controlnativewindow.wndproc(message& m)    @ system.windows.forms.nativewindow.callback(intptr hwnd, int32 msg, intptr wparam, intptr lparam) 

we have "catch exception" handler allow application not close after exception. effect on gui(where located depends on exception happens:

exception effect

here memory profiler session: enter image description here

here gdiview situation @ moment of crash(the counter increasing/decreasing time, not much, usually, when gc run i'm 0 offset.): enter image description here

what i've checked:

  • ants profiler doesn't warn me loh fragmentation on snapshot taken before , after exception
  • i don't see big memory increase(memory leak)
  • i've still plenty of space
  • i don't have huge usage of gdi handle(checked gdiview)

i'm kind of hopeless since exception happening our customer, on computer(i can reproduce it, not easily), can't understand going wrong here, on internet found having gdi handle growing(or having gdi handles of application growing), doesn't seems case.

this error seems happens things directly in contact of gui, if when receive data, have allocate big arrays(not big, quite often).

what can have more information on exception?

things found:

  • testlimit allows me create more 16 millions of new handles
  • this question, here i'm unable find clue of increasing handle
  • this article checked, new graphic disposed(no idea ones of library
  • this article on loh, according ants, doesn't seems problem

i reported issue nevron/devexpress, not sure can help, , no answer now.

edit

i did manage once have ants telling me this:

enter image description here

but, i'm not sure should consider it, because unusable space low, , i've still plenty of memory space(is there size limit loh?)


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -