comp.lang.ada
 help / color / mirror / Atom feed
* Rational and X11Ada -- HELP???
@ 1998-09-10  0:00 alan walkington
  1998-09-11  0:00 ` dennison
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: alan walkington @ 1998-09-10  0:00 UTC (permalink / raw)


Gentlepeople:

The situation is as follows:

We have a Sparc server running Solaris2.6, with Rational Apex as the ada
development system, and gcc as the c compiler.  The workstations are PCs
running the eXceed x- server.

 We downloaded and installed the Intermetrics X11Ada bindings to Ada95 on
the server.

They installed ok, but programs compiled and linked using them crash. The
crash is usually in an area where the program is trying to use data from the
display structure returned from XOpenDisplay.

1) we are using the correct hostname: server string in the display_name
parameter to XOpenDisplay.

2) Other X programs not using the bindings work just fine.

     There are two versions of the x-library (one in /usr/lib and the other
in /usr/openwin/lib). I've linked basicwin and curves (bindings test
programs) to both and  gotten the same result, therefore eliminating the
possibility that I've linked in the wrong library version.

     I've run two versions of both basicwin and curves (linked to the two
sets of libraries) from a Sun machine, eliminating Exceed as the cause of
the problem.

     I wrote a little C program which makes some of the library calls that
are crashing the Ada programs and then prints out the results, which look
fine.

     I think this pretty much eliminates any source of problems aside from
the compiler/linker and the bindings themselves, and I'm starting to suspect
Rational.

If anyone has experienced these problems before, any help would be
appreciated.

Thanks

Alan Walkington
Sr. Software Engineer
United Defense L.P. - San Jose
work: alan_walkington@udlp.com
home: walky@netmagic.net








^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Rational and X11Ada -- HELP???
  1998-09-10  0:00 Rational and X11Ada -- HELP??? alan walkington
@ 1998-09-11  0:00 ` dennison
  1998-09-11  0:00   ` Robert L. Spooner
  1998-09-12  0:00   ` Corey Ashford
  1998-09-12  0:00 ` Corey Ashford
  1998-09-19  0:00 ` David Coote
  2 siblings, 2 replies; 6+ messages in thread
From: dennison @ 1998-09-11  0:00 UTC (permalink / raw)


In article <6tabgr$lfp$1@usenet46.supernews.com>,
  "alan walkington" <walky@netmagic.net> wrote:

>      I wrote a little C program which makes some of the library calls that
> are crashing the Ada programs and then prints out the results, which look
> fine.

Lets just say you wouldn't be the first person to find a bug in Rational's X
bindings....

I'd highly suggest going into the source code for their bindings and looking
for the problem. Try copying the code for the binding you are using into your
own code and playing with it there. I tracked down a nasty little pointer
dereferencing problem that way. This was a problem that they would have
gotten if they had called this routine *even once*. Go figure.

Of course that was over 4 years ago. Surely they have most of those bugs
worked out by now... ;-)

There is also the tasking issue. As I remember it they had a task-safe set of
bindings and a "straight" set. If you use non-task safe X bindings in a
multitask Ada (or C!) program you have to be very careful.

--
T.E.D.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Rational and X11Ada -- HELP???
  1998-09-11  0:00 ` dennison
@ 1998-09-11  0:00   ` Robert L. Spooner
  1998-09-12  0:00   ` Corey Ashford
  1 sibling, 0 replies; 6+ messages in thread
From: Robert L. Spooner @ 1998-09-11  0:00 UTC (permalink / raw)
  To: dennison



dennison@telepath.com wrote:

> In article <6tabgr$lfp$1@usenet46.supernews.com>,
>   "alan walkington" <walky@netmagic.net> wrote:
>
> >      I wrote a little C program which makes some of the library calls that
> > are crashing the Ada programs and then prints out the results, which look
> > fine.
>
> Lets just say you wouldn't be the first person to find a bug in Rational's X
> bindings....

 Or other bindings.  A while back I was trying to use the Rational VADSworks
socket bindings to VxWorks and got caught by the old 'SIZE vs 'LENGTH
difference.  Their subcontractor had translated sizeof into'SIZE giving a value
which was off by a factor of 8.  The bindings had obviously never been tested or
used for TCP/IP before I tried to use them.  Makes me wonder where all the $s we
spend are going.

Regards,
Bob
--
                               Robert L. Spooner
                         Registered Professional Engineer
                               Research Assistant
                         Intelligent Control Systems Group

            Applied Research Laboratory        Phone: (814) 863-4120
            The Pennsylvania State University  FAX:   (814) 863-7843
            P. O. Box 30
            State College, PA 16804-0030       RLS19@psu.edu






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Rational and X11Ada -- HELP???
  1998-09-10  0:00 Rational and X11Ada -- HELP??? alan walkington
  1998-09-11  0:00 ` dennison
@ 1998-09-12  0:00 ` Corey Ashford
  1998-09-19  0:00 ` David Coote
  2 siblings, 0 replies; 6+ messages in thread
From: Corey Ashford @ 1998-09-12  0:00 UTC (permalink / raw)



alan walkington wrote in message <6tabgr$lfp$1@usenet46.supernews.com>...
>Gentlepeople:
[snip]
>
>     I think this pretty much eliminates any source of problems aside from
>the compiler/linker and the bindings themselves, and I'm starting to suspect
>Rational.
>

Since the bindings are from a different vendor (which also sells Ada compilers),
it's quite possible that the bindings are compiler-specific.  In other words,
they may have made some assumptions about calling conventions that don't hold up
with Apex.  Possibilities include differences in record layout, pass-by-reference
vs. pass-by-value, etc.  These sorts of differences are often easy to compensate
for (e.g. by adding pragma convention(C, <type>); to the record types), but you
have to first identify the actual problem.

If you have a support contract for your Apex compiler and a test case, I'm sure
tech support would be happy to help you out.  You'd need to include the relevent
bindings in the test case submitted.

Corey Ashford
Rational Software Corp.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Rational and X11Ada -- HELP???
  1998-09-11  0:00 ` dennison
  1998-09-11  0:00   ` Robert L. Spooner
@ 1998-09-12  0:00   ` Corey Ashford
  1 sibling, 0 replies; 6+ messages in thread
From: Corey Ashford @ 1998-09-12  0:00 UTC (permalink / raw)



dennison@telepath.com wrote in message <6tbg5i$pe6$1@nnrp1.dejanews.com>...
>In article <6tabgr$lfp$1@usenet46.supernews.com>,
>  "alan walkington" <walky@netmagic.net> wrote:
>
>>      I wrote a little C program which makes some of the library calls that
>> are crashing the Ada programs and then prints out the results, which look
>> fine.
>
>Lets just say you wouldn't be the first person to find a bug in Rational's X
>bindings....

Just to be clear, he said he used the Intermetric X11 bindings, not Rational's.

- Corey
Rational Software Corp.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Rational and X11Ada -- HELP???
  1998-09-10  0:00 Rational and X11Ada -- HELP??? alan walkington
  1998-09-11  0:00 ` dennison
  1998-09-12  0:00 ` Corey Ashford
@ 1998-09-19  0:00 ` David Coote
  2 siblings, 0 replies; 6+ messages in thread
From: David Coote @ 1998-09-19  0:00 UTC (permalink / raw)


We had problems using Apex 2.4.6 with X bindings which we got around by rep 
clausing the data passed to X. This is painful. 

We're hoping that the whole pragma C stuff works better with Apex 3.0x.

David


In article <6tabgr$lfp$1@usenet46.supernews.com>, walky@netmagic.net says...
>
>Gentlepeople:
>
>The situation is as follows:
>
>We have a Sparc server running Solaris2.6, with Rational Apex as the ada
>development system, and gcc as the c compiler.  The workstations are PCs
>running the eXceed x- server.
>
> We downloaded and installed the Intermetrics X11Ada bindings to Ada95 on
>the server.
>
>They installed ok, but programs compiled and linked using them crash. The
>crash is usually in an area where the program is trying to use data from the
>display structure returned from XOpenDisplay.
>
>1) we are using the correct hostname: server string in the display_name
>parameter to XOpenDisplay.
>
>2) Other X programs not using the bindings work just fine.
>
>     There are two versions of the x-library (one in /usr/lib and the other
>in /usr/openwin/lib). I've linked basicwin and curves (bindings test
>programs) to both and  gotten the same result, therefore eliminating the
>possibility that I've linked in the wrong library version.
>
>     I've run two versions of both basicwin and curves (linked to the two
>sets of libraries) from a Sun machine, eliminating Exceed as the cause of
>the problem.
>
>     I wrote a little C program which makes some of the library calls that
>are crashing the Ada programs and then prints out the results, which look
>fine.
>
>     I think this pretty much eliminates any source of problems aside from
>the compiler/linker and the bindings themselves, and I'm starting to suspect
>Rational.
>
>If anyone has experienced these problems before, any help would be
>appreciated.
>
>Thanks
>
>Alan Walkington
>Sr. Software Engineer
>United Defense L.P. - San Jose
>work: alan_walkington@udlp.com
>home: walky@netmagic.net
>
>
>
>





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-09-19  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-10  0:00 Rational and X11Ada -- HELP??? alan walkington
1998-09-11  0:00 ` dennison
1998-09-11  0:00   ` Robert L. Spooner
1998-09-12  0:00   ` Corey Ashford
1998-09-12  0:00 ` Corey Ashford
1998-09-19  0:00 ` David Coote

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox