Thanks Dave. On Thu, Nov 8, 2012 at 9:08 PM, Dave Page <[email protected]> wrote:
> Thanks, patch applied. > > On Thu, Nov 8, 2012 at 1:12 PM, Dhiraj Chawla > <[email protected]> wrote: > > Hi Dave, > > > > This patch fixes a crash in pgAdmin||| which happens when user enables > > Refresh object on click in the options dialog in the UI Miscellaneous tab > > and the opens the property dialog of Job, step or Schedule. > > > > The reproduction step is as follows: > > > > 1. Enable Refresh object on click in Options dialog > > 2. Expand the Jobs node and open it's property dialog > > 3. Now click on Steps node or Schedules node or select a Step or Schedule > > node which causes click refresh of the node. > > 4. Now again click on the Job node. > > 5. Now change some properties in the dialog and click ok. > > 6. pgAdmin crashes. > > > > Similarly if you open a property dialog of a Step and then click on job > node > > and then change some properties in the dialog and then click Ok button. > > Again the pgAdmin crashes. > > > > The main reason found for the crash is, that when we select a Job, Step > or > > Schedule node, the node is refreshed in which case we delete object > > associated with the node. Now this same object is passed to the dialog. > Thus > > when a dialog is invoked this object gets passed to the object which is > > valid. But when we re-select this node, the node gets refreshed and the > > object is deleted and a new object is created. Thus now the dialog has a > > dereferenced object. Similarly if a parent node is selected the all the > > child nodes are deleted. > > > > This fix that I have done here in this patch, whenever we go to refresh a > > node on single click we check if dialog of the currently selected node or > > the nodes children to the current node are already opened or not. If no > > dialogs are open we go ahead with the refresh or else we bail out. > > > > Kindly review the patch and let me know if my approach is correct or not. > > > > Thanks, > > > > -- > > regards, > > > > Dhiraj Chawla > > Software Engineer > > EnterpriseDB Corporation > > The Enterprise PostgreSQL Company > > > > Phone: +91-20-30589522 > > > > > > > > -- > > Sent via pgadmin-hackers mailing list ([email protected]) > > To make changes to your subscription: > > http://www.postgresql.org/mailpref/pgadmin-hackers > > > > > > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- regards, *Dhiraj Chawla* Software Engineer EnterpriseDB Corporation The Enterprise PostgreSQL Company Phone: +91-20-30589522
