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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fe5eccc4fca3fd64,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-23 16:10:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.nyroc.rr.com!chnws02.ne.ipsvc.net!cyclone.ne.ipsvc.net!24.128.8.70!typhoon.ne.ipsvc.net.POSTED!not-for-mail From: "Tony Yu" Newsgroups: comp.lang.ada Subject: Ada / Motif Binding Question X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <%Elx8.52627$WV1.16784880@typhoon.ne.ipsvc.net> Date: Tue, 23 Apr 2002 22:56:59 GMT NNTP-Posting-Host: 24.61.238.94 X-Complaints-To: abuse@attbi.com X-Trace: typhoon.ne.ipsvc.net 1019602619 24.61.238.94 (Tue, 23 Apr 2002 18:56:59 EDT) NNTP-Posting-Date: Tue, 23 Apr 2002 18:56:59 EDT Organization: ATT Broadband Xref: archiver1.google.com comp.lang.ada:23021 Date: 2002-04-23T22:56:59+00:00 List-Id: Hi, I recently started using the Motif binding with Ada and had great difficulty getting the callback functions to work properly. The following is a small program I created: ---------------------------------------------------------------------------- -------------------------- with X_Support.Xt, X_Support.Lib, X_Support.Xm, X_Support.Xm_Defs, Ada.Text_Io; with X_Support.Form, X_Support.Push_Button; procedure My_Test is Appshell : X_Support.Xt.Widget := X_Support.Xt.Null_Widget; App_Con : X_Support.Xt.Xt_App_Context; Form, Exitbutton : X_Support.Xt.Widget; Argc : Natural := 0; Argv : X_Support.Xt.Argv_Type; procedure My_Proc is begin Ada.Text_Io.Put_Line ("Hello!"); end My_Proc; 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; begin X_Support.Xt.Xt_Initializers.Xt_App_Initialize (App_Context_Return => App_Con, Application_Class => "", Argc_In_Out => Argc, Argv_In_Out => Argv, Widget_Id => Appshell); Form := X_Support.Xt.Xt_Instance_Management.Xt_Create_Managed_Widget ("form", X_Support.Form.Xm_Form_Widget_Class, Appshell); Exitbutton := X_Support.Xt.Xt_Instance_Management.Xt_Create_Managed_Widget (Name => "EXIT", Of_Class => X_Support.Push_Button. Xm_Push_Button_Widget_Class, Parent => Form); X_Support.Xt.Xt_Callbacks.Xt_Add_Callback (Exitbutton, X_Support.Xm_Defs.Nactivatecallback, Exit_Option'Address, X_Support.Xt.Null_Xt_Pointer); X_Support.Xt.Xt_Instance_Management.Xt_Realize_Widget (Appshell); X_Support.Xt.Xt_Event_Management.Xt_App_Main_Loop (App_Con); end My_Test; ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- - After invoking the callback, I get the following error: -> ** MAIN PROGRAM ABANDONED -- EXCEPTION "STORAGE_ERROR" RAISED If I suppress the Storage_Error check, I get the following: -> exception_handler: below bottom of user stack I suspect that the callback procedure is not being allocated enough stack space for me to declare such a string. I've had similar exceptions when I perform a Text_Io, or call another procedure/function within the callback procedure. Oh, I compiled this program using Rational Apex 3.2.0b. Is there a way to increase the stack size allocated to the callback procedure? Any help would be appreciated! Thanks in advance! -Tony Yu P.S. I appologise if this topic has been mentioned before.