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, T_FILL_THIS_FORM_SHORT,WEIRD_PORT autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: raised PROGRAM_ERROR : XXXXXX finalize/adjust raised exception Date: Sat, 6 May 2017 14:58:15 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <21b617ac-563a-4bac-9e39-a179ed94a240@googlegroups.com> NNTP-Posting-Host: BYuA7L7MRjuLLjcoGHOBxw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:46679 Date: 2017-05-06T14:58:15+02:00 List-Id: On 2017-05-06 14:18, reinert wrote: > I got the following rare error message (when running my Ada program under debian - updated): > > "raised PROGRAM_ERROR : cells.ads:43 finalize/adjust raised exception" > > > Line 43-50 in "cells.ads" is like this: > > type cell_observation_t is record > id : cell_names1.target_t; > state : cell_state_t := live; > r, dr : real_vector2d := (0.0, 0.0); > axis : degree_t; > children1 : cell_names1.cell_names_sets.set; > pre_cell, next_cell : target_t := cnil; > end record; > > Is there something obvious I should be aware of? Exceptions inside controlled object's finalization. Presumably you have a controlled member in cell_observation_t. Add this to the main program: GNAT.Exception_Traces.Trace_On (GNAT.Exception_Traces.Every_Raise); to see the original issue. (Frequently it is an unhandled exception that rolls the stack, which in turn destroys a controlled object that raises an exception in its Finalize, all thoroughly hidden away with a Program_Error presented instead...) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de