Print Page | Close Window

Crash in CXTPTaskPanelPaintManager::DrawGroupClien

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Task Panel
Forum Description: Topics Related to Codejock Task Panel
URL: http://forum.codejock.com/forum_posts.asp?TID=7987
Printed Date: 21 November 2024 at 12:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Crash in CXTPTaskPanelPaintManager::DrawGroupClien
Posted By: mrmathis
Subject: Crash in CXTPTaskPanelPaintManager::DrawGroupClien
Date Posted: 12 September 2007 at 7:25pm
I have a case in which I am crashing in CXTPTaskPanelPaintManager::DrawGroupClient because in the line

    int nAlpha = pGroup->IsExpanding() ? (255 * rc.Height()) / pGroup->GetExpandedClientHeight() : 255;

pGroup->GetExpandedClientHeight() is returning 0, resulting in (surprise) a divide by zero.  I installed a little defensive programming in this function to prevent the crash.  It may be that I don't have something set up correctly, but a bit more checking in the DrawGroupClient code doesn't seem unreasonable to me.

I am running 10.4 and see that the source hasn't changed (in this function, anyway) in 11.1.  Has this been fixed in 11.2?





-------------
--Mike



Replies:
Posted By: Oleg
Date Posted: 13 September 2007 at 3:53am
Thanks,
yes it was fixed for 11.2 version. Please replace to
 
int nAlpha = pGroup->IsExpanding() ? (255 * rc.Height()) / max(1, pGroup->GetExpandedClientHeight()) : 255;


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net