Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Select Grid Row BY ID
Re: Select Grid Row BY ID [message #48030 is a reply to message #48029] |
Thu, 11 May 2017 20:57   |
Oblivion
Messages: 1206 Registered: August 2007
|
Senior Contributor |
|
|
It looks like a concurrency proeblem (a serialization issue) from here. But hard to say...
Are you running multiple worker threads? Is the method where your thread code resides executed more than once?
IF so, one thread may be altering the grid or SQL db (removing an entry and invalidating the iterators/indices), while the other one sleeps.
This can happen any time, right in the middle of your loop if you don't serializa access to shared data using mutexes.
Or it might be that the worker threads outlive the data objects (grid, or SQL).
For the sake of simplicity I'll give you a minimal example.
The following code MAY or MAY NOT lead to crash, for we can't be sure how long the thread will take to finish.
MyApp::MyMethod()
{
String text; // String will be destroyed when when MyMethod returns().
Thread().Run([=] {
// Do someting that takes time.
text = "hello world"; // This may or may not lead to crash. Because the thread may outlive the text object and MyMethod.
});
}
So you'll need to take into consideration all kinds of concurrency problems.
If you can provide a simple example (and a very small dummy database) reproducing the crash, I'll loook into it and try to help.
Regards,
Oblivion.
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Thu, 11 May 2017 21:15] Report message to a moderator
|
|
|
 |
|
Select Grid Row BY ID
By: germax on Fri, 05 May 2017 19:32
|
 |
|
Re: Select Grid Row BY ID
By: deep on Mon, 08 May 2017 15:07
|
 |
|
Re: Select Grid Row BY ID
|
 |
|
Re: Select Grid Row BY ID
By: germax on Wed, 10 May 2017 12:33
|
 |
|
Re: Select Grid Row BY ID
|
 |
|
Re: Select Grid Row BY ID
By: germax on Thu, 11 May 2017 03:33
|
 |
|
Re: Select Grid Row BY ID
|
 |
|
Re: Select Grid Row BY ID
By: germax on Thu, 11 May 2017 20:17
|
 |
|
Re: Select Grid Row BY ID
|
 |
|
Re: Select Grid Row BY ID
By: germax on Fri, 12 May 2017 02:20
|
 |
|
Re: Select Grid Row BY ID
|
 |
|
Re: Select Grid Row BY ID
By: germax on Sat, 13 May 2017 19:13
|
 |
|
Re: Select Grid Row BY ID
|
 |
|
Re: Select Grid Row BY ID
By: germax on Sun, 14 May 2017 19:48
|
 |
|
Re: Select Grid Row BY ID
By: JeyCi on Thu, 18 February 2021 14:45
|
 |
|
Re: Select Grid Row BY ID
By: JeyCi on Fri, 19 February 2021 07:31
|
 |
|
Re: Select Grid Row BY ID
By: deep on Mon, 15 May 2017 07:44
|
 |
|
Re: Select Grid Row BY ID
By: germax on Mon, 15 May 2017 14:22
|
Goto Forum:
Current Time: Sat May 10 20:56:49 CEST 2025
Total time taken to generate the page: 0.00761 seconds
|