system.AccessViolationException: 保護されているメモリに読み取りまたは書き込み操作を行おうとしました。他のメモリが壊れていることが考えられます。 場所 System.Drawing.SafeNativeMethods.Gdip.GdipDrawLineI(HandleRef graphics, HandleRef pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) 場所 System.Drawing.Graphics.DrawLine(Pen pen, Int32 x1, Int32 y1, Int32 x2, Int32 y2) 場所 System.Drawing.Graphics.DrawLine(Pen pen, Point pt1, Point pt2) 場所 Infragistics.Win.Misc.GroupBoxContentAreaBorderUIElement.DrawSolidLine(UIElementDrawParams& drawParams, Point ptStart, Point ptEnd, Border3DSide borderSide, Pen pen) 場所 Infragistics.Win.Misc.GroupBoxContentAreaBorderUIElement.DrawRoundedBorders(UIElementDrawParams& drawParams) 場所 Infragistics.Win.Misc.GroupBoxContentAreaBorderUIElement.DrawBorders(UIElementDrawParams& drawParams) 場所 Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) 場所 Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) 場所 Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) 場所 Infragistics.Win.UIElement.DrawChildElements(UIElementDrawParams& drawParams) 場所 Infragistics.Win.UIElement.DrawElement(UIElementDrawParams& defaultDrawParams) 場所 Infragistics.Win.UIElement.DrawHelper(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Boolean clipText, Boolean forceDrawAsFocused, Boolean preventAlphaBlendGraphics) 場所 Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode, Size elementSize, Boolean preventAlphaBlendGraphics) 場所 Infragistics.Win.ControlUIElementBase.Draw(Graphics graphics, Rectangle invalidRectangle, Boolean doubleBuffer, AlphaBlendMode alphaBlendMode) 場所 Infragistics.Win.UltraControlBase.OnPaint(PaintEventArgs pe) 場所 System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion) 場所 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset) 場所 System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle) 場所 System.Windows.Forms.Control.OnPaintBackground(PaintEventArgs pevent) 場所 System.Windows.Forms.ScrollableControl.OnPaintBackground(PaintEventArgs e) 場所 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs) 場所 System.Windows.Forms.Control.WmEraseBkgnd(Message& m) 場所 System.Windows.Forms.Control.WndProc(Message& m) 場所 System.Windows.Forms.ScrollableControl.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)
Infragistic Version - v8.1
Dear All,
Can you please help me to resolve the above issues.
Thanks and REgards,
K.Mohan
Hello sivasamy,
You did not say if you tried version 12.1 of Net Advantage on this. I do not know what to tell you without looking at a reproducable sample. I have to guess just out of nothing here. This is not reliable and I will repeat myself by telling you that our controls are not thread safe if that is the case here.
I'm still getting this Access Violation Exception INTERMITTENTLY but not able to catch this exception with debugger! and also i'm not able to reliably replicate it!!
So is there a way to trap that line of code with debugger? i have setup TRY ....CATCH but no effect!
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Your last assumption seems fair. Actually our controls are not thread safe. You would have to handle the thread approach yourself. However, I could try to assist you on that matter. I do not know what is your exact scenario, so this is kind of an obstacle for me. Also, this could be an issue which has already been fixed. What I would suggest to you is to try your project with the trial version of NetAdvantage 12.1(latest service release - 2050) and see if it helps. Otherwise, it would be very helpful for our team if you could provide a small sample project reproducing this issue so I could take a look at it and test it with some other versions. If this does not help, I will try to find the source of this issue.
Thank you in advance. Feel free to ask anything else related to our controls in the meantime.
Actually the bug is not reproduceable reliably! It happens intermittently!!
I have noticed it happens on the occassions the system has returned from screen saver!!
We have a worker thread that downloads data from server and updates data source which is bound to an infragistics ultragrid.
While the worker thread is processing, the data grid is disabled. At times the downloading operation is longer and the OS is turning on screen saver. So when we move the mouse the screen saver dissappears and apparently, Its just my guess, the grid is accessing datasource which is being modified by worker thread and causes this exception??