Ticket #10054 (closed defect: fixed)

Opened 8 weeks ago

Last modified 8 weeks ago

assert with wxDataViewCtrl

Reported by: Trigve Owned by:
Priority: normal Milestone:
Component: GUI-generic Version: 2.9-svn
Keywords: wxDataViewCtrl assert Cc:
Blocked By: Patch: yes
Blocking:

Description

I've got assertion in wx\scrlowin.h

virtual wxSize GetSizeAvailableForScrollTarget(const wxSize& size)
    {
        wxASSERT_MSG( m_targetWindow == m_win, "must be overridden" );

        return size;
    }

when using wxDataViewCtrl. I'm attaching a patch

Attachments

data_view_crash.patch (0.5 kB) - added by Trigve 8 weeks ago.
dataview-null.patch (0.6 kB) - added by troelsk 8 weeks ago.
Make it null

Change History

Changed 8 weeks ago by Trigve

Changed 8 weeks ago by roebling

  • status changed from new to closed
  • resolution set to fixed

I hope I have fixed this taking the header window area into account.

Changed 8 weeks ago by Trigve

  • status changed from closed to reopened
  • resolution deleted

Looks like there is another crash, because m_headerArea is unintialized when wxDataViewCtrl::GetSizeAvailableForScrollTarget(...) is called:

wxSize newsize = size;
    if (!HasFlag(wxDV_NO_HEADER))
       newsize.y -= m_headerArea->GetSize().y; // this line, m_headerArea = 0xcdcdcdcd
    
    return newsize;

stack:

 	wxmsw290ud_core_vc_custom.dll!wxWindowBase::GetSize()  Line 327 + 0xd bytes	C++
 	wxmsw290ud_adv_vc_custom.dll!wxDataViewCtrl::GetSizeAvailableForScrollTarget(const wxSize & size={...})  Line 4164 + 0x15 bytes	C++
 	wxmsw290ud_core_vc_custom.dll!wxScrollHelper::AdjustScrollbars()  Line 740 + 0x54 bytes	C++
 	wxmsw290ud_adv_vc_custom.dll!wxDataViewCtrl::OnSize(wxSizeEvent & __formal={...})  Line 4180 + 0x19 bytes	C++

Changed 8 weeks ago by roebling

  • status changed from reopened to closed
  • resolution set to fixed

I'm not quite sure from where OnSize is called before the constructor has finished, but I've corrected this, too.

Changed 8 weeks ago by troelsk

Make it null

Changed 8 weeks ago by troelsk

Unfortunately m_headerArea is uninitialized. New attachment.

Changed 8 weeks ago by roebling

Right.

Note: See TracTickets for help on using tickets.