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 » Developing U++ » UppHub » Docking: Bug Fix:
Docking: Bug Fix: [message #27389] Thu, 15 July 2010 14:20 Go to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

Hello All,

I tested the Docking package and found a bug when using docking window without child windows. Need to initialize the property tabcont from class: DockWindow::PosInfo
PosInfo() : state(DockCont::STATE_NONE) {tabcont=NULL;} 


The flat file is attached!

Regards, Ion Lupascu (tojocky)!
  • Attachment: Docking.7z
    (Size: 6.10KB, Downloaded 188 times)

[Updated on: Thu, 15 July 2010 14:20]

Report message to a moderator

Re: Docking: Bug Fix: [message #27391 is a reply to message #27389] Thu, 15 July 2010 14:38 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
- I cannot reproduce the bug. Are you sure the bug wasn't caused by serializing (loading) from a file saved with a different configuration?

- The variable tabcont is a Ptr<DockCont> and Ptr<>s initialise themselves to NULL on creation, so I canot see how that could be the solution to the problem.
Re: Docking: Bug Fix: [message #27396 is a reply to message #27391] Thu, 15 July 2010 15:56 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

mrjt wrote on Thu, 15 July 2010 15:38

- I cannot reproduce the bug. Are you sure the bug wasn't caused by serializing (loading) from a file saved with a different configuration?

- The variable tabcont is a Ptr<DockCont> and Ptr<>s initialise themselves to NULL on creation, so I canot see how that could be the solution to the problem.


The problem is with destructor. When I close the application then it tries to delete null pointer and prompts "access violation"!

P.S. I didn't load from a file saved with a different configuration.

[Updated on: Thu, 15 July 2010 16:11]

Report message to a moderator

Re: Docking: Bug Fix: [message #27402 is a reply to message #27396] Thu, 15 July 2010 16:23 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I still can't reproduce it.

The problem is:
-The fix you posted should have no effect, since tabcont will already be NULL.
-Calling 'delete' on a NULL pointer is valid in C++ so that should not cause a problem.
-If it's calling a delete on a garbage (wrong/random) pointer I can see how that would be a problem, although being in a Ptr object should protect against that, but in that case your fix also shouldn't make any difference since the garbage must be being assigned after the NULL initialisation.

Re: Docking: Bug Fix: [message #27403 is a reply to message #27402] Thu, 15 July 2010 16:40 Go to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

mrjt wrote on Thu, 15 July 2010 17:23

I still can't reproduce it.

The problem is:
-The fix you posted should have no effect, since tabcont will already be NULL.
-Calling 'delete' on a NULL pointer is valid in C++ so that should not cause a problem.
-If it's calling a delete on a garbage (wrong/random) pointer I can see how that would be a problem, although being in a Ptr object should protect against that, but in that case your fix also shouldn't make any difference since the garbage must be being assigned after the NULL initialisation.



Sorry, it seems to be a false alarm.

The problem was:
1. I compiled my package with a old version of Docking
2. I update the old version with new version
3. I DIDN'T FULL REcompile the package.

After change the Docking package seems that Docking and related packages was recompiled!

Sorry for false alarm.

Regards, Ion Lupascu (tojocky).
Previous Topic: BUGFIX: ExpanderFrame
Next Topic: Docking - Name clash with opencascade library
Goto Forum:
  


Current Time: Thu Mar 28 12:37:21 CET 2024

Total time taken to generate the page: 0.01057 seconds