Thread: Testing v1.7: Creating constraint => core dump

Testing v1.7: Creating constraint => core dump

From
Leszek Trenkner
Date:
Hi,

Using recent SVN head (6301M) I've encoutered annoying bug - regression -
that wasn't there a few days back.

When I try to create constraint in the gui - in any way possible (right-
clicking on browser tree node, from the main menu, in table ctration
dialog on constraints tab) - pgadmin just core dumps ("Segmentation fault
(core dumped)"). It seems like the very dialog window that allows one to
input constraint definition is the culprit - but it does mater which type
of the constraint I want to create (primary key and unique do not work)-
so it might be a common piece of code just before displaying that window
between the two.

Everything else seems to work fine, as far as dialog windows are
concerned.

I've tried to debug this issue more closely, bus as far as I've got is
getting debug version of pgAdmin3 build (Ubuntu Fiesty 7.04, Ubuntu
supplied wx-2.8.1-dbg libraries), which unfortunately dies ("core dumped")
just as release build would in any constraint creation attempt. BTW,
where is the dumped core expected to appear?

I've tried to attach debugger to pgadmin3, and if I try to create a
constraint pgadmin stops on line 105 in pgadmin/dlg/dlgIndex.cpp:
 105     txtFillFactor->SetValidator(numericValidator);
 106     if (connection->BackendMinimumVersion(8, 2))
 107         txtFillFactor->Enable();
 108     else
 109         txtFillFactor->Disable();
 110

So I guess it has something to do with table fill factor patches recently
added... Or just it was the point where everything died (ddd including :-
()

Note - right clicking browser tree node brings up assertion failed dialog
saying (guess it's the manu display code, as the menu doesn't show up):

ASSERT INFO:
../src/gtk/menu.cpp(984): assert "IsCheckable()" failed in IsChecked():
can't get state of uncheckable item!

BACKTRACE:
[1] wxMenuItem::IsChecked() cons)
[2] menuFactoryList::AppendEnabledMenus(wxMenuBar*, wxMenu*) /usr/src/
pgadmin3/pgadmin/./utils/factory.cpp:320
[3] frmMain::doPopup(wxWindow*, wxPoint, pgObject*) /usr/src/pgadmin3/
pgadmin/./frm/events.cpp:427
[4] frmMain::OnSelRightClick(wxTreeEvent&) /usr/src/pgadmin3/pgadmin/./
frm/events.cpp:510
[5] wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)
(wxEvent&), wxEvent&) cons)
[6] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[7] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[8] wxEvtHandler::ProcessEvent(wxEvent&)
[9] wxEvtHandler::ProcessEvent(wxEvent&)
[10] wxWindowBase::TryParent(wxEvent&)
[11] wxEvtHandler::ProcessEvent(wxEvent&)
[12] wxEvtHandler::ProcessEvent(wxEvent&)
[13] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[14] wxGenericTreeCtrl::OnMouse(wxMouseEvent&)
[15] wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)
(wxEvent&), wxEvent&) cons)
[16] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&,
wxEvtHandler*, wxEvent&)
[17] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[18] wxEvtHandler::ProcessEvent(wxEvent&)
[19] wxEvtHandler::ProcessEvent(wxEvent&)
[20] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[21] wxWindow::GTKProcessEvent(wxEvent&) cons)
[22] _gtk_marshal_BOOLEAN__BOXED()
[23] g_closure_invoke()
[24] g_signal_emit_valist()
[25] g_signal_emit()
[26] gtk_propagate_event()
[27] gtk_main_do_event()
[28] g_main_context_dispatch()
[29] g_main_loop_run()
[30] gtk_main()
[31] wxEventLoop::Run()
[32] wxAppBase::MainLoop()

It repeats a few times in a row.
It's the one of many alike 'assertion-failed' windows encountered when
using debug version -
which is in fact useless because of them. As I do know nothing about wx
libraries and very little about C++, I don't know if it's the expected
behaviour or some kind of silent bug... Or wxWindows fault.

--
Greetings,
Leszek Trenkner