comp.lang.ada
 help / color / mirror / Atom feed
From: Frank Petranka <fpetran@l10server.nswc.navy.mil>
Subject: Re: Vads X/Motif & C
Date: 1996/09/12
Date: 1996-09-12T00:00:00+00:00	[thread overview]
Message-ID: <Pine.SUN.3.91.960912191001.2603A-100000@L10SUN9> (raw)
In-Reply-To: 514579$sts@news.sei.cmu.edu



On 10 Sep 1996, Mark Bell wrote:

> 
> Folks --
> 
> I'm attempting to interface Ada with an X/Motif government 
> application written in C.  I'm using Vads Ada (V6.2.3) and 
> Vads Ada X Interface to Motif (V3.2.3) The platform is a 
> Sparcstation 20 running Solaris 2.4.
> 
> Initially I had dynamic allocation problems due to the
> ways Vads and Solaris were performing memory allocation.
> I believe I have this solved by modifying the v_usr_confb.a file
> to use malloc() instead of sbrk() in the kernel allocation
> function V_KRN_ALLOC_CALLOUT.  After this was done, I no
> longer get segmentation faults after malloc calls in the
> government C software.
> 
> However, I'm still getting segmentation faults during various
> X/Motif calls, and I'm not 100 percent sure that the above
> fix has totally addressed the problem of the interaction of the
> Vads Ada runtime and Solaris OS in regards to memory allocation.
> Does anyone have any "lessons learned" from doing similar work ??
> 
> I'm also running in problems such as getting a resource's value 
> from a widget, then immediately setting the widget's resource to
> the same value, and getting a segmentation fault.  For Example:
> 
> Xt.Xt_Resource_Management.Xt_Set_Arg(
>   Arg => An_Arg_List(0),
>   Name => Xt_Stringdefs.Xt_N_background,
>   Value => blank_color'Address);
> 
> Xt.Xt_Resource_Management.Xt_Get_Values(
>   W    => Presentation_Drawing_Area,
>   Args => An_Arg_List(0..0));
> 
> Xt.Xt_Resource_Management.Xt_Set_Values(
>    W    => Presentation_Drawing_Area,
>    Args => An_Arg_List(0..0));
> 
> (Segmentation fault occurs)
> 

I believe an Xt_Get_Values requires blank_color'address for Value while
an Xt_Set_Values requires blank_color for Value. 


Disclaimer: The views or opinions expressed in this article are of the user 
and do not, in any manner, reflect that of the Navy.

            Frank J. Petranka          Naval Surface Warfare Center
            (540)653-4849              Dahlgren, Va. 22448
                    fpetran@relay.nswc.navy.mil




  parent reply	other threads:[~1996-09-12  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-10  0:00 Vads X/Motif & C Mark Bell
1996-09-11  0:00 ` Brian Crouch
1996-09-12  0:00 ` Sandy McPherson
1996-09-12  0:00 ` Frank Petranka [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-09-13  0:00 Mark Bell
replies disabled

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