Обсуждение: pgadmin3-1.6.1 - Bus Error (core dumped)

Поиск
Список
Период
Сортировка

pgadmin3-1.6.1 - Bus Error (core dumped)

От
Dhanaraj M
Дата:
Hi Dave

I tested (pgadmin3-1.6.1 and wxWidgets-2.8.0-rc1) in Solaris.

The following are my observations:

1. Solaris -NV (not yet released) - works without any problem
2. Soalris -10  -  Bus Error (core dumped) core dumped when closing the
query tool
                          ( step - exceuting query, close query tool
                                      or
                                    - open, close query tool)

When compiled using GCC/Sun Studio compilers, I see the same bug. I
attach the stack trace here.
Do you have any idea?

Thanks
Dhanaraj


bash-3.00$ pstack core
core 'core' of 4632:    pgadmin3
-----------------  lwp# 1 / thread# 1  --------------------
 0022fce8 __1cTdlgSelectConnectionCGo6MpnGpgConn_pnOctlComboBoxFix__i_
(ffbfdba8, 14d5fe8, 119fce0, 14c7380, ffbfdb1c, ffbfdb20) + 100
 002b120c __1cIfrmQdDuerySOnChangeConnection6MrnOwxCommandEvent__v_
(1242230, ffbfdf90, ffbfddf8, ffbfdf90, 0, ffbfdba8) + 60
 007795f0 ???????? (0, 1242230, ffbfdf90, 14fecc0, 7f, 15eb740)
 00778b98 ???????? (0, ffbfdf90, 1242230, 14fecc0, 4f, b4)
 00779758 ???????? (1242230, ffbfdf90, ffbfdf90, ffbfe258, 1568020, c91198)
 0068ba2c ???????? (7fffffff, ffbfdf90, 7fffffff, 68b9c8, b9276c, c91198)
 005e938c ???????? (1586710, 1586838, ffbfdf90, ffbfe258, 1568020, 0)
 fed8dcd8 g_closure_invoke (ffbfe258, ffbfe0ec, 1, 10000, 0, 1568020) + 174
 feda59f4 signal_emit_unlocked_R (0, fedceaf8, fecbee34, fecbee20,
fedceae4, c86e38) + 109c
 feda442c g_signal_emit_valist (1586710, 156cd08, c86e38, ffbfe48c,
fedceaf8, fecbee2c) + 7f8
 feda48d8 g_signal_emit_by_name (1586710, ff223a84, fecbec00, 0,
15c5550, fedceaf8) + 190
 fed8dcd8 g_closure_invoke (ffbfe6d0, ffbfe564, 2, 10000, 0, 1568000) + 174
 feda54c8 signal_emit_unlocked_R (c577e4, fedceaf8, fecbee34, fecbee20,
fedceae4, c81c48) + b70
 feda442c g_signal_emit_valist (15866c8, 1102ac1, c81c48, ffbfe904,
fedceaf8, fecbee2c) + 7f8
 feda4738 g_signal_emit (15866c8, 88, 0, 1737418, f0594, ff026c14) + 1c
 ff0a6608 gtk_list_store_remove (15866c8, ffbfe970, 1737418, 1b800c,
5eaac8, ff25e53c) + e0
 ff026c14 gtk_combo_box_remove_text (1586710, 0, 15866c8, 237a68,
2afb30, 1586760) + 148
 005eaac8 ???????? (1586838, 0, ffffffff, ffffffff, c43934, 1586710)
 002afb30 __1cIfrmQdDuery2T6M_v_ (1242230, 1586838, 3, 1242464, 0, 3) + 334
 002ba180 __SLIP.DELETER__P (1242230, 1, ffbfec20, ffbfed50, 1242230,
1722a18) + 4
 0061f028 ???????? (bb1f60, c442f4, 1, c88988, 1722a18, c26384)
 0061f224 ???????? (c91198, ffbfed50, ffbfec20, ffbfed50, c42c00, 70b814)
 007795f0 ???????? (0, c91198, ffbfed50, c88988, 1f, d9c0f0)
 00778b98 ???????? (0, ffbfed50, c91198, c88988, 14a, 60)
 00779758 ???????? (c91198, ffbfed50, ffbfed50, 15ebee0, 0, c91198)
 0061f100 ???????? (c91198, c18800, 1000, ffbfed50, c44000, 0)
 00593934 ???????? (0, 593900, 0, fd6d2000, c3ff60, c91198)
 fec55ac8 g_main_dispatch (c912a8, c57400, 0, 0, fffffffd, ffffffef) + 19c
 fec56ffc g_main_context_dispatch (c912a8, 12c, 0, 1, c57400, c912a8) + 9c
 fec574c8 g_main_context_iterate (1, 1, 1, c912a8, c912b0, 2) + 454
 fec57c44 g_main_loop_run (d9a5a0, c57400, fd239ad4, c581b0, fecaa800,
fecaa800) + 348
 ff0aa424 gtk_main (0, 0, d9a5a0, cfb278, ff271eb0, 4ce0) + d0
 006d624c ???????? (0, b8f720, 0, c2b800, fd46a824, d9d940)
 0061ed6c ???????? (c91198, c1a400, c3c650, 1, 61ed18, c3c400)
 00741e2c ???????? (61eeb4, b8f720, 0, 0, 0, c42c00)
 0017a52c main     (1, ffbff1d4, ffbff1dc, b8e000, fd6d0740, fd6d0780) + c
 0017a340 _start   (0, 0, 0, 0, 0, 0) + 108
-----------------  lwp# 2 / thread# 2  --------------------
 00776944 ????????(), exit value = 0x00000000
        ** zombie (exited, not detached, not yet joined) **


Re: pgadmin3-1.6.1 - Bus Error (core dumped)

От
Dave Page
Дата:
Dhanaraj M wrote:
> Hi Dave
>
> I tested (pgadmin3-1.6.1 and wxWidgets-2.8.0-rc1) in Solaris.
>
> The following are my observations:
>
> 1. Solaris -NV (not yet released) - works without any problem
> 2. Soalris -10  -  Bus Error (core dumped) core dumped when closing the
> query tool
>                          ( step - exceuting query, close query tool
>                                      or
>                                    - open, close query tool)
>
> When compiled using GCC/Sun Studio compilers, I see the same bug. I
> attach the stack trace here.
> Do you have any idea?

Looks like it's crashing in roughly the same place as last time we spoke
- you were going to get me a stack trace from a debug enabled build then
which I never received. Can you do one now please?

Regards, Dave

Re: pgadmin3-1.6.1 - Bus Error (core dumped)

От
Dhanaraj M
Дата:
Hi Dave,

I found one more core dump.

I tested (pgadmin3-1.6.1 and wxWidgets-2.8.0-rc1/rc3) in Solaris-10 - x86.
For both Sun studio/GCC compilers,
File -> Add server.  core dumped
I attach the trace file.

 fed8c3a6 gtk_tree_model_get_valist (fec7f8d4, 9004408, 0) + 12d
 ffffffff ???????? (9004408, 0, 936c208, fe1d4c01, 9004408, 0)
 fe1d4bb0 g_cclosure_marshal_VOID__VOID ()


However, both the problem do not occur in Solaris-11. Any idea??
I am really sorry not sending trace file, because  debug enabled build
did not give any extra details.

Thanks
Dhanaraj


Dave Page wrote:

> Dhanaraj M wrote:
>
>> Hi Dave
>>
>> I tested (pgadmin3-1.6.1 and wxWidgets-2.8.0-rc1) in Solaris.
>>
>> The following are my observations:
>>
>> 1. Solaris -NV (not yet released) - works without any problem
>> 2. Soalris -10  -  Bus Error (core dumped) core dumped when closing
>> the query tool
>>                          ( step - exceuting query, close query tool
>>                                      or
>>                                    - open, close query tool)
>>
>> When compiled using GCC/Sun Studio compilers, I see the same bug. I
>> attach the stack trace here.
>> Do you have any idea?
>
>
> Looks like it's crashing in roughly the same place as last time we
> spoke - you were going to get me a stack trace from a debug enabled
> build then which I never received. Can you do one now please?
>
> Regards, Dave



Re: pgadmin3-1.6.1 - Bus Error (core dumped)

От
Dave Page
Дата:
Dhanaraj M wrote:
>
> Hi Dave,
>
> I found one more core dump.
>
> I tested (pgadmin3-1.6.1 and wxWidgets-2.8.0-rc1/rc3) in Solaris-10 - x86.
> For both Sun studio/GCC compilers,
> File -> Add server.  core dumped
> I attach the trace file.
>
> fed8c3a6 gtk_tree_model_get_valist (fec7f8d4, 9004408, 0) + 12d
> ffffffff ???????? (9004408, 0, 936c208, fe1d4c01, 9004408, 0)
> fe1d4bb0 g_cclosure_marshal_VOID__VOID ()
>
>
> However, both the problem do not occur in Solaris-11. Any idea??


No idea - though it does seem that it's probably something other than
pgAdmin at fault if it works fine on Solaris 11, but not 10. In this
case the crash is obviously in GTK. Unfortunately I've been unable to
get Solaris 10 to run in an even remotely stable way on VMWare to test with.

One possibility you might consider - when I first worked on getting 1.4
to build and run properly on Solaris, the wxWidgets guys seemed to think
that the same compiler should be used for GTK, wxWidgets and pgAdmin. Do
you know if this is the case, or could possibly be the cause of problems?

 > I am really sorry not sending trace file, because  debug enabled build
 > did not give any extra details.

Hmm, that's surprising. Oh well :-(. Can you get any more info by
examining the various variables in the nearest pgAdmin code on the stack
using GDB? Anything look like garbage?

Regards, Dave

Re: pgadmin3-1.6.1 - Bus Error (core dumped)

От
Dhanaraj M
Дата:
Hi Dave,

I tried to test the code in freshly installed S-10 sparc and x86.
" File -> Add server....  core dumped "  does not occur.

However, "Query tool -> close.. core dump" still exists.
During the crash,  I got some GTK messages in SPARC machine. (No clue
for x86)

(pgadmin3:2687): Gtk-CRITICAL **: file gtkwidget.c: line 5916: assertion
`GTK_IS_WIDGET (widget)' failed
(pgadmin3:2687): GLib-GObject-CRITICAL **: file gobject.c: line 1222:
assertion `G_IS_OBJECT (object)' failed
Bus Error (core dumped)

I am still trying to analyse this problem. I will try to check in S-10
update 3.
I attach the trace file here.. Any comments??

Thanks for you suggestions
Dhanaraj

bash-3.00$ pstack core
core 'core' of 2687:    pgadmin3
-----------------  lwp# 1 / thread# 1  --------------------
 00230b40 __1cTdlgSelectConnectionCGo6MpnGpgConn_pnOctlComboBoxFix__i_
(ffbfc678, 1711138, 11b6598, 16ea4b0, ffbfc5ec, ffbfc5f0) + 100
 002b228c __1cIfrmQdDuerySOnChangeConnection6MrnOwxCommandEvent__v_
(1787fe8, ffbfca60, ffbfc8c8, ffbfca60, 0, ffbfc678) + 60
 007878b0 ???????? (0, 1787fe8, ffbfca60, 17e8de8, 7f, 15dce00)
 00786e58 ???????? (0, ffbfca60, 1787fe8, 17e8de8, 4f, b8)
 00787a18 ???????? (1787fe8, ffbfca60, 15cadb8, 14e86c0, 4f, c95720)
 0068ec1c ???????? (7fffffff, ffbfca60, 7fffffff, 68ebb8, b96784, c95720)
 005ebbec ???????? (15cb270, 15cadb8, ffbfca60, ffbfcd28, 178ee30, 0)
 fed8dcd8 g_closure_invoke (ffbfcd28, ffbfcbbc, 1, 10000, 0, 178ee30) + 174
 feda59f4 signal_emit_unlocked_R (0, fedceaf8, fd7bed64, fd7bed50,
fedceae4, 11af5c0) + 109c
 feda442c g_signal_emit_valist (15cb270, 1794140, 11af5c0, ffbfcf5c,
fedceaf8, fd7bed5c) + 7f8
 feda48d8 g_signal_emit_by_name (15cb270, ff224654, fd7bec00, 0,
15ca540, fedceaf8) + 190
 fed8dcd8 g_closure_invoke (ffbfd1a0, ffbfd034, 2, 10000, 0, 178f270) + 174
 feda54c8 signal_emit_unlocked_R (c5bd44, fedceaf8, fd7bed64, fd7bed50,
fedceae4, 113efe8) + b70
 feda442c g_signal_emit_valist (15cb020, 112ead1, 113efe8, ffbfd3d4,
fedceaf8, fd7bed5c) + 7f8
 feda4738 g_signal_emit (15cb020, 88, 0, f36560, f05d0, ff0a67e8) + 1c
 ff0a68d8 gtk_list_store_remove (15cb020, ffbfd440, f36560, 1b8900,
ff0a5a74, ff25f100) + e0
 ff026c94 gtk_combo_box_remove_text (15cb270, 0, 15cb020, 2385ac,
b8e868, 15cb2c0) + 148
 005ed328 ???????? (15cadb8, 0, ffffffff, ffffffff, c47e94, 15cb270)
 002b0bb0 __1cIfrmQdDuery2T6M_v_ (1787fe8, 15cadb8, 3, 1788220, 0, 3) + 334
 002bb218 __SLIP.DELETER__P (1787fe8, 1, fcfecbc0, fcd42000, 1787fe8,
f3e038) + 4
 00621ba0 ???????? (bb60b0, c48e0c, 1, ffffffff, f3e038, c2a768)
 00621d9c ???????? (c95720, ffbfd820, ffbfd6f0, ffbfd820, c47000, 70ebb4)
 007878b0 ???????? (0, c95720, ffbfd820, c8cf00, 1f, d1c998)
 00786e58 ???????? (0, ffbfd820, c95720, c8cf00, 14a, 64)
 00787a18 ???????? (c95720, ffbfd820, ffbfd820, 1772018, 0, c95720)
 00621c78 ???????? (c95720, c1c800, 1000, ffbfd820, c48c00, 0)
 0059597c ???????? (0, 595948, 0, fcd42000, c444c4, c95720)
 fd755a40 g_main_dispatch (c95830, c5bc00, 0, 0, fffffffd, ffffffef) + 19c
 fd756f74 g_main_context_dispatch (c95830, 12c, 0, 1, c5bc00, c95830) + 9c
 fd757440 g_main_context_iterate (1, 1, 1, c95830, c95838, 2) + 454
 fd757650 g_main_context_iteration (0, c5bc00, 1, c95830, 0, fef020f4) + 94
 ff0aa994 gtk_main_iteration (0, 1b47a8, ff0aa9dc, a800, ff25f100, aaec)
+ 48
 00605cd8 ???????? (ffbfdb04, 11acea8, 253, 99, 253, 11e6bf0)
 002db1d0 __1cHfrmMainHdoPopup6MpnIwxWindow_nHwxPoint_pnIpgObject__v_
(605b48, 113ebd0, b98684, 1, 14e6a68, 11acea8) + 3ac
 002db414 __1cHfrmMainPOnSelRightClick6MrnLwxTreeEvent__v_ (1025d40,
1af, 125b310, 1bacdc, b98684, 113ebd0) + a0
 007878b0 ???????? (0, 1025d40, ffbfe1d4, 115bd48, 7f, 11561e8)
 00786e58 ???????? (0, ffbfe1d4, 1025d40, 115bd48, 50, 128)
 00787a18 ???????? (1025d40, ffbfe1d4, 1025f70, 115b940, 28, c95720)
 00787a50 ???????? (1025f70, ffbfe1d4, bb1678, 1147228, 50, c95720)
 0068ec1c ???????? (7fffffff, ffbfe1d4, 7fffffff, 68ebb8, b98684, c95720)
 00787a50 ???????? (112ea70, ffbfe1d4, b98684, 0, c47e94, c95720)
 006bcc80 ???????? (112ea70, ffbfe1d4, 1af, 27fa, ffbfe1cc, c1c400)
 006ce548 ???????? (2764, ffbfe728, 113ebd0, 6be06c, 125b310, 113ed48)
 007878b0 ???????? (0, 113ebd0, ffbfe728, 1147228, 7f, 1143e90)
 00786e58 ???????? (0, ffbfe728, 113ebd0, 1147228, 4f, dc)
 00787a18 ???????? (113ebd0, ffbfe728, 112ea70, c95498, 145, c95720)
 00787a50 ???????? (112ea70, ffbfe728, b98684, 1af, c4f800, c95720)
 006bcc80 ???????? (112ea70, ffbfe728, ffbfe750, 2768, 6bcc68, c1c400)
 005baca4 ???????? (d9cdd4, b98684, 113ebd0, 1bad80, 14, ffbfe728)
 ff0add28 _gtk_marshal_BOOLEAN__BOXED (ffbfe900, 1b14c4, 113e860,
ffbfea58, ffbfe8ec, 5ba980) + f8
 fed8dcd8 g_closure_invoke (ffbfea58, ffbfe8ec, 2, 10000, 0, 113e860) + 174
 feda54c8 signal_emit_unlocked_R (fed9b034, fedceaf8, fd7bed64,
fd7bed50, fedceae4, c9d290) + b70
 feda4484 g_signal_emit_valist (d9cdd4, 0, c9d290, ffbfec8c, fedceaf8,
fedb8d20) + 850
 feda4738 g_signal_emit (d9cdd4, 1b, 0, e0eb28, ffbfec9c, fffffec8) + 1c
 ff1b3f3c gtk_widget_event_internal (d9cdd4, e0eb28, ff1b3ce8, 15c, 14,
9c00) + 1cc
 ff0ac278 gtk_propagate_event (d9cdd4, e0eb28, fcfb9500, 1b2fbc,
fd752054, ff25f100) + 13c
 ff0ab130 gtk_main_do_event (354, e0eb28, d9cdd4, ff0aadd8, 0, 14) + 2d0
 feec48e4 gdk_event_dispatch (cb03f8, cad988, 3a4ac, fd755718, e0eb28,
feefed14) + 8c
 fd755a40 g_main_dispatch (c95830, c5bc00, 0, 0, fffffffd, ffffffef) + 19c
 fd756f74 g_main_context_dispatch (c95830, 1, c824c8, 1, c5bc00, c95830)
+ 9c
 fd757440 g_main_context_iterate (1, 1, 1, c95830, c95838, 2) + 454
 fd757bbc g_main_loop_run (d9ff98, c5bc00, fcfb9500, c5c710, fd7aa800,
fd7aa800) + 348
 ff0aa6f4 gtk_main (0, 0, d9ff98, cff808, ff272a70, 4cdc) + d0
 006d95d4 ???????? (0, 1, 0, c2fc00, fd06a780, d9f938)
 006218e4 ???????? (c95720, c1e800, c40b7c, 1, 621890, c40800)
 00745214 ???????? (621a2c, b93720, c48c00, 1, c49000, c47000)
 0017b0b4 main     (1, ffbff1b4, ffbff1bc, b92000, fcd40740, fcd40780) + c
 0017aec8 _start   (0, 0, 0, 0, 0, 0) + 108
-----------------  lwp# 2 / thread# 2  --------------------
 00784c04 ????????(), exit value = 0x00000000
        ** zombie (exited, not detached, not yet joined) **




Dave Page wrote:
> Dhanaraj M wrote:
>>
>> Hi Dave,
>>
>> I found one more core dump.
>>
>> I tested (pgadmin3-1.6.1 and wxWidgets-2.8.0-rc1/rc3) in Solaris-10 -
>> x86.
>> For both Sun studio/GCC compilers,
>> File -> Add server.  core dumped
>> I attach the trace file.
>>
>> fed8c3a6 gtk_tree_model_get_valist (fec7f8d4, 9004408, 0) + 12d
>> ffffffff ???????? (9004408, 0, 936c208, fe1d4c01, 9004408, 0)
>> fe1d4bb0 g_cclosure_marshal_VOID__VOID ()
>>
>>
>> However, both the problem do not occur in Solaris-11. Any idea??
>
>
> No idea - though it does seem that it's probably something other than
> pgAdmin at fault if it works fine on Solaris 11, but not 10. In this
> case the crash is obviously in GTK. Unfortunately I've been unable to
> get Solaris 10 to run in an even remotely stable way on VMWare to test
> with.
>
> One possibility you might consider - when I first worked on getting
> 1.4 to build and run properly on Solaris, the wxWidgets guys seemed to
> think that the same compiler should be used for GTK, wxWidgets and
> pgAdmin. Do you know if this is the case, or could possibly be the
> cause of problems?
>
> > I am really sorry not sending trace file, because  debug enabled build
> > did not give any extra details.
>
> Hmm, that's surprising. Oh well :-(. Can you get any more info by
> examining the various variables in the nearest pgAdmin code on the
> stack using GDB? Anything look like garbage?
>
> Regards, Dave
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org


Re: pgadmin3-1.6.1 - Bus Error (core dumped)

От
Dave Page
Дата:
Dhanaraj M wrote:
> Hi Dave,
>
> I tried to test the code in freshly installed S-10 sparc and x86.
> " File -> Add server....  core dumped "  does not occur.
>
> However, "Query tool -> close.. core dump" still exists.
> During the crash,  I got some GTK messages in SPARC machine. (No clue
> for x86)
>
> (pgadmin3:2687): Gtk-CRITICAL **: file gtkwidget.c: line 5916: assertion
> `GTK_IS_WIDGET (widget)' failed
> (pgadmin3:2687): GLib-GObject-CRITICAL **: file gobject.c: line 1222:
> assertion `G_IS_OBJECT (object)' failed
> Bus Error (core dumped)
>
> I am still trying to analyse this problem. I will try to check in S-10
> update 3.
> I attach the trace file here.. Any comments??
>

Well, again the trace appears to show that frmQuery::OnChangeConnection
is in the stack - have you even touched the select connection combo box?

One thing you might try is changing your GTK theme. We have had odd
reports on some Linuxes that using certain themes will result in GTK
errors on the console and sometimes a crash.

Regards, Dave.

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dhanaraj M
Дата:
> Well, again the trace appears to show that
> frmQuery::OnChangeConnection is in the stack - have you even touched
> the select connection combo box?
>
> One thing you might try is changing your GTK theme. We have had odd
> reports on some Linuxes that using certain themes will result in GTK
> errors on the console and sometimes a crash.
>

Hi Dave

I got the work around for the crash.
I am trying to fix this problem.
I think the problem is not with pgAdmin.

This is the flow of the control during the crash..

After opening the query tool...
src/base/pgConnBase.cpp:
    pgConnBase::pgConnBase(
    pgSetBase *pgConnBase::ExecuteSet
src/frm/frmQuery.cpp
    void frmQuery::OnChangeConnection(


After closing the query tool...
src/base/pgConnBase.cpp
    void pgConnBase::Close()
src/frm/frmQuery.cpp
    void frmQuery::OnChangeConnection(
(IS IT THE RIGHT CALL??????)

This is not the final solution, because after closing this query tool
Add server wnd is opened. But no crash!!
I will have to do more tests and get back to you..
Any comments??

Work around
===========

int dlgSelectConnection::Go(pgConn *conn, ctlComboBoxFix *cb)
{
    cbConnection=cb;

        if (mainForm != NULL)
        {
                treeObjectIterator servers(mainForm->GetBrowser(),
mainForm->GetServerCollection());^M
                pgServer *s;^M

                while ((s=(pgServer*)servers.GetNextObject()) != 0)^M
                {

                        cbServer->Append(s->GetIdentifier(), (void*)s);

+                        if(s->GetConnected())
+                           { continue;}

                if (s->GetConnected() && s->GetConnection()->GetHost()
== conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M
                        {

cbServer->SetSelection(cbServer->GetCount()-1);^M
                                 remoteServer = s;^M
                        }^M
                }    ^M
                cbServer->SetFocus();^M
        }^






Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dhanaraj M
Дата:
Sorry for the wrong work around.
But it crahes in this step...
     if (s->GetConnected() && s->GetConnection()->GetHost() ==
conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M

I think 'conn' is destroyed already... or some other problem.

Any idea??

thanks
dhanaraj

Dhanaraj M wrote:

>
>> Well, again the trace appears to show that
>> frmQuery::OnChangeConnection is in the stack - have you even touched
>> the select connection combo box?
>>
>> One thing you might try is changing your GTK theme. We have had odd
>> reports on some Linuxes that using certain themes will result in GTK
>> errors on the console and sometimes a crash.
>>
>
> Hi Dave
>
> I got the work around for the crash.
> I am trying to fix this problem.
> I think the problem is not with pgAdmin.
>
> This is the flow of the control during the crash..
>
> After opening the query tool...
> src/base/pgConnBase.cpp:
>    pgConnBase::pgConnBase(
>    pgSetBase *pgConnBase::ExecuteSet
> src/frm/frmQuery.cpp
>    void frmQuery::OnChangeConnection(
>
>
> After closing the query tool...
> src/base/pgConnBase.cpp
>    void pgConnBase::Close()
> src/frm/frmQuery.cpp
>    void frmQuery::OnChangeConnection(
> (IS IT THE RIGHT CALL??????)
>
> This is not the final solution, because after closing this query tool
> Add server wnd is opened. But no crash!!
> I will have to do more tests and get back to you..
> Any comments??
>
> Work around
> ===========
>
> int dlgSelectConnection::Go(pgConn *conn, ctlComboBoxFix *cb)
> {
>    cbConnection=cb;
>
>        if (mainForm != NULL)
>        {
>                treeObjectIterator servers(mainForm->GetBrowser(),
> mainForm->GetServerCollection());^M
>                pgServer *s;^M
>
>                while ((s=(pgServer*)servers.GetNextObject()) != 0)^M
>                {
>
>                        cbServer->Append(s->GetIdentifier(), (void*)s);
>
> +                        if(s->GetConnected())
> +                           { continue;}
>
>                if (s->GetConnected() && s->GetConnection()->GetHost()
> == conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M
>                        {
>
> cbServer->SetSelection(cbServer->GetCount()-1);^M
>                                 remoteServer = s;^M
>                        }^M
>                }    ^M
>                cbServer->SetFocus();^M
>        }^
>
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match



Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Dhanaraj M wrote:
> Sorry for the wrong work around.
> But it crahes in this step...
>     if (s->GetConnected() && s->GetConnection()->GetHost() ==
> conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M
>                      I think 'conn' is destroyed already... or some
> other problem.
>
> Any idea??

Sorry - just building wx now....

Try testing conn at the beginning of the if statement:

if (conn && s->GetConnected() && s->GetConnection()->GetHost() ==

I'm still not sure how you're getting into that code when you close the
form though...

Regards, Dave.

Re: pgadmin3-1.6.1 - core dumped - Fixed

От
Dhanaraj M
Дата:
Hi Dave

I dont know whether the problem is with pgAdmin or not.
But I have a fix for this.

File name:-  src/frm/frmQuery.cpp

 void frmQuery::OnChangeConnection(wxCommandEvent &ev)
 {
     unsigned int sel=cbConnection->GetCurrentSelection();

+  if(!IsVisible())
+       return;

     if (sel == cbConnection->GetCount()-1)
     {
         // new Connection
         dlgSelectConnection dlg(this, mainForm);
         int rc=dlg.Go(conn, cbConnection);
----------------------------------------------------------------------------
After closing the query tool, this event is called.
So I am checking whether the window is destroyed already or not.
Is it the right fix?
I am testing in different machines(sparc/x-86) and report you soon.
Please comment on this?

Thanks
Dhanaraj




Dave Page wrote:

> Dhanaraj M wrote:
>
>> Sorry for the wrong work around.
>> But it crahes in this step...
>>     if (s->GetConnected() && s->GetConnection()->GetHost() ==
>> conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M
>>                      I think 'conn' is destroyed already... or some
>> other problem.
>>
>> Any idea??
>
>
> Sorry - just building wx now....
>
> Try testing conn at the beginning of the if statement:
>
> if (conn && s->GetConnected() && s->GetConnection()->GetHost() ==
>
> I'm still not sure how you're getting into that code when you close
> the form though...
>
> Regards, Dave.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org



Re: pgadmin3-1.6.1 - core dumped - Fixed

От
Dhanaraj M
Дата:
Hi Dave

I tested in sparc/x-86 and this fix works well.
However, I like to know whether there will be regressions due to this fix.
Can you please review my fix?

Thanks
Dhanaraj

Dhanaraj M wrote:
> Hi Dave
>
> I dont know whether the problem is with pgAdmin or not.
> But I have a fix for this.
>
> File name:-  src/frm/frmQuery.cpp
>
> void frmQuery::OnChangeConnection(wxCommandEvent &ev)
> {
>     unsigned int sel=cbConnection->GetCurrentSelection();
>
> +  if(!IsVisible())
> +       return;
>
>     if (sel == cbConnection->GetCount()-1)
>     {
>         // new Connection
>         dlgSelectConnection dlg(this, mainForm);
>         int rc=dlg.Go(conn, cbConnection);
> ----------------------------------------------------------------------------
>
> After closing the query tool, this event is called.
> So I am checking whether the window is destroyed already or not.
> Is it the right fix?
> I am testing in different machines(sparc/x-86) and report you soon.
> Please comment on this?
>
> Thanks
> Dhanaraj
>
>
>
>
> Dave Page wrote:
>
>> Dhanaraj M wrote:
>>
>>> Sorry for the wrong work around.
>>> But it crahes in this step...
>>>     if (s->GetConnected() && s->GetConnection()->GetHost() ==
>>> conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M
>>>                      I think 'conn' is destroyed already... or some
>>> other problem.
>>>
>>> Any idea??
>>
>>
>> Sorry - just building wx now....
>>
>> Try testing conn at the beginning of the if statement:
>>
>> if (conn && s->GetConnected() && s->GetConnection()->GetHost() ==
>>
>> I'm still not sure how you're getting into that code when you close
>> the form though...
>>
>> Regards, Dave.
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 4: Have you searched our list archives?
>>
>>               http://archives.postgresql.org
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


Re: pgadmin3-1.6.1 - core dumped - Work around

От
Zdenek Kotala
Дата:
Dave Page wrote:

>
> I'm still not sure how you're getting into that code when you close the
> form though...

I have received following error when a wnat to "add server":


(pgadmin3:27830): Gtk-CRITICAL **: file gtkliststore.c: line 570:
assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed

(pgadmin3:27830): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is
invalid

(pgadmin3:27830): GLib-GObject-WARNING **: can't peek value table for
type `<invalid>' which is not currently referenced
Segmentation Fault (core dumped)

and backtrace is following:

libgtk-x11-2.0.so.0.400.9`gtk_tree_model_get_valist+0x144(19eb8e8,
ffbfde44, ffbfde2c, 8800, f0c40, 38)
libgtk-x11-2.0.so.0.400.9`gtk_tree_model_get+0xd8(19eb8e8, ffbfde44,
8800, f0d1c, fd1257a4, fd2de53c)
libgtk-x11-2.0.so.0.400.9`gtk_combo_box_entry_active_changed+0x98(18dbfc0,
1bd0, 2372e8, fbb75f48, fd2de53c, 1800)
libgobject-2.0.so.0.400.1`g_closure_invoke+0x174(ffbfe0e8, ffbfdf7c, 1,
10000, 0, 18d4640)
libgobject-2.0.so.0.400.1`signal_emit_unlocked_R+0xb70(fbb6b034,
fbb9eaf8, fbabee34, fbabee20, fbb9eae4, 18d4f60)
libgobject-2.0.so.0.400.1`g_signal_emit_valist+0x7f8(18dbfc0, 18d6ad8,
18d4f60, ffbfe31c, fbb9eaf8, fbabee2c)
libgobject-2.0.so.0.400.1`g_signal_emit_by_name+0x190(18dbfc0, fd2a3a84,
fbabec00, 0, 1a624e0, fbb9eaf8)
libwx_gtk2ud_core-2.8.so.0.0.0`void
wxComboBox::SetSelection+0xd8(18d4bc0, 0, 1, ffbfe414, 0, 0)
dlgServer::dlgServer #Nvariant 1+0x550(ffbfe568, 12d89ec, 16a9ea0, 0,
182c0f0, fe062370)
wxWindow*addServerFactory::StartDialog+0x54(182a3d0, 16a9ea0, 0, 8602bc,
182a3d0, 16a9ea0)

....

If I compare it with Dhanaraj problem there are some similar things. In
both cases some combobox widget is present and some signal occurs. I
guess that there should be some race condition or some unforgotten
combobox which receives signals, but it has pointer to non existing memory.

        Zdenek

Re: pgadmin3-1.6.1 - core dumped - Fixed

От
Dave Page
Дата:
Dhanaraj M wrote:
> Hi Dave
>
> I dont know whether the problem is with pgAdmin or not.
> But I have a fix for this.
>
> File name:-  src/frm/frmQuery.cpp
>
> void frmQuery::OnChangeConnection(wxCommandEvent &ev)
> {
>     unsigned int sel=cbConnection->GetCurrentSelection();
>
> +  if(!IsVisible())
> +       return;
>
>     if (sel == cbConnection->GetCount()-1)
>     {
>         // new Connection
>         dlgSelectConnection dlg(this, mainForm);
>         int rc=dlg.Go(conn, cbConnection);
> ----------------------------------------------------------------------------
>
> After closing the query tool, this event is called.
> So I am checking whether the window is destroyed already or not.
> Is it the right fix?
> I am testing in different machines(sparc/x-86) and report you soon.
> Please comment on this?

Dhanaraj (and Zdenek). Apologies for not being too responsive over the
last few days - as you may have heard, I'm changing job soon so not only
do I have the fun of handing all my work over to colleagues here, but
I've also been spending time moving some of the PostgreSQL and pgAdmin
project infrastructure to a new datacenter before I lose access to this one.

Anyhoo, I agree that this seems a safe fix for the problem your are
seeing Dhanaraj and have committed it to the 1.6 branch and trunk - thanks.

What still doesn't make sense is why that function is getting called at
all at that point. I can only imagine that wxWidgets is erroneously
firing it when the wxCombo is destroyed.

Regards, Dave

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Zdenek,

Does this occur when you click the Add Server option, or when you hit OK
having filled in the dialog?

Thanks, Dave (waiting for his Solaris build to complete...)

Zdenek Kotala wrote:
> Dave Page wrote:
>
>>
>> I'm still not sure how you're getting into that code when you close
>> the form though...
>
> I have received following error when a wnat to "add server":
>
>
> (pgadmin3:27830): Gtk-CRITICAL **: file gtkliststore.c: line 570:
> assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed
>
> (pgadmin3:27830): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is
> invalid
>
> (pgadmin3:27830): GLib-GObject-WARNING **: can't peek value table for
> type `<invalid>' which is not currently referenced
> Segmentation Fault (core dumped)
>
> and backtrace is following:
>
> libgtk-x11-2.0.so.0.400.9`gtk_tree_model_get_valist+0x144(19eb8e8,
> ffbfde44, ffbfde2c, 8800, f0c40, 38)
> libgtk-x11-2.0.so.0.400.9`gtk_tree_model_get+0xd8(19eb8e8, ffbfde44,
> 8800, f0d1c, fd1257a4, fd2de53c)
> libgtk-x11-2.0.so.0.400.9`gtk_combo_box_entry_active_changed+0x98(18dbfc0,
> 1bd0, 2372e8, fbb75f48, fd2de53c, 1800)
> libgobject-2.0.so.0.400.1`g_closure_invoke+0x174(ffbfe0e8, ffbfdf7c, 1,
> 10000, 0, 18d4640)
> libgobject-2.0.so.0.400.1`signal_emit_unlocked_R+0xb70(fbb6b034,
> fbb9eaf8, fbabee34, fbabee20, fbb9eae4, 18d4f60)
> libgobject-2.0.so.0.400.1`g_signal_emit_valist+0x7f8(18dbfc0, 18d6ad8,
> 18d4f60, ffbfe31c, fbb9eaf8, fbabee2c)
> libgobject-2.0.so.0.400.1`g_signal_emit_by_name+0x190(18dbfc0, fd2a3a84,
> fbabec00, 0, 1a624e0, fbb9eaf8)
> libwx_gtk2ud_core-2.8.so.0.0.0`void
> wxComboBox::SetSelection+0xd8(18d4bc0, 0, 1, ffbfe414, 0, 0)
> dlgServer::dlgServer #Nvariant 1+0x550(ffbfe568, 12d89ec, 16a9ea0, 0,
> 182c0f0, fe062370)
> wxWindow*addServerFactory::StartDialog+0x54(182a3d0, 16a9ea0, 0, 8602bc,
> 182a3d0, 16a9ea0)
>
> ....
>
> If I compare it with Dhanaraj problem there are some similar things. In
> both cases some combobox widget is present and some signal occurs. I
> guess that there should be some race condition or some unforgotten
> combobox which receives signals, but it has pointer to non existing memory.
>
>         Zdenek


Re: pgadmin3-1.6.1 - core dumped - Work around

От
Zdenek Kotala
Дата:
Dave Page wrote:
> Zdenek,
>
> Does this occur when you click the Add Server option, or when you hit OK
> having filled in the dialog?

When you click on add server option.

    Zdenek


Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Zdenek Kotala wrote:
> Dave Page wrote:
>> Zdenek,
>>
>> Does this occur when you click the Add Server option, or when you hit
>> OK having filled in the dialog?
>
> When you click on add server option.

Yeah I'm now getting that far :-). What I can't get though is any sense
out of the debugger. Any hints or tips? I'd really like to go back up
the stack and examine a few variables along the way.

Starting program: /usr/local/src/pgadmin3-1.6.1/src/pgadmin3
warning: Lowest section in /usr/lib/libpthread.so.1 is .dynamic at 00000074

** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81:
assertion `GTK_WIDGET (widget)' failed

** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81:
assertion `GTK_WIDGET (widget)' failed

(pgadmin3:6683): Gtk-CRITICAL **: file gtkliststore.c: line 570:
assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed

(pgadmin3:6683): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is
invalid

(pgadmin3:6683): GLib-GObject-WARNING **: can't peek value table for
type `<invalid>' which is not currently referenced

Program received signal SIGSEGV, Segmentation fault.
0xd137c3a6 in gtk_tree_model_get_valist () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0  0xd137c3a6 in gtk_tree_model_get_valist () from
/usr/lib/libgtk-x11-2.0.so.0
#1  0x00000000 in ?? ()
(gdb)



Regards Dave
Starting program: /usr/local/src/pgadmin3-1.6.1/src/pgadmin3
warning: Lowest section in /usr/lib/libpthread.so.1 is .dynamic at 00000074

** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81: assertion `GTK_WIDGET (widget)' failed

** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81: assertion `GTK_WIDGET (widget)' failed

(pgadmin3:6683): Gtk-CRITICAL **: file gtkliststore.c: line 570: assertion `GTK_LIST_STORE (tree_model)->stamp ==
iter->stamp'failed 

(pgadmin3:6683): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is invalid

(pgadmin3:6683): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently referenced

Program received signal SIGSEGV, Segmentation fault.
0xd137c3a6 in gtk_tree_model_get_valist () from /usr/lib/libgtk-x11-2.0.so.0
(gdb) bt
#0  0xd137c3a6 in gtk_tree_model_get_valist () from /usr/lib/libgtk-x11-2.0.so.0
#1  0x00000000 in ?? ()
(gdb)



Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dhanaraj
Дата:
I don't really know whether it is a problem of pgAdmin, because the same
code works in other platforms.
This might happen due to the hidden bug in the dependent packages (NOT
SURE).
Anyhow, I am going to see this problem and try to fix.

> Yeah I'm now getting that far :-). What I can't get though is any
> sense out of the debugger. Any hints or tips? I'd really like to go
> back up the stack and examine a few variables along the way.
>
> Starting program: /usr/local/src/pgadmin3-1.6.1/src/pgadmin3
> warning: Lowest section in /usr/lib/libpthread.so.1 is .dynamic at
> 00000074
>
> ** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81:
> assertion `GTK_WIDGET (widget)' failed
>
> ** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81:
> assertion `GTK_WIDGET (widget)' failed
>
> (pgadmin3:6683): Gtk-CRITICAL **: file gtkliststore.c: line 570:
> assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed
>
> (pgadmin3:6683): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is
> invalid
>
> (pgadmin3:6683): GLib-GObject-WARNING **: can't peek value table for
> type `<invalid>' which is not currently referenced
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xd137c3a6 in gtk_tree_model_get_valist () from
> /usr/lib/libgtk-x11-2.0.so.0
> (gdb) bt
> #0  0xd137c3a6 in gtk_tree_model_get_valist () from
> /usr/lib/libgtk-x11-2.0.so.0
> #1  0x00000000 in ?? ()
> (gdb)
>
>
>
> Regards Dave
> ------------------------------------------------------------------------
>
> Starting program: /usr/local/src/pgadmin3-1.6.1/src/pgadmin3
> warning: Lowest section in /usr/lib/libpthread.so.1 is .dynamic at 00000074
>
> ** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81: assertion `GTK_WIDGET (widget)' failed
>
> ** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81: assertion `GTK_WIDGET (widget)' failed
>
> (pgadmin3:6683): Gtk-CRITICAL **: file gtkliststore.c: line 570: assertion `GTK_LIST_STORE (tree_model)->stamp ==
iter->stamp'failed 
>
> (pgadmin3:6683): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is invalid
>
> (pgadmin3:6683): GLib-GObject-WARNING **: can't peek value table for type `<invalid>' which is not currently
referenced
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xd137c3a6 in gtk_tree_model_get_valist () from /usr/lib/libgtk-x11-2.0.so.0
> (gdb) bt
> #0  0xd137c3a6 in gtk_tree_model_get_valist () from /usr/lib/libgtk-x11-2.0.so.0
> #1  0x00000000 in ?? ()
> (gdb)
>
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>


Re: pgadmin3-1.6.1 - core dumped - Work around

От
Zdenek Kotala
Дата:
Dave Page wrote:
> Zdenek Kotala wrote:
>> Dave Page wrote:
>>> Zdenek,
>>>
>>> Does this occur when you click the Add Server option, or when you hit
>>> OK having filled in the dialog?
>>
>> When you click on add server option.
>
> Yeah I'm now getting that far :-). What I can't get though is any sense
> out of the debugger. Any hints or tips? I'd really like to go back up
> the stack and examine a few variables along the way.
>
> Starting program: /usr/local/src/pgadmin3-1.6.1/src/pgadmin3
> warning: Lowest section in /usr/lib/libpthread.so.1 is .dynamic at 00000074
>
> ** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81:
> assertion `GTK_WIDGET (widget)' failed
>
> ** (pgadmin3:6683): CRITICAL **: file blueprint-draw.c: line 81:
> assertion `GTK_WIDGET (widget)' failed
>
> (pgadmin3:6683): Gtk-CRITICAL **: file gtkliststore.c: line 570:
> assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed
>
> (pgadmin3:6683): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is
> invalid
>
> (pgadmin3:6683): GLib-GObject-WARNING **: can't peek value table for
> type `<invalid>' which is not currently referenced
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xd137c3a6 in gtk_tree_model_get_valist () from
> /usr/lib/libgtk-x11-2.0.so.0
> (gdb) bt
> #0  0xd137c3a6 in gtk_tree_model_get_valist () from
> /usr/lib/libgtk-x11-2.0.so.0
> #1  0x00000000 in ?? ()
> (gdb)
>

Problem is with cbSSL. This combo box is empty and constructor of
dlgServer try to setup selection on last used value - zero for first
time -, but there is no content of list. Newer version of gtk probably
are able to handle this situation but version used by s10 tries to touch
into empty list.

My question is why this dialog is not filed into the constructor like
cbDatabase?

        Zdenek

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Zdenek Kotala wrote:

> Problem is with cbSSL. This combo box is empty and constructor of
> dlgServer try to setup selection on last used value - zero for first
> time -, but there is no content of list. Newer version of gtk probably
> are able to handle this situation but version used by s10 tries to touch
> into empty list.

Yeah, I found that right before I left the office - just logged in again
to work-up a fix.

> My question is why this dialog is not filed into the constructor like
> cbDatabase?

I guess you mean the combo, not dialog. short answer, I'm not sure.
That's not so much the problem though - it seems that trying to select
any list item when there aren't any is causing a crash. Having commented
out cbSSL.SetSelection(), I just find it crashes in the same way in
another dialogue.

I'm just working up what I hope will be a viable fix to the control
itself. I'll forward a patch once I'm happy.

Thanks, Dave.


Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Dave Page wrote:
> Zdenek Kotala wrote:
>
>> Problem is with cbSSL. This combo box is empty and constructor of
>> dlgServer try to setup selection on last used value - zero for first
>> time -, but there is no content of list. Newer version of gtk probably
>> are able to handle this situation but version used by s10 tries to
>> touch into empty list.
>
> Yeah, I found that right before I left the office - just logged in again
> to work-up a fix.
>
>> My question is why this dialog is not filed into the constructor like
>> cbDatabase?
>
> I guess you mean the combo, not dialog. short answer, I'm not sure.
> That's not so much the problem though - it seems that trying to select
> any list item when there aren't any is causing a crash. Having commented
> out cbSSL.SetSelection(), I just find it crashes in the same way in
> another dialogue.
>
> I'm just working up what I hope will be a viable fix to the control
> itself. I'll forward a patch once I'm happy.

Which isn't going to be tonight I'm afraid - I'm falling asleep on my
laptop here :-(. More tomorrrow....

Regards, Dave.

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Zdenek Kotala
Дата:
Dave Page wrote:
> Dhanaraj M wrote:
>> Sorry for the wrong work around.
>> But it crahes in this step...
>>     if (s->GetConnected() && s->GetConnection()->GetHost() ==
>> conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M
>>                      I think 'conn' is destroyed already... or some
>> other problem.
>>
>> Any idea??
>
> Sorry - just building wx now....
>
> Try testing conn at the beginning of the if statement:
>
> if (conn && s->GetConnected() && s->GetConnection()->GetHost() ==
>
> I'm still not sure how you're getting into that code when you close the
> form though...

The root cause is destructor of frmQuery dialog. It removes all
connection from combo box exclude last item - "new connection". Each
deletion invoke frmQuery::OnChangeConnection event and the
OnChangeConnection method invokes "new connection dialog" in the last
step. And because there are some empty combo boxes on this dialog, gtk
generates core.

My suggestion is disable event generation for cbConnection in the
destructor.

    Zdenek

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Zdenek Kotala wrote:
>> I'm still not sure how you're getting into that code when you close
>> the form though...
>
> The root cause is destructor of frmQuery dialog. It removes all
> connection from combo box exclude last item - "new connection". Each
> deletion invoke frmQuery::OnChangeConnection event and the
> OnChangeConnection method invokes "new connection dialog" in the last
> step. And because there are some empty combo boxes on this dialog, gtk
> generates core.

Ah, of course - well spotted.

> My suggestion is disable event generation for cbConnection in the
> destructor.

Agreed. Can one or both of you test the attached patch please?

Thanks, Dave.
Index: frmQuery.cpp
===================================================================
--- frmQuery.cpp    (revision 5791)
+++ frmQuery.cpp    (working copy)
@@ -62,7 +62,6 @@
 BEGIN_EVENT_TABLE(frmQuery, pgFrame)
     EVT_ERASE_BACKGROUND(           frmQuery::OnEraseBackground)
     EVT_SIZE(                       frmQuery::OnSize)
-    EVT_COMBOBOX(CTRLID_CONNECTION, frmQuery::OnChangeConnection)
     EVT_CLOSE(                      frmQuery::OnClose)
     EVT_SET_FOCUS(                  frmQuery::OnSetFocus)
     EVT_MENU(MNU_NEW,               frmQuery::OnNew)
@@ -280,6 +279,7 @@
     outputPane->AddPage(msgResult, _("Messages"));
     outputPane->AddPage(msgHistory, _("History"));

+    this->Connect(CTRLID_CONNECTION, wxEVT_COMMAND_COMBOBOX_SELECTED,
wxCommandEventHandler(frmQuery::OnChangeConnection));
     sqlQuery->Connect(wxID_ANY, wxEVT_SET_FOCUS,wxFocusEventHandler(frmQuery::OnFocus));
     sqlResult->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
     msgResult->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
@@ -369,6 +369,7 @@
     sqlResult->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
     msgResult->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
     msgHistory->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
+    this->Disconnect(CTRLID_CONNECTION, wxEVT_COMMAND_COMBOBOX_SELECTED,
wxCommandEventHandler(frmQuery::OnChangeConnection));

     if (mainForm)
         mainForm->RemoveFrame(this);
@@ -632,10 +633,6 @@

 void frmQuery::OnChangeConnection(wxCommandEvent &ev)
 {
-    // On Solaris, this event seems to get fired when the form closes(!!)
-    if(!IsVisible())
-        return;
-
     unsigned int sel=cbConnection->GetCurrentSelection();
     if (sel == cbConnection->GetCount()-1)
     {

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dhanaraj M
Дата:
Hi Zdenek,

I tested this and still both problems exist (Add server and query tool
-core dump)
Can you test it once?

Dave Page wrote:

> Zdenek Kotala wrote:
>
>>> I'm still not sure how you're getting into that code when you close
>>> the form though...
>>
>>
>> The root cause is destructor of frmQuery dialog. It removes all
>> connection from combo box exclude last item - "new connection". Each
>> deletion invoke frmQuery::OnChangeConnection event and the
>> OnChangeConnection method invokes "new connection dialog" in the last
>> step. And because there are some empty combo boxes on this dialog,
>> gtk generates core.
>
>
> Ah, of course - well spotted.
>
>> My suggestion is disable event generation for cbConnection in the
>> destructor.
>
>
> Agreed. Can one or both of you test the attached patch please?
>
> Thanks, Dave.
>
>------------------------------------------------------------------------
>
>Index: frmQuery.cpp
>===================================================================
>--- frmQuery.cpp    (revision 5791)
>+++ frmQuery.cpp    (working copy)
>@@ -62,7 +62,6 @@
> BEGIN_EVENT_TABLE(frmQuery, pgFrame)
>     EVT_ERASE_BACKGROUND(           frmQuery::OnEraseBackground)
>     EVT_SIZE(                       frmQuery::OnSize)
>-    EVT_COMBOBOX(CTRLID_CONNECTION, frmQuery::OnChangeConnection)
>     EVT_CLOSE(                      frmQuery::OnClose)
>     EVT_SET_FOCUS(                  frmQuery::OnSetFocus)
>     EVT_MENU(MNU_NEW,               frmQuery::OnNew)
>@@ -280,6 +279,7 @@
>     outputPane->AddPage(msgResult, _("Messages"));
>     outputPane->AddPage(msgHistory, _("History"));
>
>+    this->Connect(CTRLID_CONNECTION, wxEVT_COMMAND_COMBOBOX_SELECTED,
wxCommandEventHandler(frmQuery::OnChangeConnection));
>     sqlQuery->Connect(wxID_ANY, wxEVT_SET_FOCUS,wxFocusEventHandler(frmQuery::OnFocus));
>     sqlResult->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
>     msgResult->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
>@@ -369,6 +369,7 @@
>     sqlResult->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
>     msgResult->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
>     msgHistory->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus));
>+    this->Disconnect(CTRLID_CONNECTION, wxEVT_COMMAND_COMBOBOX_SELECTED,
wxCommandEventHandler(frmQuery::OnChangeConnection));
>
>     if (mainForm)
>         mainForm->RemoveFrame(this);
>@@ -632,10 +633,6 @@
>
> void frmQuery::OnChangeConnection(wxCommandEvent &ev)
> {
>-    // On Solaris, this event seems to get fired when the form closes(!!)
>-    if(!IsVisible())
>-        return;
>-
>     unsigned int sel=cbConnection->GetCurrentSelection();
>     if (sel == cbConnection->GetCount()-1)
>     {
>
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>
>


Re: pgadmin3-1.6.1 - core dumped - Work around

От
Zdenek Kotala
Дата:
Dhanaraj M wrote:
>
> Hi Zdenek,
>
> I tested this and still both problems exist (Add server and query tool
> -core dump)
> Can you test it once?

This patch fixes only problem with invoking connection form when
frmQuery is closing. It does not fix problems with empty comboboxies.

This patch works for me. Do you have same backtrace?


        Zdenek


> Dave Page wrote:
>
>> Zdenek Kotala wrote:
>>
>>>> I'm still not sure how you're getting into that code when you close
>>>> the form though...
>>>
>>>
>>> The root cause is destructor of frmQuery dialog. It removes all
>>> connection from combo box exclude last item - "new connection". Each
>>> deletion invoke frmQuery::OnChangeConnection event and the
>>> OnChangeConnection method invokes "new connection dialog" in the last
>>> step. And because there are some empty combo boxes on this dialog,
>>> gtk generates core.
>>
>>
>> Ah, of course - well spotted.
>>
>>> My suggestion is disable event generation for cbConnection in the
>>> destructor.
>>
>>
>> Agreed. Can one or both of you test the attached patch please?
>>
>> Thanks, Dave.

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Zdenek Kotala wrote:
> Dhanaraj M wrote:
>>
>> Hi Zdenek,
>>
>> I tested this and still both problems exist (Add server and query tool
>> -core dump)
>> Can you test it once?
>
> This patch fixes only problem with invoking connection form when
> frmQuery is closing.

That's all it's supposed to fix - but I get the impression from
Dhanaraj's comment above that it doesn't work for him on frmQuery.

> It does not fix problems with empty comboboxies.

No, I'm still working on that. The fix I was thinking of last night
isn't working as I expected... investigating now.

Regards, Dave.

Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dhanaraj M
Дата:
Dave Page wrote:

> Dave Page wrote:
>
>> Zdenek Kotala wrote:
>>
>>> Problem is with cbSSL. This combo box is empty and constructor of
>>> dlgServer try to setup selection on last used value - zero for first
>>> time -, but there is no content of list. Newer version of gtk
>>> probably are able to handle this situation but version used by s10
>>> tries to touch into empty list.
>>
>>
>> Yeah, I found that right before I left the office - just logged in
>> again to work-up a fix.
>>
>>> My question is why this dialog is not filed into the constructor
>>> like cbDatabase?
>>
>>
>> I guess you mean the combo, not dialog. short answer, I'm not sure.
>> That's not so much the problem though - it seems that trying to
>> select any list item when there aren't any is causing a crash. Having
>> commented out cbSSL.SetSelection(), I just find it crashes in the
>> same way in another dialogue.
>
>
> I've committed a fix for this to trunk and the 1.6 branch - can you
> try it out please? It's a simple workaround which fixes the two
> instances of the problem I can find.
>
Sorry Dave.
I tested first by applying the patch to 1.6.1. After I downloaded from
the branch and tested.
Both core dumps are still unsolved.

I get the same trace this time too..



----------------------- Add server------------------------

(pgadmin3:18214): Gtk-CRITICAL **: file gtkliststore.c: line 570:
assertion `GTK_LIST_STORE (tree_model)->stamp == iter->stamp' failed

(pgadmin3:18214): GLib-GObject-WARNING **: gtype.c:3350: type id `0' is
invalid

(pgadmin3:18214): GLib-GObject-WARNING **: can't peek value table for
type `<invalid>' which is not currently referenced
Segmentation Fault (core dumped)
bash-3.00# pstack core
core 'core' of 18214:   pgadmin3
 fed8c3a6 gtk_tree_model_get_valist (fec7f8d4, 933ec90, 0) + 12d
 ffffffff ???????? (933ec90, 0, 933e6e8, fe1d4c01, 933ec90, 0)
 fe1d4bb0 g_cclosure_marshal_VOID__VOID ()

-------------------------Quert tool--------------

** (pgadmin3:18222): CRITICAL **: file blueprint-draw.c: line 81:
assertion `GTK_WIDGET (widget)' failed

** (pgadmin3:18222): CRITICAL **: file blueprint-draw.c: line 81:
assertion `GTK_WIDGET (widget)' failed
Segmentation Fault (core dumped)
bash-3.00# pstack core
core 'core' of 18222:   pgadmin3
 0824ded9 __1cTdlgSelectConnectionCGo6MpnGpgConn_pnOctlComboBoxFix__i_
(8046548, 8fdabb8, 9546e38) + d6
 082b5c1d __1cIfrmQdDuerySOnChangeConnection6MrnOwxCommandEvent__v_
(933d068, 80467f8, 8046768, 8686ff1, 8b87240, 933d068) + 144
 086291f2
__1cMwxAppConsoleLHandleEvent6kMpnMwxEvtHandler_m0B_MrnHwxEvent__v4_v_
(8b87240, 933d068, 82b5ad9, 0, 80467f8, 853cb91) + 12
 08686ff1
__1cMwxEvtHandlerVProcessEventIfMatches6FrknVwxEventTableEntryBase_p0rnHwxEvent__b_
(8aa5088, 933d068, 80467f8) + 60
 0868681b
__1cQwxEventHashTableLHandleEvent6MrnHwxEvent_pnMwxEvtHandler__b_
(8aa5490, 80467f8, 933d068) + 5a
 086870d9 __1cMwxEvtHandlerMProcessEvent6MrnHwxEvent__b_ (933d068,
80467f8) + 77
 085bfe45 __1cMwxWindowBaseJTryParent6MrnHwxEvent__b_ (9546e38, 80467f8)
+ 43
 0868710b __1cMwxEvtHandlerMProcessEvent6MrnHwxEvent__b_ (9546e38,
80467f8) + a9
 0853aedc gtkcombobox_changed_callback (9547c30, 9546e38, 8b7fd20) + 99
 fe1d4c01 g_cclosure_marshal_VOID__VOID () + 51



Re: pgadmin3-1.6.1 - core dumped - Work around

От
Dave Page
Дата:
Dhanaraj M wrote:
> Sorry Dave.
> I tested first by applying the patch to 1.6.1. After I downloaded from
> the branch and tested.
> Both core dumps are still unsolved.

*Both* crashes? The patch you supplied for one of them is in the 1.6
branch and trunk - are you sure you didn't test the wrong copy of the
tree? (I've done that myself after a long day before now!!).

Both bugs had gone in my Solaris x86 VM when testing in a dev tree. I'll
double check a clean build from each branch tomorrow/Monday.

Regards, Dave.

Re: pgadmin3-1.6.1 - The fix works

От
Dhanaraj M
Дата:
Sorry Dave.

I re-installed the same compiled files. Now it works.
Both crashes are fixed. Thanks a lot for spending time and fixing this.
(I might have tested the old binary or some cached file problem - I
don't know)

Anyway, I will test in other platforms and report the results soon.
I have 1.6.1 with me.
Can you send the minimal diff (patch to me)?
Will you release 1.6.2 soon?

Thanks once again
Dhanaraj



Dave Page wrote:

> Dhanaraj M wrote:
>
>> Sorry Dave.
>> I tested first by applying the patch to 1.6.1. After I downloaded
>> from the branch and tested.
>> Both core dumps are still unsolved.
>
>
> *Both* crashes? The patch you supplied for one of them is in the 1.6
> branch and trunk - are you sure you didn't test the wrong copy of the
> tree? (I've done that myself after a long day before now!!).
>
> Both bugs had gone in my Solaris x86 VM when testing in a dev tree.
> I'll double check a clean build from each branch tomorrow/Monday.
>
> Regards, Dave.



Re: pgadmin3-1.6.1 - The fix works

От
Dave Page
Дата:
Dhanaraj M wrote:
> Sorry Dave.
>
> I re-installed the same compiled files. Now it works.
> Both crashes are fixed. Thanks a lot for spending time and fixing this.
> (I might have tested the old binary or some cached file problem - I
> don't know)


Phew, that's a relief!!

> Anyway, I will test in other platforms and report the results soon.
> I have 1.6.1 with me.
> Can you send the minimal diff (patch to me)?

I don't have one I'm afraid. You should be able to coax on out of SVN
though - revisions 5798 and 5792 are the magic numbers for the 1.6 branch.

> Will you release 1.6.2 soon?

Possibly - though I'm a little unsure about what's happening over the
next couple of weeks yet (Christmas + new job etc).

Regards. Dave




wxWidgets/pgAdmin3 conforms to section 508 accessibility requirements?

От
Dhanaraj M
Дата:
Hi Dave

I like to know whether wxWidgets/pgAdmin3 conforms to section 508
accessibility requirements
for handicapped persons (blind, partialy sighted, limited use of hands,
etc.)

pgadmin3-1.6.1/xtra/wx-build/setup0-msw-2.8.h
 #define wxUSE_ACCESSIBILITY 0

Is this feature disabled in pgadmin3?
In case pgadmin3 supports this features, does it support in Solaris also?
(I read that Windows completely supports this feature, whereas *nix
partially supports.)
Is there any online documents that I can look at?

Thanks
Dhanaraj

Re: wxWidgets/pgAdmin3 conforms to section 508 accessibility requirements?

От
Dave Page
Дата:
Dhanaraj M wrote:
> Hi Dave
>
> I like to know whether wxWidgets/pgAdmin3 conforms to section 508
> accessibility requirements
> for handicapped persons (blind, partialy sighted, limited use of hands,
> etc.)

I have no idea what section 508 requirements are. Don't forget, I'm
based in the UK where the law is very different.

> pgadmin3-1.6.1/xtra/wx-build/setup0-msw-2.8.h
> #define wxUSE_ACCESSIBILITY 0
>
> Is this feature disabled in pgadmin3?

Looks like it. I didn't even know that such an option existed though.

> In case pgadmin3 supports this features, does it support in Solaris also?
> (I read that Windows completely supports this feature, whereas *nix
> partially supports.)
> Is there any online documents that I can look at?

A quick google shows http://www.wxwidgets.org/docs/access.htm. Perhaps
you could do some research and see what we may need to do to improve
pgAdmin? I'm afraid I'm unlikely to find time for this in the near future.

Regards, Dave.