From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "Adam H(dot)Pendleton" <fmonkey(at)fmonkey(dot)net>, <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: Linux QueryBuilder error |
Date: | 2003-06-24 20:58:31 |
Message-ID: | 03AF4E498C591348A42FC93DEA9661B844B121@mail.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Nice catch!
Regards, Dave.
> -----Original Message-----
> From: Adam H.Pendleton [mailto:fmonkey(at)fmonkey(dot)net]
> Sent: 24 June 2003 21:39
> To: pgadmin-hackers(at)postgresql(dot)org
> Subject: [pgadmin-hackers] Linux QueryBuilder error
>
>
> I have tracked down the QueryBuilder error, and it's not a wxWindows
> error, per se. The problem lies in the
> frmQueryBuilder::OnSize() event
> handler. Basically, the QueryBuilder form receives the OnSize event
> *before* the form has been created. Here is a thread from the
> wxWindows list, discussing a similar problem a user had with
> a Windows
> application:
>
http://lists.wxwindows.org/archive/wx-users/msg05277.html
Our situation is a bit different, because the code called by
frmQueryBuilder::OnSize is wxWindows code, and not custom code,
but....here is the problem. In src/generic/laywin.cpp (from
wxWindows), the LayoutMDIFrame() function, calls the following code:
wxWindow* clientWindow = frame->GetClientWindow();
rect = event.GetRect();
clientWindow->SetSize(rect.x, rect.y, rect.width, rect.height);
Basically, frame->GetClientWindow() returns NULL, causing SetSize
(which is a macro) to cause a segfault in DoSetSize(clientWindow,
etc.). The variable 'frame' is passed to LayoutMDIFrame by our code:
LayoutMDIFrame(this).
frame->GetClientWindow() is indeed null as frame->m_clientWindow = 0x0.
I am looking for a solution to the problem, but I wanted to send it to
the list in case someone could fix it faster than I could.
ahp
From | Date | Subject | |
---|---|---|---|
Next Message | Adam H.Pendleton | 2003-06-24 23:03:30 | frmQueryBuilder.patch |
Previous Message | Adam H.Pendleton | 2003-06-24 20:46:16 | Further QueryBuilder problems |