11.11 dumpstate()

With this function IDM status information is written into the log respectively trace file or a specified file.

The dumpstate is a status information of IDM-relevant information in order to simplify error analysis within an IDM application.

The content of the dumpstate is divided into different sections that are variable and that are adapted to the error situation. In addition, the dumpstate is influenced by the errors that have previously occurred. For example, an unsuccessful memory allocation leads to information concerning the memory usage by the IDM in the next dumpstate output. If no IDM objects or identifiers can be created, then the utilization of IDM objects and identifiers is dumped.

The dumpstate information is always encased between *** DUMP STATE BEGIN *** and *** DUMP STATE END *** and can have the following segments:

  • PROCESS: Process and thread number, date/time.
  • ERRORS: Complete content of the error codes set.
  • CALLSTACK: Contains rules, IDM interface functions and application functions directly called by the IDM.
  • THISEVENTS and EVENT QUEUE: Currently processed thisevent objects and their values as well as events that are still in the queue.
  • USAGE: The number of created objects, modules and identifiers and the size of the memory that is used by the rule interpreter and for string transfer.
  • MEMORY: Memory usage as far as it can be detected by the IDM.
  • SLOTS: Hints about IDM objects that have not been correctly released.
  • VISIBLE OBJECTS: A list of the visible objects and their respective values.

In order to keep the output to a minimum, this is usually displayed in a shortened form. Generally, IDM strings (in "…") are always shortened to a maximum of 40 characters. Their entire length is attached in [ ]. Byte size information is given in kilo, mega or gigabytes (k/m/g).

Definition

Since IDM version A.05.02.g:

void dumpstate
(
  {   anyvalue Filename input
  { , enum     State    := dump_error input } }
)
void dumpstate
(
  { { anyvalue Filename input, }
      enum     State    := dump_error input }
)

Up to IDM version A.05.02.f4:

void dumpstate
(
  enum State input
)

Parameters

anyvalue Filename input

File to which the status information is written (optional parameter, available since IDM version A.05.02.g).

Default value: When the parameter is missing, the status information is output to the trace or log file.

Up to and including IDM version A.05.02.f4 the output is always written into the trace or log file.

enum State := dump_error input

This parameter influences the sections of the status information that are output (optional parameter).

Since IDM version A.05.02.g this parameter is optional. When it is missing, the default value dump_error applies.

Value range

dump_all

All sections are written out in an abbreviated form.

This corresponds to the output in case of a FATAL ERROR.

dump_error

The sections ERRORS, CALLSTACK and EVENTS are written out in an abbreviated form.

This is the normal output in the case of EVAL ERRORS.

dump_events

The sections THISEVENTS and EVENT QUEUE are written out in full.

dump_full

All sections are written out in full.

dump_locked

The section SLOTS is written out in full. In addition, for locked objects their attribute values are written out.

dump_memory

The section MEMORY is written out in full.

dump_none

No action (nothing is written out).

dump_process

The section PROCESS is written out in full.

dump_short

All sections (excluding SLOTS) are written out in an abbreviated form.

dump_slots

The section SLOTS is written out in full.

dump_stack

The section CALLSTACK is written out in full.

dump_usage

The section USAGE is written out in full.

dump_uservisible

The section VISIBLE OBJECTS is written out in full for all visible top-level objects including their children, the pre-defined and user-defined attributes.

dump_visible

The section VISIBLE OBJECTS is completely written out.

The output of the dumpstate also can be triggered with the interface function DM_DumpState, as well as through the command line options ‑IDMdumpstate and ‑IDMdumpstateseverity <string>.

Example

dialog D

window Wi
{
  .title "dumpstate()-example";

  edittext Et
  {
    .content "66";
    .xauto 0;

    on deselect_enter
    {
      variable string Content := this.content;
 
      if fail(Pg.curvalue := atoi(Content)) then
        print "Conversion errror!";
        dumpstate(dump_error);
      endif
    }
  }

  pushbutton Pb
  {
    .ytop 33;
    .text "dump objects";

    on select
    {
      dumpstate(dump_visible);
    }
  }

  progressbar Pg
  {
    .yauto -1;
    .xauto 0;
  }

  on close
  {
    exit();
  }
}

Availability

IDM versions A.05.01.g3, A.05.01.h, since A.05.02.e

See also

Chapter “Dumpstate (Status Information)” in manual “Development Environment”