.net - OutOfMemoryException even when app doesn't seem to consume max amount of memory -


i developing .net based application (.net 4) crashes after running time on system.outofmemoryexception

when examining app's process in task manager or attempted use other tools such clr profiler , ants memory profiler, doesn't seem application maxing out on available ram or other limit may (i believe windows has limit per process .net limited in way).

here's screenshot ants profiler time shortly before crash.

total amount of unamanged memory (in case it's not seen in image ~ 285 mb, , total size of objects in heaps ~76mb)

i checked "handles" count in taskmgr, looks around ~8120 handles app's process @ time of crash.

profiler stats image how can further examine going on? possible causes can cause such exception?

it's image (bitmap). not "very large" in size (around 50kb). can underlying native exception in disguise? (like coming gdi)

yes, cause. gdi throws outofmemoryexceptions when there error has nothing related memory consumption.

i suggest checking bitmap trying load, , verifying it's correctly formatted in format supported gdi.

this long term bug on connect, offical response of:

you're seeing 1 of idosyncracies of drawing engine (gdi+) here. gdi+ likes return outofmemoryexceptions in cases have nothing memory. unfortunately gdi+ component windows cannot address these issues

...

we see these when pass invalid parameters function...

checking call loads bitmap, format specifics of image file may lead "real" underlying cause.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -