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 » 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 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
koldo wrote on Thu, 08 February 2018 10:11
Hello 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:

index.php?t=getfile&id=5501&private=0

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?
 
Read Message icon4.gif
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
Read Message
Previous Topic: FOUR State Option button
Next Topic: Ctrl creation via dll stuff
Goto Forum:
  


Current Time: Sat May 04 16:28:51 CEST 2024

Total time taken to generate the page: 0.03323 seconds