This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XtManageChild broken???


--- Harold Hunt <huntharo@msu.edu> wrote:
> Massimo,
> 
> Unfortunately I know nothing about Xt and apparently no one else on the
> list
> does either, or at least they haven't run into your same problem.
> 
> We haven't made any Cygwin-specific changes to the Xt code in XFree86 so
> it
> wouldn't have been by our doing that something is now broken.  Granted,
> there may have been changes to Xt that required a missing change on our
> part, but then we wouldn't know if that was the case, would we? :)
> 
> You can always do whatever I do when I've got a problem:
> 1) Scour any documentation that I've got, reading and re-reading it
> until I
> know for a fact that what I have programmed is 100% correct.
> 2) Scour google.com for any additional information I can find.
> 3) Take a look at the source code for the library, in your case Xt.
> 4) Do a debug build of Cygwin/XFree86 (following the instructions in the
> Contributor's Guide) and run my application in gdb so I can step through
> until I see the crash.
> 5) Try to rewrite my program to be "safer".  That is, try to do things
> that
> the documentation doesn't explicitly mention but that will probably not
> hurt.  For example, in Windows you might throw in a call to UpdateWindow
> following your first call to ShowWindow if you were having problems
> where
> your program didn't paint on launch; some documentation may leave out
> this
> detail that calling UpdateWindow is logically necessary.
> 6) Repeat 1 through 5 until the problem is corrected.
> 
> Know this: a sample program working on Linux but failing on Cygwin
> doesn't
> mean that the sample program is correctly implemented.  In my experience
> I
> have seen Cygwin react more catastrophically to simple programming
> errors,
> whereas Linux seems to be pretty tolerant of mistakes.  I have no idea
> why
> this is the case, but that just seems to be the pattern.  This is kind
> of
> like saying "my program works just fine with no optimization, but with
> -O2
> is segfaults"... sometimes a simple change in the underlying layers can
> make
> a fault more evident.
> 
> Good luck,
> 
> Harold
> 
> P.S. The Cygwin/XFree86 Contributor's Guide is here:
> http://xfree86.cygwin.com/docs/cg/
> 
> > -----Original Message-----
> > From: cygwin-xfree-owner@cygwin.com
> > [mailto:cygwin-xfree-owner@cygwin.com]On Behalf Of Ciccotelli Massimo
> > Sent: Wednesday, June 19, 2002 9:52 AM
> > To: cygwin-xfree@cygwin.com
> > Subject: XtManageChild broken???
> >
> >
> > Hi all,
> > I have a port of a Linux application on Cygwin which worked fine using
> > XFree version 4.1.0.
> >
> > Executing the code after recompiling with version 4.2.0 it crashes
> > (segmentation fault) when I try to open a menu.
> >
> > I have tried to identify the problem (unfortunately I am not an X11
> > expert); it seems due to a call of
> > XtManageChild !!!
> >
> > Digging around in the Internet I have found a simple example which
> shows
> > the same behaviour of my application. the code is the following:
> >
> > #include <Xm/Xm.h>
> > #include <Xm/MainW.h>
> > #include <Xm/CascadeB.h>
> > #include <Xm/MessageB.h>
> > #include <Xm/PushB.h>
              ^^^^^^^^^^
[SNIP]

Hi,

I don't know if anyone noticed, but his code is using a lot of Xm header
files and some *tif code.  The question I might ask is:

Are you using OpenMOTIF or LessTIF on your linux box?

AFAIK, OpenMOTIF based applications aren't always 100% compatible with the
LessTIF libraries.  We aren't even sure if Linux LessTIF applications are
100% compatible with Cygwin LessTIF libraries.  And since OpenMOTIF
libraries are intertwined with Xt, it is possible that some
incompatibilities exist.  I'm no X expert, but this would be my first
guess as to where you might look.  Eliminate that, and then you can call
the XFree code into question...

Cheers,
Nicholas

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]