Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - Crash in CXTPTaskPanelPaintManager::DrawGroupClien
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Crash in CXTPTaskPanelPaintManager::DrawGroupClien

 Post Reply Post Reply
Author
Message
mrmathis View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 May 2007
Location: United States
Status: Offline
Points: 105
Post Options Post Options   Thanks (0) Thanks(0)   Quote mrmathis Quote  Post ReplyReply Direct Link To This Post Topic: Crash in CXTPTaskPanelPaintManager::DrawGroupClien
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.