Crash during displaying drop-down menu for server - Mailing list pgadmin-hackers

From Tomasz Rybak
Subject Crash during displaying drop-down menu for server
Date
Msg-id 1128622663.4631.12.camel@localhost.localdomain
Whole thread Raw
List pgadmin-hackers
I updated my sources to 4512, compiled and installed.
When I run pgAdmin, and try to right-click on server
in databases tree, pgAdmin crashes.

After little debugging I discovered, that problem is in
src/main/events.cpp, frmMain::doPopup.

pgAdmin crashes in line 466:
if (mil.Item(newItemPos)->GetData()->GetId() == newItem->GetId())

It's caused because newItem is NULL, and it isn't received in line 458
wxMenuItem *newItem=treeContextMenu->FindItem(newMenuFactory->GetId());
What's strange, wxASSERT from next line isn't even called (at least not
under GDB). I compiled using standard Debian setting, only added -ggdb
for compiler and removed dh_strip from pkg/debian/rules.

Message from GDB:
#0  0x0807a083 in frmMain::doPopup (this=0x87680f0, win=0x8d0c640,
point=
      {x = 145, y = 43}, object=0x8699340) at ./main/events.cpp:466
466             if (mil.Item(newItemPos)->GetData()->GetId() ==
newItem->GetId())

When I double-click on database in tree view (so pgAdmin is connected
to it) and after that I right-click on it's entry, pgAdmin doesn't
crash.

--
Tomasz Rybak <bogomips@post.pl>


pgadmin-hackers by date:

Previous
From: "Hiroshi Saito"
Date:
Subject: Re: frmRestore patch
Next
From: dung nguyen
Date:
Subject: MD5 (128 Bit) -->Tiger (192 bit) Error (with password lenght > 47 character)