Error Messages

From Pengower
Jump to: navigation, search

There are a number of error messages you may come across, detailed are some of the common causes.

Error when regenerating application lists

The following steps should prevent the error from occuring:

1) Select configuration 'Demo - Internal'

2) Select your application and then regenerate

3) Switch back to 'Demo'


Event Log Errors

You will often find better error messages in the Pengower event log than what you see on screen: Sometimes you just get an Exception to the screen, but in the Event Log you will find an underlying problem. Below are some common errors in the event log and some common causes.


Length cannot be less than zero

Script Error in action 'e.g Notification Policies', name of Application
System-Execute, Message:Length cannot be less than zero.

This is usually caused by a missing right-hand {{]}} from an assignment, for example:

Set npArr = org["Notification Policies_"

instead of

Set npArr = org["Notification Policies_"]


Object reference not set to an instance of an object

System-Execute, Message:Object reference not set to an instance of an object., Command:165

This can be caused by several different things, here are some;

  • You forgot to put the word Set in front of a variable assignment
  • You are calling another script with Do Run Script and the called script does not set Output to anything. This will fail even if you do not try to use the Output - even if you don't assign the result from Do Run Script to a variable!


Unhandled Error During Script Execution : The process cannot access the file "{0}" because it is being used by another process

You may get this if:

  • You have a form which allows a user to upload a file
  • You have some action script which accesses the file
  • You return the form to the user, maybe because the validation failed

The way to deal with it is to set the {{frm["File Element"] = {} }}.

Counter intuitively, this does not actually blank out the field on the form and the file will still be there when you return it to the user.

Sample:

Set frm = Current_Form
Set fileArr = frm["Import File"]
Set file = fileArr[1]

// Need to do this to stop errors when returning to form with attachments
Set frm["Import File"]	= {}

//Checking the headers
Set line = Do Read Line Params File = file
If line = "#EOF"
	Report = "<span style='color:red'>The import file is empty</span>"
	Output = frm
	Return_Ok
EndIf


System-Execute, Message:Item has already been added

System-Execute, Message:Item has already been added.  Key in dictionary: "Web.ImgClaimButtonNormal"  Key being added: "Web.ImgClaimButtonNormal"

This indicates a duplicate element has been added to a type. Although you get away with adding the duplicate Element certain actions on the Type will subsequently fail.

In this case I was able to select an Item from the Type and save it to a relationship on a form but got this error when trying to access a Relationship to another Type.


System.OutOfMemoryException

This will normally take the whole installation down and requires you to recycle the app pool

There are unfortunately no hard and fast rules with OutOfMemory issues.


We know that there is a bug in the script engine such that if you write

Set num = Do Round Params Value = num, Dps = 2
Set n = 0 + num

you will get an OutOfMemory error - the issue here is the use of the same variable as an argument and result of a Do command - the delayed execution means it ends up in an endless recursive loop and consumes everything in sight!


But other than that it is simply down to the amount of resource required to manage the objects. The main issue with an array of Entities in script is that the full Entity is loaded into the internal variable that is then stored in the array - if the object is large, with many elements and many relationships then the amount of memory required per Entity can get large. The key thing that we have found is to keep relationships to a minimum - use referential pointers such as ids instead - if you have objects where you will need to manipulate large arrays of them in one chunk. Or break the processing up into sections based on date id etc so that each array is smaller to handle.


One other thing we have done on a couple of occasions is to use a file to store quasi static data once it has been collected. In the survey tool we collect answers into answer objects but once the survey is completed we process these down into a file linked to the response - so stopping the growth of the answer type and thus hampering performance.


SS-F-INSFMEM, Insufficient dynamic memory

The database does not restart because for some reasons the server process run out of memory during the restart phase:

26 May. 2011 11:01:01 SS-F-INSFMEM, Insufficient dynamic memory

After restoring a backup, the database server must rebuild the persistent object table and needs some memory to create an intermediate table in-memory.

How many objects in the database?

First, you could try to reduce the cache size to 128M and try again.

We would need the datafile and config file to reproduce the problem in house. Any chance you could zip the datafile and config file and put it in location where we could upload it?

The workaround would consisting in restoring the database on a 64-bit machine with Matisse x64 - 64-bit edition - and then copy the datafile and configuration file onto your machine running Matisse x32 - 32-bit Edition.

Style Import Issues

Occasionally during the style import process you will receive an error indicating the style import has failed. This is due to elements present within your style xml that are not being used and thus the import cannot find them.

There are two cases in which this can happen:

  1. listButtonText_Font, workFormAsterix_Font and toolButtonHoverColour_Font are present.
  2. tabUnSel_Colour, workButtonTextColourWhenNotOnForm_Font and image_Padding are present.

In either case removing the 3 relevant lines corrects the issue.