Обсуждение: SQL Editor fail
Hi! This is my first message in list, I hope that it will be helpful. I'm finding a bug in pgAdmin 1.14.0 Beta 1. To make sure that the problem is still there I'm pulled from latest git today. To reproduce it, enter in SQL Editor, write symbol "(" and then press enter for go to new line. It crashing pgAdmin. I'm testing it on MacOS 10.6.7. Regards, Aleksey
On Thu, May 12, 2011 at 1:15 PM, Aleksey Chirkin <a4irkin@gmail.com> wrote: > Hi! This is my first message in list, I hope that it will be helpful. > > I'm finding a bug in pgAdmin 1.14.0 Beta 1. > To make sure that the problem is still there I'm pulled from latest git today. > > To reproduce it, enter in SQL Editor, write symbol "(" and then press > enter for go to new line. It crashing pgAdmin. > > I'm testing it on MacOS 10.6.7. Hmm, I can reproduce it, but I have no idea what the problem is. The stack trace (which contains 56977 frames!!) indicates the crash happens deep in Apples rendering code, which in turn is called from wxWidgets painting code which is called by the main event loop. As far as I can see, there is no pgAdmin code in the stack at all. It seems to occur any time you hit return when there's an unmatched bracket of any type on the line. I don't think the block folding is the issue, as the crash doesn't occur with text like "BEGIN" which will also start a new code block. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On 12 May 2011 16:15, Dave Page <dpage@pgadmin.org> wrote: > Hmm, I can reproduce it, but I have no idea what the problem is. The > stack trace (which contains 56977 frames!!) indicates the crash > happens deep in Apples rendering code, which in turn is called from > wxWidgets painting code which is called by the main event loop. As far > as I can see, there is no pgAdmin code in the stack at all. Yeah, I tend to see that a lot with GUI code, where events are handled asynchronously. Often, the trick is to carpetbomb a whole bunch of breakpoints haphazardly in the general area of the problem, and then when triggering the problem, as each breakpoint is hit, disable them one-by-one, until you see the error again, at which point you re-enable the most recently disabled breakpoint. You are now near to the problem. Sorry if that's obvious - I can't really tell. -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services
Le 05/12/2011 02:15 PM, Aleksey Chirkin a écrit : > Hi! This is my first message in list, I hope that it will be helpful. > > I'm finding a bug in pgAdmin 1.14.0 Beta 1. > To make sure that the problem is still there I'm pulled from latest git today. > > To reproduce it, enter in SQL Editor, write symbol "(" and then press > enter for go to new line. It crashing pgAdmin. > > I'm testing it on MacOS 10.6.7. > Works on Linux at least. As Dave is able to reproduce it, I created a ticket (http://code.pgadmin.org/trac/ticket/316) on this issue so that we can work on it. Thanks for your report. -- Guillaumehttp://www.postgresql.frhttp://dalibo.com
On Thu, May 12, 2011 at 3:15 PM, Dave Page <dpage@pgadmin.org> wrote: > On Thu, May 12, 2011 at 1:15 PM, Aleksey Chirkin <a4irkin@gmail.com> wrote: >> Hi! This is my first message in list, I hope that it will be helpful. >> >> I'm finding a bug in pgAdmin 1.14.0 Beta 1. >> To make sure that the problem is still there I'm pulled from latest git today. >> >> To reproduce it, enter in SQL Editor, write symbol "(" and then press >> enter for go to new line. It crashing pgAdmin. >> >> I'm testing it on MacOS 10.6.7. > > Hmm, I can reproduce it, but I have no idea what the problem is. The > stack trace (which contains 56977 frames!!) indicates the crash > happens deep in Apples rendering code, which in turn is called from > wxWidgets painting code which is called by the main event loop. As far > as I can see, there is no pgAdmin code in the stack at all. > > It seems to occur any time you hit return when there's an unmatched > bracket of any type on the line. I don't think the block folding is > the issue, as the crash doesn't occur with text like "BEGIN" which > will also start a new code block. I was finally able to figure this out, and have committed a fix for it. Thanks for the report! -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company