Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Select Grid Row BY ID
Re: Select Grid Row BY ID [message #48032 is a reply to message #48030] Fri, 12 May 2017 02:20 Go to previous messageGo to previous message
germax is currently offline  germax
Messages: 20
Registered: March 2017
Location: germany
Promising Member
Oblivion wrote on Thu, 11 May 2017 20:57
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?

Just a single worker thread and that code is UNLIKELY to be run twice by accident really
(the calling button is the first thing to be disabled to prevent executing it twice with the same csv file.)
But frankly I'm by no means sure that there is no second instance..
The debugger only shows two threads though (the main one and my worker)
so I'm at least pretty confident there is no second instance Wink
I don't like that debugger too much though,
since using CoWork and having 40something threads running it likes to crash when I just try to change the inspected thread once halted without notice.
gdborig sometimes detaches from TheIDE occasionally and stays running in the background even after the inspected App is no longer running etc..
So yeah, that thing is NOT to my liking and thus I wouldn't want to bet money on it being accurate Sad

Oblivion wrote on Thu, 11 May 2017 20:57

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.


Yeah.. IDK, the only things thread accesses outside it's own scope of declaration
are the grid itself and The SQL instance, none of which gets destroyed as long as the App is running. *shrugs*

So if it crashes when I attempt to close the App, I'd agree..
but as long as the App remains open ... I don't get it.

I'll see if I can live with the single threaded speed for a while, which is working properly..
and if I can cut the app down to a functional demo with sqlite or something,
to show you at which point it breaks.

I again thank you for your patience and help.

Since you brought that up earlier..
This forum is all BUT full of helpful people
frankly, I've almost given up already..
it looks like most questions here do not get any answer at all
(or at best some general 'read the documentation' crap which is in fact more insult than help)
I've searched this forum a LOT the last few weeks, and basically nothing I was looking for was answered (although all has been asked at least once or twice some questions even four times...)

But this of all threads is not the place to rant, in fact I'm happy I'd give it another try, since you've proved there are exceptions.
And that's really letting me hope again.
And for that as well (on behalf of all newbies to the upp namespace) thank you!



that other german guy
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Minor "mistake" in <CtrlLib/ArrayCtrl.h>
Next Topic: Insert Ctrl editors in a single row of ArrayCtrl
Goto Forum:
  


Current Time: Sun Apr 28 22:50:03 CEST 2024

Total time taken to generate the page: 0.03590 seconds