Well I have noticed a weird bug.This occurs on resizing.
I First noticed it while I was trying to fix my xaml alignments. When I try to resize the window across my 2 screens the awesomium content was starting to flickering and suddenly content dissapeared and the redscreen with the logo came up, short after vshost32.exe crashed.
I thought well.. ok it might have some width limitations so I limited the MaxWidth of the window on Primary Screen's Width. I noticed some flickerings aswell while I was trying to resize it horizontally, but that was all, however when I spammed the resize and changed many times height and width the same issue occured on maxheight 1080 and max width 1920.
Edit2 Additional information: I have 2 WebControls on the same XAML. When i added multiple, and resized... it crashed the first second.
Edit (1)
[1123/013232:INFO:(0)] WebCore is now online.
[1123/013232:INFO:(0)] Running Awesomium 1.7.5.1
[1123/013247:WARNING:Awesomium.NET(0)] System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
at System.Windows.Media.Imaging.WriteableBitmap..ctor(Int32 pixelWidth, Int32 pixelHeight, Double dpiX, Double dpiY, PixelFormat pixelFormat, BitmapPalette palette)
at Awesomium.Windows.Controls.WebViewPresenter.Awesomium.Core.ISurface.Initialize(IWebView view, Int32 width, Int32 height)
at Awesomium.Core.Surface.oQVs2ZKQlyYpFHm4aaM(Object , Object , Int32 width, Int32 height)
at Awesomium.Core.Surface.InitializeDirector(IWebView view, Int32 width, Int32 height)
at Awesomium.Core.Surface..ctor(IWebView view, Int32 width, Int32 height, ISurface surfaceImpl)
at Awesomium.Core.SurfaceFactory.Nu5RdsobJP(IntPtr , Int32 , Int32 )
at Awesomium.Core.NativeMethods.WebCore_Update(HandleRef jarg1)
at Awesomium.Core.WebCore.UpdateThunk()
[1123/013247:ERROR:ipc_channel_win.cc(261)] pipe error: 109
It seems to me that there's some meory leak here.
After 2 GBs of Wasted Ram, it gets crashed.
Tried it with 8.5 GB of Ram used, gone up to 10.5 and then crashed.
I've made some tests in order to find what is causing this error. I created a loop that it would resize the window at 2 widths and heights every 50 ms
public async void testc() {
for (int i = 0; i <= 1000; i++)
{
this.Width = 1700 + i % 2;
this.Height = 950 + i % 2;
await Task.Delay(50);
}
}
it crashed again as expected, interesting is though, that when i appended at the loop
WebControl.Reload(true);
it actually didn't crashed... Memory was going up and down from 350 MBs
Is there anyway to prevent Rendering while resizing?