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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fe5eccc4fca3fd64 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-23 19:19:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!news-out.visi.com!hermes.visi.com!cox.net!news2.east.cox.net.POSTED!53ab2750!not-for-mail Message-ID: <3CC6165F.90104@telepath.com> From: Ted Dennison User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7) Gecko/20011221 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada / Motif Binding Question References: <%Elx8.52627$WV1.16784880@typhoon.ne.ipsvc.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 24 Apr 2002 02:19:09 GMT NNTP-Posting-Host: 68.12.51.201 X-Complaints-To: abuse@cox.net X-Trace: news2.east.cox.net 1019614749 68.12.51.201 (Tue, 23 Apr 2002 22:19:09 EDT) NNTP-Posting-Date: Tue, 23 Apr 2002 22:19:09 EDT Organization: Cox Communications Xref: archiver1.google.com comp.lang.ada:23028 Date: 2002-04-24T02:19:09+00:00 List-Id: Tony Yu wrote: > procedure Exit_Option (W : X_Support.Xt.Widget; > > Client_Data : X_Support.Xt.Xt_Pointer; > > Call_Data : X_Support.Xt.Xt_Pointer) is > > My_String : String (1 .. 625) := (others => ' '); > > procedure C_Exit (Status : Integer); > > pragma Import (C, C_Exit, External_Name => "exit"); > > begin > > C_Exit (0); > > end Exit_Option; > > After invoking the callback, I get the following error: > > -> ** MAIN PROGRAM ABANDONED -- EXCEPTION "STORAGE_ERROR" RAISED You didn't say what Motif bindings you are using. There's no one standard set that comes with every compiler (which makes sense, as Win32 compilers don't typically have Motif around to bind to). One possibility I see is that "Exit_Option" does not have a "pragma Convention (C, ...)" on it. Ada procedures and C functions usually have different calling sequences, and Motif expects to be "talking C" to its callbacks. However, some bindings take care of this for you, which is why it matters what bindings you have. Another possibility is that C_Exit() (whatever that is) is causing you grief. You could try changing that line to "null;" to see if the crash goes away.