comp.lang.ada
 help / color / mirror / Atom feed
* I've not seen this error before
@ 2015-04-01  8:42 tonyg
  2015-04-01 13:08 ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: tonyg @ 2015-04-01  8:42 UTC (permalink / raw)



2015-04-01 09:19:32.10 : Exception name: PROGRAM_ERROR
Message: adjust/finalize raised PROGRAM_ERROR: device_type_pkg.ads:115 finalize/adjust raised exception

the code is an ada specification

 type Device_Details_Type is record
      Device_Id : Device_Index_Type;
      The_Device : Device_Class_Type;
      Room_Id : Room_Id_Type;
      The_Id : Domoticz_ID_Type;
      Battery_Level : Battery_Level_Type;
      Signal_Level : Signal_Level_Type;
      Name : SU.Unbounded_String;
      Last_Update : AC.Time;
      Used : boolean ;
      Successful_Initialisation : boolean := false;
      Temperature : Temp_Xten_Type;
      Protected_Device : boolean; 
   end record;

The stack trace passed through addr2line (etc) is different

/home/tony/Dropbox/source/common/schedules_rooms_devices_indexes_pkg.adb:694 (discriminator 3)
/home/tony/Dropbox/source/common/schedules_rooms_devices_indexes_pkg.adb:689
/home/tony/Dropbox/source/common/schedules_rooms_devices_indexes_pkg.adb:342
/home/tony/Dropbox/source/common/schedules_rooms_devices_indexes_pkg.adb:356 (discriminator 2)
/home/tony/Dropbox/source/common/data_feed_update_pkg.adb:73 (discriminator 2)
/home/tony/Dropbox/source/common/data_feed_update_pkg.adb:48
/home/tony/Dropbox/source/common/data_feed_update_pkg.adb:41
/home/tony/Dropbox/source/common/decision_maker_pkg.adb:29 (discriminator 2)
s-tassta.adb:?

which is this and is a procedural call inside a protected object

   procedure Set_Device (Device : in Device_Details_Type) is
        
      begin
         if Initialised then
            gnoga.log("Device id " & Device.Device_Id'img);
            Device_Array(Device.Device_Id) :=Device;   -- LINE 694 where the error is reported
            if Device.Device_Id > 0 then
               Device_File_Storage.Save_Record (File_Item => Device,
                                               To => Device.Device_Id);
            else
               Gnoga.log ("Zero Device Id Device Record  NOT SAVED TO DISK");
            end if;

         else
            Gnoga.Log("Devices not loaded from disk");
         end if;

        
      exception
         when E : others => Gnoga.log (Ada.Exceptions.Exception_Information (E));

      end Set_Device;


The array that is being written to is a fixed array. There is a value of Ada.Calendar.Time in the record but I cannot see why this would cause the problem

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-02  5:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01  8:42 I've not seen this error before tonyg
2015-04-01 13:08 ` Simon Wright
2015-04-01 13:18   ` tonyg
2015-04-01 13:58     ` Niklas Holsti
2015-04-01 14:32       ` tonyg
2015-04-02  5:33   ` Randy Brukardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox