Hi,
I read a few other articles regarding the same issue, but they didnt seem to apply to my problem.
One of my grids Occasionally crashes, especially when there are a lot of updates to the data. Im not explicitly using any sort of threading. Here's what I have done to prevent this:
1. My grid is bound to a Dataset. I lock the dataset before any use i.e. for updates, deletions and also for reads.
2. I have also tried locking using a synchronization object i.e.
Despite this, my grid still crashes (although a lot lesser than before). Also there are no exceptions / stack traces thown, and thus i cant seem to pin-point what exactly goes wrong.
Ive tried debugging with VS 2008 handling all threading and Drawing exceptions, and none were thrown upon the crashes.
Do you know what could be done to prevent this? Thanks.
Im using UltraWinGrid 7.3
Hello.
The big red "X" menas that some sort of exception occured in the Paint method. This does not have to be caused by threading, but it usually almost always is. What is likely happening here is that you are using multiple threads in your application and somehow one of the background threads is updating the data source.
It's going to be impossible to tell exactly what is going on without seeing your code and a running sample.
Any idea what the paint exception could be , coz then i can look for those exceptions.
How do i ensure that background threads do not update the datasource? The updates come in asynchronously , but there is very strict locking implemented.
Unfortunately I cant give you a code sample to run independently, so Ill have to debug this myself ... any helpful hints would be greatly appreciated! Thanks.
If your InitializeRow code was slowing down performance, then you might want to check out the WinGrid Performance Guide for tips on how to make the code more efficient.
I found a workaround for this after a lot of toiling! Since my grid was simple , I completely removed the "InitializeRow" function ... now the grid performs a zillion times better... i.e. it may crash once in 2-3 days as opposed to once every 30 minutes.
Are there any known issues with the "Initialize Row" event that I should be aware of? Thanks.