Hi,
It seems that, wxWidget has added some checks in PopupMenu API. We can just
directly call DoPopupMenu instead. Find attached patch. Seems harmless to
directly call DoPopupMenu.
regards,
Prasad
Sent: Saturday, February 28, 2015 at 8:20 AM
From: "Richard PALO" <rich...@netbsd.org>
To: pgadmin-hackers@postgresql.org
Subject: [pgadmin-hackers] assert "!IsAttached()" failed in SetInvokingWindow()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
To continue the 1.20.0 discussion with wxWidgets 3.0, I can easily reproduce
the following anytime
(which I don't remember seeing with 2.8):
> ASSERT INFO:
> ./src/common/menucmn.cpp(715): assert "!IsAttached()" failed in
> SetInvokingWindow(): menus attached to menu bar can't have invoking window
>
> BACKTRACE:
> [1] ctlMenuButton::DoProcessLeftClick(wxMouseEvent&)
> [2] pluginButtonMenuFactory::StartDialog(frmMain*, pgObject*)
> [3] frmMain::OnAction(wxCommandEvent&)
> [4] main
> [5] _start
This happens after opening a connection to a server then clicking on the puzzle
pieces icon
(execute last used plugin).
Not saying it"s not an older issue, though.
- --
Richard PALO
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJU8XpDAAoJECAB22fHtp27nn0H/278f4GXy/Uwhs9pbqRS4F84
JE+7ItNOTgCZm3CJWhqtcgYS9NFgPtV6j4pKwhwilS738Gw23Z92//ykny+18oPY
ZTHk7UN1lrSNJ+2DLGL/NNyr0HmPcxD8V6MDcE/gcDx3umZwvVSZVjxvcI6FyCed
2DzFfjTksAr6INorz5k4hVQBEsjoGkFe084VA5GEkERWDiY6Aj6IqCtAtff/WcbI
mvDdt6JuEG9oDDShEaRcaCupIXBiAx5eQx6kwP3AkR91Zt7f+1j0IANcUqjn7v/8
t3rklufbW5/AAqLGO545T2plpOg3gwSqwarcmSyhrU1LY9W0j/slXnK8MhYZ05g=
=Y3EB
-----END PGP SIGNATURE-----
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers[http://www.postgresql.org/mailpref/pgadmin-hackers]
diff --git pgadmin/ctl/ctlMenuToolbar.cpp pgadmin/ctl/ctlMenuToolbar.cpp
index 8951aa4..d435178 100644
--- pgadmin/ctl/ctlMenuToolbar.cpp
+++ pgadmin/ctl/ctlMenuToolbar.cpp
@@ -2,7 +2,7 @@
//
// pgAdmin III - PostgreSQL Tools
//
-// Copyright (C) 2002 - 2014, The pgAdmin Development Team
+// Copyright (C) 2002 - 2015, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
// ctlMenuToolbar.cpp - Menu tool bar
@@ -79,7 +79,7 @@ void ctlMenuButton::Create(wxWindow *window, wxToolBar *toolBar, int ID, wxMenu
void ctlMenuButton::DoProcessLeftClick(wxMouseEvent &event)
{
- wxPoint menu_pos;
+ int x,y;
if(m_toolBar)
{
@@ -88,8 +88,8 @@ void ctlMenuButton::DoProcessLeftClick(wxMouseEvent &event)
// ** Assume that pulldown is to the right of a standard toolbar button,
// so, move the x position back one standard toolbar button's width
- menu_pos.x = - tool_size.GetWidth();
- menu_pos.y = button_size.GetHeight() / 2 + tool_size.GetHeight() / 2;
+ x = - tool_size.GetWidth();
+ y = button_size.GetHeight() / 2 + tool_size.GetHeight() / 2;
#ifdef __WXMAC__
wxSize tbar_size = m_toolBar->GetSize();
@@ -97,19 +97,18 @@ void ctlMenuButton::DoProcessLeftClick(wxMouseEvent &event)
int iToolSep = m_toolBar->GetToolSeparation();
if(iToolSep == 0) iToolSep = 5;
- menu_pos.x += - iToolSep;
- menu_pos.y = tbar_size.GetHeight() - button_pos.y / 2;
+ x += - iToolSep;
+ y = tbar_size.GetHeight() - button_pos.y / 2;
#endif
}
else
{
wxSize button_size;
button_size = GetSize();
- menu_pos.x = 0;
- menu_pos.y = button_size.GetHeight();
+ x = 0;
+ y = button_size.GetHeight();
}
-
- PopupMenu(m_menu, menu_pos);
+ DoPopupMenu(m_menu, x,y);
}
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers