Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
390
Red "X" of Death
posted

Hello all,

Pardon the topic name, but this error has been giving us a lot of trouble and after weeks of investigating we still have no idea how, when, or why it happens.

We use background workers but the grid that's getting this error is independent of the BG.

If someone can please tell us when the error happens so we can trap it, that would be great.

 Attached is the error message we're getting when the "Red X" happens.

 Thank you very much. 

Parents
  • 469350
    Offline posted

    phenomenex said:
    We use background workers but the grid that's getting this error is independent of the BG.

     

    How independent is it? Sometimes it's not so easy to tell. The most common case where threading causes a problem like this is where the background thread does something to the data source - not directly to the grid. But the data source then fires events which get handled by the BindingManager, which then raises notifications to the grid. So if you thread does anything that might affect the grid's data source, it could easily be causing this issue. 

    Another characteristic of threading problems is that the usually occur seemingly at random. The exception will often occurlong after the background thread has completed or when the application is doing something that is not even related to the grid. These issues are impossible to trap and notoriously difficult to track down, because the actual problem occurs long before the exception does.

    The red X basically means that there was an exception during the control's OnPaint event. This is most commonly caused by threading issues, but it's not the only possible cause. Can you reliably reproduce the error? If so, it's probably not a threading issue.

Reply Children