Re: pgadmin3-1.6.1 - core dumped - Work around

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Dave Page <dpage(at)postgresql(dot)org>
Cc: Dhanaraj M <Dhanaraj(dot)M(at)Sun(dot)COM>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: pgadmin3-1.6.1 - core dumped - Work around
Date: 2006-12-14 20:49:22
Message-ID: 4581B8D2.5080508@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2006-12-15 10:13:30 Re: pgadmin3-1.6.1 - core dumped - Work around
Previous Message Dave Page 2006-12-14 20:21:25 Re: pgadmin3-1.6.1 - core dumped - Work around