Thread: 1.4.1 On OSX
Hi Andreas, I finally tracked down the bug in 1.4.1 on Mac which causes a crash whenever pretty much any property dialogue is opened. Basically, in ctlComboBox::GetSelection() we call GetCurrentSelection(). In wxMac however, this simply calls GetSelection() which is a virtual and results in our GetSelection() actually getting called, in turn causing a loop and eventual stack overflow. So, the attached patch seems to fix the problem and return the auto-complete code to the same slightly-broken-but-usable state that it was in 1.4.0 (i.e, you can only type the first character of a data type for example, and the first match will be selected). Can you take a look and confirm my analysis (or call me an idiot, whatever is correct!) before I apply this to both branches and packare 1.4.1.plus please? Regards, Dave
Attachment
Dave Page wrote: > Hi Andreas, > > I finally tracked down the bug in 1.4.1 on Mac which causes a crash whenever > pretty much any property dialogue is opened. Basically, in > ctlComboBox::GetSelection() we call GetCurrentSelection(). In wxMac however, > this simply calls GetSelection() which is a virtual and results in our > GetSelection() actually getting called, in turn causing a loop and eventual > stack overflow. > > So, the attached patch seems to fix the problem and return the auto-complete > code to the same slightly-broken-but-usable state that it was in 1.4.0 (i.e, > you can only type the first character of a data type for example, and the > first match will be selected). > > Can you take a look and confirm my analysis (or call me an idiot, whatever > is correct!) before I apply this to both branches and packare 1.4.1.plus > please? In general I agree. I committed a fix in ctlComboBoxFix doing essentially the same, but the version dependent GetCurrentSelection code isn't cluttered around the sources this way. Regards, Andreas
On 21/12/05 1:12 pm, "Andreas Pflug" <pgadmin@pse-consulting.de> wrote: > Dave Page wrote: >> Hi Andreas, >> >> I finally tracked down the bug in 1.4.1 on Mac which causes a crash whenever >> pretty much any property dialogue is opened. Basically, in >> ctlComboBox::GetSelection() we call GetCurrentSelection(). In wxMac however, >> this simply calls GetSelection() which is a virtual and results in our >> GetSelection() actually getting called, in turn causing a loop and eventual >> stack overflow. >> >> So, the attached patch seems to fix the problem and return the auto-complete >> code to the same slightly-broken-but-usable state that it was in 1.4.0 (i.e, >> you can only type the first character of a data type for example, and the >> first match will be selected). >> >> Can you take a look and confirm my analysis (or call me an idiot, whatever >> is correct!) before I apply this to both branches and packare 1.4.1.plus >> please? > > In general I agree. I committed a fix in ctlComboBoxFix doing > essentially the same, but the version dependent GetCurrentSelection code > isn't cluttered around the sources this way. Annoyingly that's one of the first fixes I tried and it didn't work. Seems to now though - I must have forgotten to make clean or something. Thanks. Regards, Dave
Dave Page wrote: > > > On 21/12/05 1:12 pm, "Andreas Pflug" <pgadmin@pse-consulting.de> wrote: > > >>Dave Page wrote: >> >>>Hi Andreas, >>> >>>I finally tracked down the bug in 1.4.1 on Mac which causes a crash whenever >>>pretty much any property dialogue is opened. Basically, in >>>ctlComboBox::GetSelection() we call GetCurrentSelection(). In wxMac however, >>>this simply calls GetSelection() which is a virtual and results in our >>>GetSelection() actually getting called, in turn causing a loop and eventual >>>stack overflow. >>> >>>So, the attached patch seems to fix the problem and return the auto-complete >>>code to the same slightly-broken-but-usable state that it was in 1.4.0 (i.e, >>>you can only type the first character of a data type for example, and the >>>first match will be selected). >>> >>>Can you take a look and confirm my analysis (or call me an idiot, whatever >>>is correct!) before I apply this to both branches and packare 1.4.1.plus >>>please? >> >>In general I agree. I committed a fix in ctlComboBoxFix doing >>essentially the same, but the version dependent GetCurrentSelection code >>isn't cluttered around the sources this way. > > > Annoyingly that's one of the first fixes I tried and it didn't work. Well the wxComboBox code is a shy guy (remember how reluctant it's mentioned in 2.6.2 release notes). Maybe you pressed a keyboard button too harsh, and it was frightened :-) Regards, Andreas
> -----Original Message----- > From: pgadmin-hackers-owner@postgresql.org > [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of Dave Page > Sent: 21 December 2005 13:49 > To: Andreas Pflug > Cc: pgadmin-hackers; Jerry LeVan > Subject: Re: [pgadmin-hackers] 1.4.1 On OSX > > > Annoyingly that's one of the first fixes I tried and it > didn't work. Seems > to now though - I must have forgotten to make clean or something. OK, it looks good to me now - build uploaded to http://developer.pgadmin.org/ftp/release/v1.4.1/osx, it'll hit the mirrors overnight. Regards, Dave.