Opened 5 years ago

Closed 19 months ago

#10158 closed defect (outdated)

wxOwnerDrawnComboBox assertion

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

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 (1)

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

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by Trigve

comment:1 follow-up: 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.

comment:2 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

comment:3 Changed 19 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.

comment:4 Changed 19 months ago by vadz

  • Resolution set to outdated
  • Status changed from new to closed

Thanks for testing!

Note: See TracTickets for help on using tickets.