From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,444c1179ce493ca2,start X-Google-Attributes: gid103376,public From: msb@sei.cmu.edu (Mark Bell) Subject: Vads X/Motif & C Date: 1996/09/10 Message-ID: <514579$sts@news.sei.cmu.edu>#1/1 X-Deja-AN: 179736409 organization: Software Engineering Institute newsgroups: comp.lang.ada Date: 1996-09-10T00:00:00+00:00 List-Id: 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) Any suggestions as to why this happens ?? Thanks Mark S. Bell 412-268-7925 (Voice) Software Engineering Institute 412-268-5758 (Fax) Carnegie Mellon University ** These are my opinions, 4500 Fifth Ave, Pittsburgh PA.,15213 not those of the SEI or CMU **