Print Page | Close Window

ASSERT after inplace edit finish

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=23355
Printed Date: 25 April 2024 at 12:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ASSERT after inplace edit finish
Posted By: mgampi
Subject: ASSERT after inplace edit finish
Date Posted: 02 June 2017 at 5:47am
HI;

I'm using the report control inside a modal dialog box. Whenever i finish editing (by pressing return or escape or ...) I get an ASSERT in CWnd::AssertValid() (line 902 in wincore.cpp).
#ifdef _DEBUG
void CWnd::AssertValid() const
{
    if (m_hWnd == NULL)
        return;     // null (unattached) windows are valid

    // check for special wnd??? values
    ASSERT(HWND_TOP == NULL);       // same as desktop
    if (m_hWnd == HWND_BOTTOM)
        ASSERT(this == &CWnd::wndBottom);
    else if (m_hWnd == HWND_TOPMOST)
        ASSERT(this == &CWnd::wndTopMost);
    else if (m_hWnd == HWND_NOTOPMOST)
        ASSERT(this == &CWnd::wndNoTopMost);
    else
    {
        // should be a normal window
        ASSERT(::IsWindow(m_hWnd));    <--- ASSERT happens here

        // should also be in the permanent or temporary handle map
        CHandleMap* pMap = afxMapHWND();
        ASSERT(pMap != NULL);

        CObject* p=NULL;


And here is the call stack:



How can I avoid this assert?


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Replies:
Posted By: astoyan
Date Posted: 05 June 2017 at 12:59am
Hello,

There is almost no indication that the assertion is caused by any of XTP classes as the only evidence of Codejock components being involved is the presence of CXTPDialogBase::OnWndMsg call on your stack. But that's not enough for fixing or reproducing that bug. You also haven't mentioned the version of the Toolkit you have issue with.

Have you had a chance to test the same or similar functionality the closest  available options? If not please try that first, then submit as much as possible information or try to make a simple sample.

Regards,
   Alexander



Posted By: mgampi
Date Posted: 06 June 2017 at 1:35am
It's always happening when the edit control is loosing focus.
I will try to create a sample based on your report samples.
In my case a modeless dialog calls a modal dialog .
The assert happens because the AssertValid is called for the Inplace Edit control and this window no longer exists.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



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