![]() |
CXTPOffice2007FrameHook::RedrawFrame() Crashes |
Post Reply ![]() |
Author | |
gwoin ![]() Groupie ![]() ![]() Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
![]() ![]() ![]() ![]() ![]() Posted: 27 February 2007 at 5:17am |
Hi,
I am using Ribbon and own Skin in a MFC application and I think there are some problems with that configuration. The application crashes some times on XTPSkinManagerAPIHook. I already tried the patch from SUNGGI, using CCriticalSection, but it doesn't work for me ![]() Here is the call stack (I renamed the DLL "UID" for shorter):
In the stack, and in the function below, dc is NULL: void CXTPOffice2007FrameHook::RedrawFrame() { if (!m_bDwmEnabled) { CWindowDC dc(GetSite()); GetPaintManager()->DrawRibbonFrame(&dc, this); } } This is very annoying because the application can crash at anytime without I can understand why. Any idea to avoid this bug ? Thank you. |
|
![]() |
|
gwoin ![]() Groupie ![]() ![]() Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
![]() ![]() ![]() ![]() ![]() |
Hi,
the problem is still there. My application crashes in the RibbonBar (CommandBarxxx files) redraw. It happens really quickly, just after few minutes, even if I don't use it. Each time, the callstack show that a CDC is empty. Another sample of calls stack:
Could there be a reason why a CDC created with "CreateCompatibleDC" or with "CXTPCompatibleDC dc(pDC, &bmp);" is empty? The problem can appears at different places in the Ribbon redraw. Some other times, it crashes in the XTPOffice2007Image.cpp file, in the "DrawImage" function. After this line (l. 236): CXTPCompatibleDC dc(pDC, &bmp); dc has a m_hDC = NULL ![]() I looked at the XTP samples and I am using the same code to create my window, my ribbonbar and apply skin and ribbon theme. Any idea to avoid this? |
|
![]() |
|
Didi ![]() Groupie ![]() Joined: 05 July 2013 Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
I knkow, this post is very old.
But I have actually the same problem. Was there any solution? Wy returns the constructor of CXTPCompatibleDC sometimes NULL ? Is that a problem wit windows-resources? Best regards, Didi |
|
![]() |
|
Didi ![]() Groupie ![]() Joined: 05 July 2013 Status: Offline Points: 17 |
![]() ![]() ![]() ![]() ![]() |
PS solved
The problem was a resource leak in my own code. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |