Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Random problems with destructors in GUI classes
Re: Random problems with destructors in GUI classes [message #49433 is a reply to message #49421] |
Fri, 09 February 2018 13:48   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
koldo wrote on Thu, 08 February 2018 10:11Hello all
I have random problems with GUI controls. Sometimes with DEBUG or RELEASE, when a control is destructed an EXCEPTION_ACCESS_VIOLATION exception raises. This happens in ScatterCtrl.
For example, function ScatterCtrl::DoShowEditDlg() calls PropertiesDlg(*this, itab).Run(true) opening a dialog.
Sometimes, when this dialog is closed, this errror raises. The function call stack represets basically destructors:

It is like there is a problem in the destructors order, so that in this case, when ColorPusher destructor is called, parent controls has been already destructed.
I have seen that many or maybe all GUI controls have virtual destructors. Maybe it has no sense but, should GUI user controls destructors have to be also virtual?
With very little info you have provided I would actually think that the problem here is properties dialog is already deleted when the constructor is invoked - but that is just the first thing I would check.
I have tried to identify the problem in trunk, but all seems OK there. Is this trunk code or some new development?
|
|
|
 |
 |
Random problems with destructors in GUI classes
By: koldo on Thu, 08 February 2018 10:11
|
 |
|
Re: Random problems with destructors in GUI classes
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Thu, 08 February 2018 11:25
|
 |
|
Re: Random problems with destructors in GUI classes
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Fri, 09 February 2018 13:36
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Thu, 08 February 2018 13:02
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Fri, 09 February 2018 13:48
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Sat, 10 February 2018 23:53
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Sun, 11 February 2018 08:25
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Sun, 11 February 2018 08:33
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Sun, 11 February 2018 09:27
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Mon, 12 February 2018 22:24
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Mon, 12 February 2018 23:06
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Tue, 13 February 2018 10:53
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Sat, 17 February 2018 12:43
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Sun, 18 February 2018 10:06
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Sat, 24 February 2018 10:28
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Sat, 24 February 2018 12:40
|
 |
|
Re: Random problems with destructors in GUI classes
By: koldo on Fri, 02 March 2018 15:00
|
 |
|
Re: Random problems with destructors in GUI classes
By: mirek on Fri, 02 March 2018 15:07
|
Goto Forum:
Current Time: Sat Apr 26 09:47:29 CEST 2025
Total time taken to generate the page: 0.03227 seconds
|