Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - CXTPPropertyGridInPlaceEdit::OnEnKillFocus() BANG!
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyGridInPlaceEdit::OnEnKillFocus() BANG!

 Post Reply Post Reply
Author
Message
newbarker View Drop Down
Newbie
Newbie


Joined: 30 April 2009
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote newbarker Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyGridInPlaceEdit::OnEnKillFocus() BANG!
    Posted: 30 April 2009 at 6:58am

Hello,

Our application uses CodeJock to implement user-interface properties.
 
In debug mode only, after entering a property and pressing ENTER, we get a crash:
 
Unhandled exception at 0x7c28fdea (mfc71d.dll) in <our app name>.exe
0xC0000005: Access violation reading location 0x00000306.
 
The debugger stops at mfc\cmdtarg.cpp in function _AfxDispatchCmdMsg() around this block:
 
 case AfxSigCmd_v:
  // normal command or control notification
  ASSERT(CN_COMMAND == 0);        // CN_COMMAND same as BN_CLICKED
  ASSERT(pExtra == NULL);
  (pTarget->*mmf.pfnCmd_v_v)();     // *** STOPS HERE I THINK ***
  break;
Next up the call stack is CXTPPropertyGridInplaceEdit::OnEnKillfocus().
 
Here's the stack:
 
mfc71d.dll!CWnd::Invalidate(int bErase=0)  Line 135 + 0xa
CXTPPropertyGridInplaceEdit::OnEnKillfocus()  Line 176 
mfc71d.dll!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x0884c018, unsigned int nID=0, int nCode=512, void (void)* pfn=0x00f8390d, void * pExtra=0x00000000, unsigned int nSig=53, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Line 89 C++
mfc71d.dll!CCmdTarget::OnCmdMsg(unsigned int nID=0, int nCode=512, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000)  Line 396 + 0x27 C++
mfc71d.dll!CWnd::ReflectChildNotify(unsigned int uMsg=273, unsigned int wParam=33554432, long lParam=1051288, long * pResult=0x00000000)  Line 3233 + 0x21 C++
mfc71d.dll!CWnd::OnChildNotify(unsigned int uMsg=273, unsigned int wParam=33554432, long lParam=1051288, long * pResult=0x00000000)  Line 3205 C++
Can anyone tell me what might be going wrong?
 
Has anyone seen something like this before?
 
Thanks for looking,
 
Pete
Back to Top
newbarker View Drop Down
Newbie
Newbie


Joined: 30 April 2009
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote newbarker Quote  Post ReplyReply Direct Link To This Post Posted: 06 May 2009 at 5:34am
Moderator: This topic is still pending approval. Can you approve it please?
 
Here's the place in the CodeJock code where CWnd::Invalidate() is called:

void CXTPPropertyGridInplaceEdit::OnEnKillfocus()
{
 if (!m_pGrid)
  return;

 if (m_pItem)
 {
  m_pItem->OnValidateEdit();
  if (m_pGrid) m_pGrid->Invalidate(FALSE);
 }

#ifdef XTP_SITENOTIFY_ONFOCUS
 XTP_SITENOTIFY_ONFOCUS(this, m_pGrid, FALSE)
#endif
}

 
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: 07 May 2009 at 12:55am
Hi,
 
Can you compile our sample and check if it works ?
 
What version do you have ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
newbarker View Drop Down
Newbie
Newbie


Joined: 30 April 2009
Location: United Kingdom
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote newbarker Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2009 at 4:35am

Appreciate your reply.

I've compiled these samples:
 
PropertyGrid\BindSample
PropertyGrid\DrawClient
PropertyGrid\GridSample
PropertyGrid\OwnerDraw
 
and couldn't get any of them to crash.
 
We're using version 9.60.1. I understand this might be a bit old but we're only using the property grid part of codejock. The property grid is one of the main UI parts to our application, and the application is pretty large so I wanted to try to avoid upgrading at this time because I'm fairly sure an upgrade would take us time to subsume and stabilise. I need to try and fix this fairly quickly.
 
Our application makes a lot of use of BCG and docking windows. The property grid sits inside a BCG docking window. I notice the samples are dialog-based and wonder if that might make a difference.
 
Any ideas you have would be well received.
 
Thanks,
 
Pete
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.