Profile Picture

AccessViolationException in OnRender

Posted By Stuart Jones 3 Years Ago
Author
Message
Stuart Jones
Problem Posted 3 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 17, Visits: 338
Hi,We have automated UI tests that test some controls that contain charts. Sometimes they fail with an AccessViolationException. The render surface is set to Bitmap.We're not able to reproduce this but I thought the stack trace might give you a clue as to what's going on.Best regards,Stuart
Video Controller In Use: Microsoft Corporation: GDI GenericInstalled Video Controller(s): Intel(R) HD Graphics 630
Exception:System.AccessViolationExceptionMessage:Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Source:Nevron.GraphicsGLStack Trace:at Nevron.GraphicsGL.l1IlllII1l.glDrawElements(Int32 mode, Int32 count, Int32 type, Void* indices) at Nevron.GraphicsGL.l1Ill111II.RenderIndexed() at Nevron.GraphicsGL.l1Illl1I1I.RenderBorderOnTwoStages(l1lI1lIlI primitive, Array vertices) at Nevron.Chart.NCartesianAxis.lII1lIIIl1(NChartRenderingContext3D context, NAxisConstLine l1l1IIl1l11, lIlI111lII& l1l1IIlIlll) at Nevron.Chart.NCartesianAxis.lII1lII11I(NChartRenderingContext3D context) at Nevron.Chart.NAxisCollection.lII1lII11I(NChartRenderingContext3D context) at Nevron.Chart.NCartesianChart.lIIlIl11ll(NChartRenderingContext3D context) at Nevron.Chart.lIl1I1IIlI.Render(NChartRenderingContext3D context, NCartesianChart chart) at Nevron.Chart.lIl1I1IIll.lII11IIII1(NChartRenderingContext3D context, NCartesianChart chart, lIlI1IlIll l1l1IIllI1l) at Nevron.Chart.lIl1I1IIll.Render(NChartRenderingContext3D context, NCartesianChart chart) at Nevron.Chart.lIl1I1IIll.lII11IIII1(NChartRenderingContext3D context, NCartesianChart chart, lIlI1IlIll l1l1IIllI1l) at Nevron.Chart.lIl1I1IIll.Render(NChartRenderingContext3D context, NCartesianChart chart) at Nevron.Chart.lIl1I1IIll.lII11IIII1(NChartRenderingContext3D context, NCartesianChart chart, lIlI1IlIll l1l1IIllI1l) at Nevron.Chart.lIl1I1IIll.Render(NChartRenderingContext3D context, NCartesianChart chart) at Nevron.Chart.NCartesianChart.lI1I1IlI1l(NChartRenderingContext3D context) at Nevron.Chart.NChart.PreOrderPaint3D(NChartRenderingContext3D context) at Nevron.Chart.NCartesianChart.PreOrderPaint3D(NChartRenderingContext3D context) at Nevron.Chart.NContentPanel.RenderInternal(NChartRenderingContext context) at Nevron.Chart.NPanel.RenderInternal(NChartRenderingContext context) at Nevron.Chart.NContentPanel.RenderInternal(NChartRenderingContext context) at Nevron.Chart.NRootPanel.RenderInternal(NChartRenderingContext context) at Nevron.Chart.Ndocument.Paint(NChartRenderingContext context, Boolean l1l1I1II11I, Boolean recalc) at Nevron.Chart.Wpf.NWpfGLBitmapRenderSurface.Paint(DrawingContext context, NWpfChartControlView view) at Nevron.Chart.Wpf.NChartControl.OnRender(DrawingContext drawingContext) at System.Windows.UIElement.Arrange(Rect finalRect)


Nevron Support
Posted 3 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:38 AM
Posts: 3,054, Visits: 4,006
Hi Stuart, 

Can you send us the chart state when the control fails to render for review to support@nevron.com. The code to save the control state is:

nChartControl1.Serializer.SaveControlStateToFile("c:\\temp\\chartstate.xml", Nevron.Serialization.PersistencyFormat.CustomXML, null);

This is a very popular video board so it should be easy to spot the problem if we can reproduce it.

Best Regards,
Nevron Support Team



Stuart Jones
Posted 3 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 17, Visits: 338
Hi,

I've subclassed NChartControl, overridden OnRender and wrapped base.OnRender in a try/catch. I needed to add the attribute [HandleProcessCorruptedStateExceptions] to be able to catch access violation exceptions.

In the catch I saved the chart state. It doesn't seem to contain much information, although maybe it points towards the problem:
<Root>
<Object typeId="0" name="Root" />
<IdTypeTable>
  <KeyValuePair Key="0" Value="Nevron.Chart.Wpf.NChartControlState" />
</IdTypeTable>
</Root>Thanks for looking into this,Best regards,Stuart




Similar Topics


Reading This Topic