Re: pgAdmin crashes on DDL - Mailing list pgadmin-support

From Dave Page
Subject Re: pgAdmin crashes on DDL
Date
Msg-id CA+OCxowbM9WfcE+=DF==8c7hw4RNMPPBYL-h95Sc6sLi5xUW8g@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin crashes on DDL  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
Responses Re: pgAdmin crashes on DDL
Re: pgAdmin crashes on DDL
List pgadmin-support
On Mon, May 20, 2013 at 11:24 AM, Akshay Joshi
<akshay.joshi@enterprisedb.com> wrote:
>
>
>
> On Fri, May 17, 2013 at 9:55 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> Hi
>>
>> On Fri, May 10, 2013 at 11:35 AM, aditsu <aditsu@yahoo.com> wrote:
>> > Ever since I started using pgAdmin (in 2006 or so) it has always crashed
>> > about once an hour of active usage. I finally decided to report this.
>> >
>> > Here's one way to reproduce the problem with the latest pgAdmin
>> > (1.16.1):
>> > - connect to a database, go to the public schema
>> > - right-click "Tables", choose "New Table"
>> > - use the GUI to create a table called "foo" with a single column called
>> > "bar", of type integer (ignore the no primary keys warning)
>> > - just to double-check, clicking "foo" in the tree now shows the create
>> > table statement which looks something like this:
>> >   -- Table: foo
>> >   -- DROP TABLE foo;
>> >   CREATE TABLE foo
>> >   (
>> >     bar integer
>> >   )
>> >   WITH (
>> >     OIDS=FALSE
>> >   );
>> >   ALTER TABLE foo
>> >     OWNER TO postgres;
>> > - right-click "foo" in the tree, choose "Scripts -> CREATE Script"
>> > - in the query window, uncomment "DROP TABLE foo;", change integer to
>> > serial, then run the query
>> > - close the query window, without saving changes
>> >
>> > At this point, pgAdmin instantly crashes with a segmentation fault.
>> >
>> > Some more information about my environment:
>> > - The operating system and version details -- Gentoo Linux
>> > - The version of pgAdmin you are running. -- pgadmin3-1.16.1-r1 (about
>> > window reports 1.16.1)
>> > - The configure options used (if compiled from source) -- for now I can
>> > provide the Gentoo USE flags: databasedesigner -debug
>> > - The wxWidgets version and configure options used (if compiled from
>> > source)
>> > -- I believe the answer is wxGTK-2.8.12.1, USE flags: X opengl sdl tiff
>> > -aqua -debug -doc -gnome -gstreamer -odbc -pch
>>
>> I finally managed to track this down I think. It only seems to go
>> wrong on Linux, only when browser refresh is set to "Refresh on
>> click", and only when an object can't be automatically refreshed
>> (usually because it's OID changed). What I believe happens is that on
>> GTK when the treeview node is removed, the parent node isn't
>> automatically selected, whereas on other platforms it is. Simple fix
>> seems to be to explicitly select the parent node before dropping the
>> original one.
>>
>> Akshay, can you please test and see if you agree the fix is appropriate?
>
>
>    I am not able to reproduce the issue on my machine. Is there any
> particular steps to reproduce it?

The steps above worked for me, though you may need to click "Tables"
and then "foo" again after closing the query tool. I also found that
it needed to be on Linux, and needed to have the "Refresh on click"
option set on the Options dialogue ("None" and "Refresh object and
children" didn't crash).



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgadmin-support by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: pgAdmin crashes on DDL
Next
From: Akshay Joshi
Date:
Subject: Re: pgAdmin crashes on DDL