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-Thread: 103376,330279f3e4fb8016,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Jano Newsgroups: comp.lang.ada Subject: Problem with finalized protected object Date: Wed, 07 Jul 2004 12:40:05 +0200 Message-ID: <2l227jF7p6vqU1@uni-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de GbLS6CoQtdBoN3lxtkcJWg0bYrcv9wqXVDPGc4Fh5xtEFH9zc= User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040626) X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:2096 Date: 2004-07-07T12:40:05+02:00 List-Id: Gnat 3.15p, both linux/win32. I have a program that, when ended, gives the following error: Execution terminated by unhandled exception Exception name: PROGRAM_ERROR Message: Protected Object is finalized Call stack traceback locations: 0x8ab417b 0x8ad5d4e 0x8ad5940 0x8ad5893 0x8aab4d8 The traceback gives: 0x8ab417b at ada/rts/a-except.adb:1320 0x8ad5d4e at ada/rts/s-assert.adb:46 0x8ad5940 at ada/rts/s-assert.adb:46 0x8ad5893 at ada/rts/s-assert.adb:46 0x8aab4d8 at ada/rts/s-tasdeb.adb:76 As you can see, nothing in my code. The situation is as follows. I have several tasks. The main body does nothing but wait for the other tasks to end. If I place a long delay in the main body after the tasks finalize, the exception isn't raised until the main body exits. In fact, debugging it shows that the exception happens when adafinal is called, someplace within. Even if the fault is in my code, isn't that some ill behavior on Gnat's part? I would expect the program error to be raised when the finalized object gets called, nor later. Am I right? Thanks for any comments, A. Mosteo.