Home » Developing U++ » UppHub » Docking: Bug Fix:
Docking: Bug Fix: [message #27389] |
Thu, 15 July 2010 14:20 |
|
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 189 times)
[Updated on: Thu, 15 July 2010 14:20] Report message to a moderator
|
|
|
|
Re: Docking: Bug Fix: [message #27396 is a reply to message #27391] |
Thu, 15 July 2010 15:56 |
|
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 #27403 is a reply to message #27402] |
Thu, 15 July 2010 16:40 |
|
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).
|
|
|
Goto Forum:
Current Time: Fri Apr 26 15:50:43 CEST 2024
Total time taken to generate the page: 0.02988 seconds
|