Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Crash in v19.2.0 when Resizing Property Editor
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Crash in v19.2.0 when Resizing Property Editor

 Post Reply Post Reply
Author
Message
cpede View Drop Down
Senior Member
Senior Member


Joined: 13 August 2004
Location: Denmark
Status: Offline
Points: 668
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpede Quote  Post ReplyReply Direct Link To This Post Topic: Crash in v19.2.0 when Resizing Property Editor
    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 (24.0.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)
Back to Top
astoyan View Drop Down
Admin Group
Admin Group
Avatar

Joined: 24 August 2013
Status: Offline
Points: 304
Post Options Post Options   Thanks (0) Thanks(0)   Quote astoyan Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
DiZSl View Drop Down
Newbie
Newbie


Joined: 08 August 2020
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote DiZSl Quote  Post ReplyReply Direct Link To This Post 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;
........
........
........
}
Back to Top
mihey View Drop Down
Groupie
Groupie
Avatar

Joined: 14 May 2003
Location: Germany
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote mihey Quote  Post ReplyReply Direct Link To This Post 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
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.109 seconds.