Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - CXTPCommandBarsFrameHook crash
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPCommandBarsFrameHook crash

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

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 960
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: CXTPCommandBarsFrameHook crash
    Posted: 18 February 2026 at 2:18pm
During shutdown we have experienced crashes in CXTPCommandBarsFrameHook code. The call to GetFramePaintManager has returned a null pointer. In particular, as we shut down the hook's RedrawFrame has been called and the GetFramePaintManager()->DrawFrame line crashed due to the null pointer.

I see that CXTPCommandBarsFrameHook::GetFramePaintManager() can return NULL as can the call to pPaintManager->GetFramePaintManager if it is called.

I also see that many of the calls to GetFramePaintManager in XTPFrameHook.cpp test the returned pointer. Only a few do not and I'm modifying those to do so.

Would be great if a CJ update did the same so I don't have to maintain this change.

Not sure how we get into this as it isn't happening a lot. We do use skinning depending on a user setting for a color theme choice but I run with the skin a lot and haven't crashed. So this change I'm making is a hope so. As in I hope it avoids the crash.
Back to Top
agontarenko View Drop Down
Moderator Group
Moderator Group


Joined: 25 March 2016
Status: Offline
Points: 343
Post Options Post Options   Thanks (0) Thanks(0)   Quote agontarenko Quote  Post ReplyReply Direct Link To This Post Posted: 7 hours 58 minutes ago at 4:09am
Hello,

I've added nullptr check. 
How I can to reproduce your problem?

Regards,
Artem Gontarenko
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 960
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 1 hour 28 minutes ago at 10:39am
Hi Artem,

I wish I knew a way to reproduce the issue. It was random from what I can tell (I just got dump files). We do use skinning and I have been closing the app when we got a deadlock situation as all threads were waiting on objects. I have waited to see if the app would "wake up" and finish but when it is locked that hasn't happened and I just kill it (stop the debugger). I have no ideal if the two are related.

I added the pointer checks too so time will tell if this pops up elsewhere.
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.078 seconds.