Print Page | Close Window

Crash in v19.2.0 when Resizing Property Editor

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=23999
Printed Date: 29 February 2024 at 12:19am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Crash in v19.2.0 when Resizing Property Editor
Posted By: cpede
Subject: Crash in v19.2.0 when Resizing Property Editor
Date Posted: 18 June 2020 at 3:30am
With the new v19.2.0 I get the following crash


With the following call stack:
> ToolkitPro1920vc150D.dll!CXTPPropertyGridView::OnSelectionChanged() Line 1059 C++
  ToolkitPro1920vc150D.dll!CXTPPropertyGridView::OnSize(unsigned int nType, int cx, int cy) Line 1113 C++
  [External Code]
  [Frames below may be incorrect and/or missing, no symbols loaded for mfc140d.dll] Unknown
  ToolkitPro1920vc150D.dll!CXTPScrollable<CXTPPropertyGridView>::OnWndMsg(unsigned int message, unsigned int wParam, long lParam, long * pResult) Line 562 C++
  [External Code]
  ToolkitPro1920vc150D.dll!CXTPScrollable<CXTPPropertyGridView>::DefWindowProcA(unsigned int message, unsigned int wParam, long lParam) Line 547 C++
  [External Code]
  ToolkitPro1920vc150D.dll!CXTPPropertyGrid::OnSize(unsigned int nType, int cx, int cy) Line 893 C++

It happens when I clear the property list ResetContent() and then fill it again with some properties and then resize the docking pane including the property editor.

-cpede


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)



Replies:
Posted By: astoyan
Date Posted: 24 June 2020 at 3:48pm
I'm not able to reproduce the problem using GridSample sample project after adding ResetContent followed by re-populating of the initial content, all seems to work fine.

It may depend on the particular items you have and their focus state prior to being reset.
Can you please try to reproduce it in GridSample using property items like in your project?

Also please provide 'this' pointer value and content at the point of crash.

Regards,
  Alexander


Posted By: DiZSl
Date Posted: 23 September 2020 at 7:02am
I'm reproduce this bug and fix it.
The problem is as follows.
Since we now have 2 views, there are also 2 selected objects (in each view). But at some point they become different (when updating the main view) and one of them is invalid.

You can reproduce the problem like this:
-fill propertygrid with some data
-select any property
-resize main form with calling the RepositionControls method with
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, 0, reposQuery, rcClientNow);
-clean propertygrid (the selected object will be deleted)
-
resize main form again with call the RepositionControls for all children
Program will crash

Fix:
add virtual method to CXTPPropertyGridView
    virtual bool IsScrollablePropertyGridListBox()
    {
        return false;
    }

and add override method for CXTPScrollablePropertyGridListBox
    bool IsScrollablePropertyGridListBox() override
    {
        return true;
    }

and add code for void OnSelectionChanged() method
void CXTPPropertyGridView::OnSelectionChanged()
{
    if (IsScrollablePropertyGridListBox())
        return;
........
........
........
}


Posted By: mihey
Date Posted: 23 September 2020 at 9:38am
Did not use v.19.2 but have the same issue now with XTP 19.3.

Using XTP_PROPERTY_GRID_DISABLE_SCROLLBAR_THEMES helped, but then I'm getting some redraw problems which are also described here in the forum.

Br, 
Mikhail



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