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=0.3 required=5.0 tests=BAYES_00,STOX_REPLY_TYPE, STOX_REPLY_TYPE_WITHOUT_QUOTES,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2339842f2a89f4a9,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.26.169 with SMTP id m9mr330261pbg.3.1316654473452; Wed, 21 Sep 2011 18:21:13 -0700 (PDT) Path: lh7ni2214pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.astraweb.com!border5.a.newsrouter.astraweb.com!xlned.com!feeder5.xlned.com!feed.xsnews.nl!border-1.ams.xsnews.nl!upload-1.xsnews.nl!10.10.60.16.MISMATCH!frontend-F10-16.ams.news.kpn.nl From: "ldries46" Newsgroups: comp.lang.ada Subject: Closing a program with GTK Date: Thu, 22 Sep 2011 03:21:00 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513 X-MIMEOLE: Produced By Microsoft MimeOLE V15.4.3538.513 Message-ID: <4e7a8d90$0$5570$703f8584@news.kpn.nl> Organization: KPN.com NNTP-Posting-Host: 77.168.179.107 X-Trace: 1316654480 news.kpn.nl 5570 77.168.179.107@kpn/77.168.179.107:50464 Xref: news1.google.com comp.lang.ada:18071 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Date: 2011-09-22T03:21:00+02:00 List-Id: I have a program in which I want to stop the program to quit while first conducting a special task. The program is linked with the "-mwindows" to get rid of the DOS-window. I am running on a Windows 7 system I am using the following routines in the .callback package ----------------------- -- On_Quit1_Activate -- ----------------------- procedure On_Quit1_Activate (Object : access Gtk_Image_Menu_Item_Record'Class) is pragma Unreferenced (Object); begin Destroy(Transc_AdaWindow); end On_Quit1_Activate; where Transc_AdaWindow is the top level window and ----------------------- -- On_Window_Destroy -- ----------------------- procedure On_Window_Destroy (Object : access Gtk_Widget_Record'Class) is pragma Unreferenced (Object); begin Close_Ini; end On_Window_Destroy; where Close_Ini is the action that must be executed Close_Ini is part of a package with no reference to GTK routines. In both the cases That I use the On Quit facility or the windows abort button I get the following message: Program received signal SIGSEGV, Segmentation fault. 0x0003fd43 in ?? () When debugging in GPS I found that the message is generated in the gtk_object package in the Destroy routine at the moment that you enter the Internal routine with the Step button What do I do wrong, this construction worked in another program whitout the -mswindows switch, but I need this switch to get a full stop op the program with the Quit menuitem or the abort button L. Dries