Print Page | Close Window

CXTPPropertyGridInPlaceEdit::OnEnKillFocus() BANG!

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=14184
Printed Date: 21 November 2024 at 6:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyGridInPlaceEdit::OnEnKillFocus() BANG!
Posted By: newbarker
Subject: CXTPPropertyGridInPlaceEdit::OnEnKillFocus() BANG!
Date 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



Replies:
Posted By: newbarker
Date 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
}

 


Posted By: Oleg
Date 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


Posted By: newbarker
Date 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



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