[wx-dev] [ wxwindows-Bugs-1933745 ] Crash in wxDataViewHeaderWindowBase::GetColumn()

SourceForge.net noreply at sourceforge.net
Sun Apr 13 08:36:09 PDT 2008


Bugs item #1933745, was opened at 2008-04-03 22:28
Message generated for change (Comment added) made by jobuz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1933745&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Must fix
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: jobuz (jobuz)
Assigned to: Nobody/Anonymous (nobody)
Summary: Crash in wxDataViewHeaderWindowBase::GetColumn()

Initial Comment:
The crash is reproduceble with dataview sample.
Click in a column header and move the mouse cursor outside the header. It asserts in file datavgen.cpp function GetColumn(). I have tracked this down to MSWOnNotify() function:

case HDN_BEGINDRAG:
        // user has started to reorder a column
        if (!GetColumn(nmHDR->iItem)->IsReorderable())

In the described situation nmHDR->iItem returns not the number of the header but -1 and this fails in GetColumn(). Checking for -1 fixes this for me.

regards
Jörg


WinXP SP2
Visual C++ 2008 Express 

----------------------------------------------------------------------

>Comment By: jobuz (jobuz)
Date: 2008-04-13 17:36

Message:
Logged In: YES 
user_id=1669181
Originator: YES

Curious, 
I have update to latest version 10 min ago and it crashes.
I discoverd that it crashes for SpinRenderer and also for TextRenderer.
I have attached a screenshot.
I use an unmodified setup.h. 

Maybe compiler related?

regards
Jörg


WinXP SP2
Visual C++ 2008 Express
File Added: DataviewCrash.jpg

----------------------------------------------------------------------

Comment By: Robert Roebling (roebling)
Date: 2008-04-13 15:09

Message:
Logged In: YES 
user_id=77100
Originator: NO

The sample works perfectly here under Windows XP.

----------------------------------------------------------------------

Comment By: jobuz (jobuz)
Date: 2008-04-13 08:44

Message:
Logged In: YES 
user_id=1669181
Originator: YES

Hello Robert,

I have updated to latest version. But now if SpinRenderer lost focus the
dataview sample crashes:
tracker.h(58) ..failed in wxTrackable:RemoveNode: removing invalid tracker
node

As far as I can see this is related to the change to wxKillRef. But here
ends my knowledge. I´m not so
familar with templates.

Mybe the reason for the crash is the same as closing the window if
SpinRenderer has focus. 

regards
Jörg


WinXP SP2
Visual C++ 2008 Express

----------------------------------------------------------------------

Comment By: Robert Roebling (roebling)
Date: 2008-04-07 13:21

Message:
Logged In: YES 
user_id=77100
Originator: NO

Yes please. I don't really know why it crashes. Is the wxDataViewCtrl
destroyed before its children under MSW? Could you test that?

----------------------------------------------------------------------

Comment By: jobuz (jobuz)
Date: 2008-04-05 16:39

Message:
Logged In: YES 
user_id=1669181
Originator: YES

Thanks, both fixes work for me.

While testing SpinRenderer fix I observed another bug. 
If SpinRenderer is focused (active) and you close the window it gives a
segfault in wxDataViewEditorCtrlEvtHandler::OnKillFocus().

Should I submit a new bug report for this?

regards
Jörg



----------------------------------------------------------------------

Comment By: Robert Roebling (roebling)
Date: 2008-04-05 14:33

Message:
Logged In: YES 
user_id=77100
Originator: NO

I have fixed this blindly in SVN, please test.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1933745&group_id=9863


More information about the wx-dev mailing list