Re: Testing v1.7: Creating constraint => core dump
От | Guillaume Lelarge |
---|---|
Тема | Re: Testing v1.7: Creating constraint => core dump |
Дата | |
Msg-id | 464AC437.90502@lelarge.info обсуждение исходный текст |
Ответ на | Testing v1.7: Creating constraint => core dump (Leszek Trenkner <olaf@post.pl>) |
Список | pgadmin-hackers |
Leszek Trenkner a écrit : > 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 > You're right about this. I didn't know constraint dialog used dlgIndex.cpp. You'll find a patch attached fixing this issue. Sorry about this, but thanks for your report. Regards. -- Guillaume. <!-- http://abs.traduc.org/ http://lfs.traduc.org/ http://docs.postgresqlfr.org/ --> Index: pgadmin/dlg/dlgIndex.cpp =================================================================== --- pgadmin/dlg/dlgIndex.cpp (révision 6301) +++ pgadmin/dlg/dlgIndex.cpp (copie de travail) @@ -102,11 +102,14 @@ // create mode } - txtFillFactor->SetValidator(numericValidator); - if (connection->BackendMinimumVersion(8, 2)) - txtFillFactor->Enable(); - else - txtFillFactor->Disable(); + if (txtFillFactor) + { + txtFillFactor->SetValidator(numericValidator); + if (connection->BackendMinimumVersion(8, 2)) + txtFillFactor->Enable(); + else + txtFillFactor->Disable(); + } btnAddCol->Disable(); btnRemoveCol->Disable();
В списке pgadmin-hackers по дате отправления: