Tuesday, 15 September 2015

WPF crash with large image. HRESULT 0x88980406 -



WPF crash with large image. HRESULT 0x88980406 -

i have usercontrol wide 60 x 50,000 displaying waveform of sound file. several users reporting crash hresult of 0x88980406 , googles isn't giving useful info it. app using .net 4.0.

if (maincanvas.children.count > 0) maincanvas.children.clear(); (int = 0; < currentsong.waveformlines.length; i++) { maincanvas.children.add(currentsong.waveformlines[i]); } rendertargetbitmap renderbitmap = new rendertargetbitmap((int)width, (int)height, 96d, 96d, pixelformats.pbgra32); // needed otherwise image output black maincanvas.measure(new size((int)width, (int)height)); maincanvas.arrange(new rect(new size((int)width, (int)height))); renderbitmap.render(maincanvas); image img = new image(); img.source = renderbitmap; if (maincanvas.children.count > 0) maincanvas.children.clear(); maincanvas.children.add(img);

what i'm doing drawing sample values line segments , adding them array , set them on canvas. create bitmap canvas, delete line segments , add together bitmap source of image command on canvas.

it crashes in maincanvas.children.add(img);

wpf image canvas

No comments:

Post a Comment