We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

''race condition'' exception in paint method

Thread ID:

Created:

Updated:

Platform:

Replies:

76832 Sep 25,2008 08:22 AM Feb 3,2009 04:31 AM Windows Forms 5
loading
Tags: GridControl
Bijeshnath Ravindranath
Asked On September 25, 2008 08:22 AM

Hi,
We use Syncfusion grids, in virtual mode, extensively in our application.
We noticed the following exception from one of our users. We haven't managed to recreate this issue in a development envirnoment, but this is happening inside the syncfusion grid's paint method, so I wanted to know if you have any idea about what may have caused this?

thanks and regards,
Bijesh
2008-09-22 17:14:49,668 ERROR [5492] (ExceptionManager:0) - Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
System.IndexOutOfRangeException: Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at System.IO.TextWriter.WriteLine(String value)
at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)
at Syncfusion.Diagnostics.TraceUtil.TraceExceptionCatched(Exception e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WmPaint(Message& msg)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



Jisha Joy [Syncfusion]
Replied On September 26, 2008 02:37 AM

Hi Bijesh,

Thank you for posting query to us.

The issue is not seems to be with Syncfusion Controls. Please refer the following MSDN forums that disscusses the similar issue:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3122353&SiteID=1

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/79eecc21-34b3-4c2a-9a88-bd62ea5d9782/

http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/d652d4f9-69c9-48f2-a48b-d340a4909667/

Regards,
Jisha


Daniel Jebaraj [Syncfusion]
Replied On October 1, 2008 12:16 AM

Hi Bijesh,

Is it possible that the grid is being updated from multiple threads? Please let us know.

Best regards,
Daniel
Syncfusion, Inc

>Hi,
We use Syncfusion grids, in virtual mode, extensively in our application.
We noticed the following exception from one of our users. We haven't managed to recreate this issue in a development envirnoment, but this is happening inside the syncfusion grid's paint method, so I wanted to know if you have any idea about what may have caused this?

thanks and regards,
Bijesh
2008-09-22 17:14:49,668 ERROR [5492] (ExceptionManager:0) - Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
System.IndexOutOfRangeException: Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at System.IO.TextWriter.WriteLine(String value)
at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)
at Syncfusion.Diagnostics.TraceUtil.TraceExceptionCatched(Exception e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WmPaint(Message& msg)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)





Bijeshnath Ravindranath
Replied On October 2, 2008 06:46 AM

Hi Daniel and Jisha,
We have taken care about not accessing the gird from any thread other than the main app thread. So I do not think that is the issue.
In any case, we were unable to recreate this in our dev environment and so far it has not happened again in release env. So I don't really have anything else to go by. Thanks for the help, I will get back to you if it happens again, and if I can manage to get more information.
regards
Bijesh

>Hi Bijesh,

Is it possible that the grid is being updated from multiple threads? Please let us know.

Best regards,
Daniel
Syncfusion, Inc

>Hi,
We use Syncfusion grids, in virtual mode, extensively in our application.
We noticed the following exception from one of our users. We haven't managed to recreate this issue in a development envirnoment, but this is happening inside the syncfusion grid's paint method, so I wanted to know if you have any idea about what may have caused this?

thanks and regards,
Bijesh
2008-09-22 17:14:49,668 ERROR [5492] (ExceptionManager:0) - Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
System.IndexOutOfRangeException: Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at System.IO.TextWriter.WriteLine(String value)
at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)
at Syncfusion.Diagnostics.TraceUtil.TraceExceptionCatched(Exception e)
at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at Syncfusion.Windows.Forms.ScrollControl.WmPaint(Message& msg)
at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)







Jisha Joy [Syncfusion]
Replied On October 3, 2008 06:18 AM

Hi Bijesh,

Thank you for your update.

Regards,
Jisha


Bijeshnath Ravindranath
Replied On February 3, 2009 04:31 AM

Hi, We got this exception again in our app,. This time it happened inside a clippoard copy method call. The stack trace is below.

Please let me know if you have any information about this..


Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader. (An email has been sent to the support team): System.IndexOutOfRangeException: Probable I/O race condition detected while copying memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at System.IO.TextWriter.WriteLine(String value)
at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)
at Syncfusion.Diagnostics.TraceUtil.TraceExceptionCatched(Exception e)
at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.CopyCellsToClipboard(GridRangeInfoList rangeList, Boolean bLoadBaseStyles)
at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.CopyRange(GridRangeInfoList rangeList)
at Syncfusion.Windows.Forms.Grid.GridModelCutPaste.Copy()


>Hi Bijesh,

Thank you for your update.

Regards,
Jisha




CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;