Thread: Need help with GTK bug
Hi Andreas, I could use some help with a GTK related bug if you can spare some time please. The bug in question is listed in BUGS.txt as: Menu item 'Query Browser' causes Segfault under unix - crash after qbForm->Show() in frmQueryBuilder::OnSize() at layout.LayoutMDIFrame(this). QB currently disabled. The error is caught by an assert in src/gtk/window.cpp on line 2875: wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") ); which was indirectly called by pgAdmin in frmQueryBuilder.cpp, line 512: void frmQueryBuilder::OnSize(wxSizeEvent& event) { if (this->GetClientWindow() != NULL) { wxLayoutAlgorithm layout; >>> layout.LayoutMDIFrame(this); } } Any ideas? Thanks, Dave.
Dave Page wrote: >Hi Andreas, > >I could use some help with a GTK related bug if you can spare some time >please. > >The bug in question is listed in BUGS.txt as: Menu item 'Query Browser' >causes Segfault under unix - crash after qbForm->Show() in >frmQueryBuilder::OnSize() at layout.LayoutMDIFrame(this). QB currently >disabled. > >The error is caught by an assert in src/gtk/window.cpp on line 2875: > >wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") ); > >which was indirectly called by pgAdmin in frmQueryBuilder.cpp, line 512: > >void frmQueryBuilder::OnSize(wxSizeEvent& event) >{ > if (this->GetClientWindow() != NULL) { > wxLayoutAlgorithm layout; > > >>>> layout.LayoutMDIFrame(this); >>>> >>>> > } >} > >Any ideas? > > Hi Dave, it's still the same problem I had those days. I don't have a clue what's going on. That MDI is a miracle to me, I'd have to slice it down to GTK (which I don't know either) to be helpful. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 20 October 2003 14:51 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Need help with GTK bug > > > it's still the same problem I had those days. I don't have a > clue what's going on. That MDI is a miracle to me, I'd have > to slice it down to GTK (which I don't know either) to be helpful. > OK, thanks. Regards, Dave.
Hi Dave. I search for the cause of this problem. Is this helpful? However, a problem is still left.:-( regards, Hiroshi Saito From: "Dave Page" <dpage@vale-housing.co.uk> > The bug in question is listed in BUGS.txt as: Menu item 'Query Browser' > causes Segfault under unix - crash after qbForm->Show() in > frmQueryBuilder::OnSize() at layout.LayoutMDIFrame(this). QB currently > disabled.
Attachment
Hiroshi Saito wrote: >Hi Dave. > >I search for the cause of this problem. >Is this helpful? >However, a problem is still left.:-( > > > Hm, I doubt that this is helpful in any way, because it just lets some vars uninitialized before Create(), so I assume the current version is better. Regards, Andreas
Hi Andreas. From: "Andreas Pflug" <pgadmin@pse-consulting.de> > Hiroshi Saito wrote: > > >Hi Dave. > > > >I search for the cause of this problem. > >Is this helpful? > >However, a problem is still left.:-( > > Hm, I doubt that this is helpful in any way, because it just lets some > vars uninitialized before Create(), so I assume the current version is > better. You are probably right. I thinks that a gtk problem is certain. But,I thinks that the problem can be ascertained by this patch. It takes time a little more to solve it. It is information because Dave may be settled.:-) regards, Hiroshi Saito
Attachment
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 27 October 2003 17:55 > To: Hiroshi Saito > Cc: Dave Page; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Need help with GTK bug > > Hiroshi Saito wrote: > > >Hi Dave. > > > >I search for the cause of this problem. > >Is this helpful? > >However, a problem is still left.:-( > > > > > > > > Hm, I doubt that this is helpful in any way, because it just > lets some vars uninitialized before Create(), Only changed and m_server afaict and they are unimportant. > so I assume the > current version is better. Actually Hiroshi does seem to have fixed that particular problem. It's odd though - I was thinking along those lines, but tested the other way round, by changing the wx MDI sample app to use a 2 step create as frmQueryBuilder did. That worked fine though so I moved on. Now it crashes when you add an new child table or view now - dunno if that's a related problem or not yet. Anyway, thanks Hiroshi. Regards, Dave.
Dave Page wrote: > > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 27 October 2003 17:55 >>To: Hiroshi Saito >>Cc: Dave Page; pgadmin-hackers@postgresql.org >>Subject: Re: [pgadmin-hackers] Need help with GTK bug >> >>Hiroshi Saito wrote: >> >> >> >>>Hi Dave. >>> >>>I search for the cause of this problem. >>>Is this helpful? >>>However, a problem is still left.:-( >>> >>> >>> >>> >>> >>Hm, I doubt that this is helpful in any way, because it just >>lets some vars uninitialized before Create(), >> >> > >Only changed and m_server afaict and they are unimportant. > > > >>so I assume the >>current version is better. >> >> > >Actually Hiroshi does seem to have fixed that particular problem. It's >odd though - I was thinking along those lines, but tested the other way >round, by changing the wx MDI sample app to use a 2 step create as >frmQueryBuilder did. That worked fine though so I moved on. > > Hu?!? It's a kind of magic... Actually, I don't trust it. Is there some kind of compiler flaw? IMHO, usind MDI for this is a nice idea (it would never have come to my mind), but since I'm a MDI sceptic it might be better to use this internally quite complicated stuff on the long therm. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 28 October 2003 11:07 > To: Dave Page > Cc: Hiroshi Saito; pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Need help with GTK bug > > Hu?!? > It's a kind of magic... Yup, very bizarre. > Actually, I don't trust it. No, neither do I. I like to understand why a fix works. > Is there some kind of compiler flaw? Dunno. Whatever it is it must be non-platform issue as I use Linux and Hiroshi uses FreeBSD.. > IMHO, usind MDI for this is a nice idea (it would never have > come to my mind), but since I'm a MDI sceptic it might be > better to use this internally quite complicated stuff on the > long therm. Hmm.... Regards, Dave.
Dave Page wrote: >>IMHO, usind MDI for this is a nice idea (it would never have >>come to my mind), but since I'm a MDI sceptic it might be >>better to use this internally quite complicated stuff on the >>long therm. >> >> > >Hmm.... > > Yes, I don't understand these words either :-) This has nothing to do with thermal problems, and what I wanted to say was: it might be better *not* to use this internally quite complicated stuff on the long term. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 28 October 2003 12:33 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Need help with GTK bug > > Yes, I don't understand these words either :-) > This has nothing to do with thermal problems, and what I > wanted to say was: > > it might be better *not* to use this internally quite > complicated stuff on the long term. Yes, more sense that makes indeed does it. So anyway, do you have any replacement suggestions? (I assume you're talking about the whole QB, and not just the ctor for the main form). Regards, Dave.
Dave Page wrote: > > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 28 October 2003 12:33 >>To: Dave Page >>Cc: pgadmin-hackers@postgresql.org >>Subject: Re: [pgadmin-hackers] Need help with GTK bug >> >>Yes, I don't understand these words either :-) >>This has nothing to do with thermal problems, and what I >>wanted to say was: >> >>it might be better *not* to use this internally quite >>complicated stuff on the long term. >> >> > >Yes, more sense that makes indeed does it. > >So anyway, do you have any replacement suggestions? (I assume you're >talking about the whole QB, and not just the ctor for the main form). > > I'm a bit hesitating to suggest a replacement. I would have used standard frames and dialogs to implement this, or even custom made controls for the tables. This duplicates the MDI child/parent behaviour in many aspects, but avoids several complex (and bug attracting) features. Regards, Andreas
Hi Dave. It is the countermeasure of the problem which is still contained. My FreeBSD improves only a little by this coping. However, Check it because it may have badness besides if it is applied. not a request for application but this is reference information. I trust only the result which did try in the reality. Seeing is believing.:-) regards, Hiroshi Saito
Attachment
Hiroshi Saito wrote: >Hi Dave. > >It is the countermeasure of the problem which is still contained. >My FreeBSD improves only a little by this coping. >However, >Check it because it may have badness besides if it is applied. >not a request for application but this is reference information. > >I trust only the result which did try in the reality. >Seeing is believing.:-) > >regards, >Hiroshi Saito > This is an interesting approach. Usually, the this pointer should contain the same as event.GetEventObject(). If it doesn't there's something wrong, but it's wx's responsibility to provide a correct pointer. You might have breakpoints at the OnSize methods, and trace back where they come from. Regards, Andreas
Hi Andreas. From: "Andreas Pflug" <pgadmin@pse-consulting.de> > This is an interesting approach. Usually, the this pointer should > contain the same as event.GetEventObject(). If it doesn't there's > something wrong, but it's wx's responsibility to provide a correct > pointer. You might have breakpoints at the OnSize methods, and trace > back where they come from. Yes,It is probably as you say if it is usual. This problem is very complex for me. I gets confused when this is read....:-( It is a plan as a beginning of the solution at the time of the present. regards, Hiroshi Saito
> -----Original Message----- > From: Hiroshi Saito [mailto:saito@inetrt.skcapi.co.jp] > Sent: 29 October 2003 03:56 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Need help with GTK bug > > Hi Dave. > > It is the countermeasure of the problem which is still contained. > My FreeBSD improves only a little by this coping. > However, > Check it because it may have badness besides if it is applied. > not a request for application but this is reference information. > > I trust only the result which did try in the reality. > Seeing is believing.:-) Hi Hiroshi, It's better, but still not right as you say. There's obviously something screwed up with the GTK/MDI support in wxWindows :-( Shame none of their team wanted to help when I asked :-( Are you continuing to work on this? Regards, Dave
From: "Dave Page" <dpage@vale-housing.co.uk> > Hi Hiroshi, > > It's better, but still not right as you say. Please keep it in the recognition of Dave because it is the middle. > There's obviously something > screwed up with the GTK/MDI support in wxWindows :-( Shame none of their > team wanted to help when I asked :-( I am very much disappointed at it, too. This problem seems to be a maze... But, we must solve it. > > Are you continuing to work on this? Yes,It goes on though I can't take time easily. regards, Hiroshi Saito
Hi Adam., and Raphaël. I spend time to be already considerable on this problem.:-( However, there is no good development. As for the root trunk of the problem, gtk Or wxWindows isn't clear, either. The control of mdi.cpp doesn't go well.... event-handler of wxMDIClientWindow can't be caught why.?? How is it in your platform? Or, good thought. It seems me that the coding of present QueryBuilder is right. But, This patch may become help to ascertain it. regards, Hiroshi Saito > From: "Dave Page" <dpage@vale-housing.co.uk> > > > Hi Hiroshi, > > > > It's better, but still not right as you say. > > Please keep it in the recognition of Dave because it is the middle. > > > There's obviously something > > screwed up with the GTK/MDI support in wxWindows :-( Shame none of their > > team wanted to help when I asked :-( > > I am very much disappointed at it, too. > This problem seems to be a maze... > But, we must solve it. > > > > > Are you continuing to work on this? > > Yes,It goes on though I can't take time easily. > > regards, > Hiroshi Saito