Ticket #10158 (closed defect: outdated)

Opened 5 years ago

Last modified 8 months ago

wxOwnerDrawnComboBox assertion

Reported by: Trigve Owned by:
Priority: normal Milestone:
Component: wxMSW Version: 2.9-svn
Keywords: wxOwnerDrawnComboBox assert Cc:
Blocked By: Patch: no
Blocking:

Description

When using wxOwnerDrawnComboBox and clicking to drop-down arrow, popup window is shown. Then clicking again on popup arrow (while popup window is shown) I get an assertion:

19:17:26: Debug: ..\..\src\common\combocmn.cpp(1842): assert
"!IsPopupWindowState(Visible)" failed in wxComboCtrlBase::ShowPopup(): popup
window already shown

stack:

...
 	wxbase290ud_vc_custom.dll!wxOnAssert(const char * szFile=0x03acfb28, int
nLine=1842, const char * szFunc=0x03acfb0c, const char * szCond=0x03acfaec,
const wchar_t * szMsg=0x03acfab4)  Line 921 + 0x62 bytes	C++
 	wxmsw290ud_core_vc_custom.dll!wxComboCtrlBase::ShowPopup()  Line 1842 + 
0x34 bytes	C++
 	wxmsw290ud_core_vc_custom.dll!wxComboCtrlBase::OnButtonClick()  Line 
1836 + 0x12 bytes	C++
wxmsw290ud_core_vc_custom.dll!wxComboCtrlBase::HandleButtonMouseEvent( 
wxMouseEvent& event={...}, int flags=3)  Line 1523 + 0x12 bytes	C++
 	wxmsw290ud_core_vc_custom.dll!wxComboCtrl::OnMouseEvent(wxMouseEvent &
event={...})  Line 706 + 0x10 bytes	C++

attaching example program

Attachments

combo.cpp download (2.4 KB) - added by Trigve 5 years ago.

Change History

Changed 5 years ago by Trigve

follow-up: ↓ 2   Changed 5 years ago by jmsalli

Sorry, I still can't reproduce this, even with your sample. Can anyone else try this?

Also, what sort of Windows system are you running on? FWIW, I have Windows XP SP3.

in reply to: ↑ 1   Changed 5 years ago by Trigve

Replying to jmsalli:


Sorry, I still can't reproduce this, even with your sample. Can anyone else try this?

Also, what sort of Windows system are you running on? FWIW, I have Windows XP SP3.

I'm using Windows Vista.

I had the same problem with wxComboCtrl default implementation of popup-arrow click, but there I've overridden "OnButtonClick" method:

void ComboBoxOwner::OnButtonClick()
{
    // Close popup if shown
    if(IsPopupWindowState(Visible))
	GetPopupControl()->Dismiss();
    // Show popup window
    else
	ShowPopup();
}

HTH

Trigve

  Changed 8 months ago by catalin

There's nothing wrong here [any more].
Tried on Win7 in the widgets sample, combo sample and a modified minimal sample with the code in the OP's file. No assert for wxOwnerDrawnComboBox or wxComboCtrl.

  Changed 8 months ago by vadz

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

Thanks for testing!

Note: See TracTickets for help on using tickets.