Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
C::B runtime errors when WXWIN_COMPATIBILITY_2_4=0 or disable-compat24
stahta01:
--- Quote from: afb on November 27, 2006, 11:09:36 am ---I think some of these were showing up as failed assertions before, well worth looking into:
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1538&group_id=5358
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1539&group_id=5358
--- End quote ---
This one looks useful.
[ Patch #1538 ] Assert failure fixes
http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1538&group_id=5358
But, the other one does not apply to this problem, so most likely not useful. Also, it should not be used with this pointers, therefore it could cause more issues. I already tried all the types of wx casts I could find, the problem is in the findWindow not the cast. See file wx/object.h for wxDynamicCastThis as the correct way to cast this.
Correction: The object being casted is not an this object, so it should be safe, but it still does NOT apply to this exact bug.
Note: I am double checking by redoing the test with debug and WXWIN_COMPATIBILITY_2_4=1.
Ran my test code with debug and WXWIN_COMPATIBILITY_2_4=1 and had no crashes or assertions.
Tim S
afb:
--- Quote from: stahta01 on November 27, 2006, 11:31:46 am ---But, the other one does not apply to this problem, so most likely not useful.
--- End quote ---
Maybe not, but getting rid of the failed assertions looked like a worthy side-effect of this bughunt.
stahta01:
--- Quote from: afb on November 27, 2006, 11:58:43 am ---
--- Quote from: stahta01 on November 27, 2006, 11:31:46 am ---But, the other one does not apply to this problem, so most likely not useful.
--- End quote ---
Maybe not, but getting rid of the failed assertions looked like a worthy side-effect of this bughunt.
--- End quote ---
But, the one patch is replacing a static cast with a dynamic cast, so its needs to be verified that you are not just moving the errors from compile/link time to runtime. Note, that is why he says to check for a valid object before doing the Macro. I am far from being able to say the patch is safe or not safe, but at current time don't see the need for it. I think the assertion should be failing in this case, not that it should NOT be.
Tim S
afb:
As long as it runs without assertions for normal usage, it's all OK...
I didn't mean for the patch applied as-is, as it is rather old by now.
stahta01:
--- Quote from: afb on November 27, 2006, 12:17:11 pm ---As long as it runs without assertions for normal usage, it's all OK...
I didn't mean for the patch applied as-is, as it is rather old by now.
--- End quote ---
My test code even works OK with debug and WXWIN_COMPATIBILITY_2_4=1.
The problem is findWindow in my opinion; I am going to work on a small test case of the problem.
I am starting with samples\xrc under 2.6.3 as a starting point. I hope to be able to reproduce the issue for the wxWidgets people to look at.
Tim S
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version