last revised 01/05/2006
Reporting Error Position in the OASIS File
When an OASIS read error is triggered the error message is set and the corresponding error number is returned to the client. If the byte count from the start of the offending record to the byte where error occured is known, then following message is appended to the error message.
"Record starts at file offset _FILE_OFFSET_. Record bytes are byte1 byte2..."
is the offset in the file where error occured. This offset is the offset in the real OASIS file if error is trapped in scan mode. This offset is the combined offset of the real OASIS and uncompressed CBlocks if error is trapped in load mode.
are the bytes in HEX from the start of the record till the offset where error occured.
To any of the error messages incurred while reading the magic-bytes sequence
"Action - While reading <magic-bytes> sequence."
If the magic-bytes sequence is missing then the following error message is issued:
OASIS <magic-bytes> element is missing. File is not a valid OASIS format.
To any errors incurred while reading/parsing the START record the following error message is appended:
Action - While reading START record.
If the START record does not follow the magic-bytes specified then following error message is issued:
START record does not immediately follow <magic-bytes> sequence.
If value of the unit param in START record is found to be negative then following error message is issued:
Unit specified in the START record cannot be negative.
If value of the unit param in START record is found to not to be a number (i.e. it should be a double real) then following error message is issued:
Unit specified in the START record cannot be NAN[not a number].
The following error is not reported since OASIS reader does not rely on its presence:
If offset is nonzero and the table is flagged as strict, the presence of a 'stray' record of that type located discontiguosly from its tabular group and any records which fail to use reference number access for that class of objects.
If a PAD record is encountered before the START record this means either:
PAD records after END record are ignored the QIS OASIS reader.
Whenever a record refers to a modal variable which has not been defined
Syntax/Semantics Error: Modal variable undefined. (MODAL_VARIABLE_NAME)
MODAL_VARIABLE_NAME is one of the following:
The END record is used by OASIS reader when the table offset is part of the END record. The END record consists of the last 256 bytes of the OASIS file.
If the start record indicates that the table offset is located in the END record then the parser expects to find an END record at the position [file size = 256] because the END record is 256 bytes in length. If it doesn't find the END record where expected the following error message is produced:
END record not found at filesize - 256 offset.
If the reader could not get to the END record (due to a file IO or memory error) then a memory error or file IO error is generated and the error message END record not found at filesize - 256 offset is appended to the IO or memory error.
If number of bytes returned after decompression does not match the uncomp-byte-count parameter in CBLOCK record then following error is issued:
Uncompress Error: Corrupt CBLOCK found. CBLock decompressed bytes does not match the param uncomp-byte-count.
If a CBLOCK record is nested within another CBLOCK record then following error message is issued:
CBLOCK record cannot be nested in another CBLOCK record.
There are 26 different "types" of CTrapezoids and they have different geometric constraints. The parser checks the type against the basic geometry and returns an error if there is a mismatch.
If the ctrapezoid type specified is out of the range [0-25]
CTrapezoid type specified is out of range [0-25].
If one of the types [0-3] has width less than height(w<h)
CTrapezoid type 0-3 cannot have width less than height.
If one of the types [4-7] has width less than 2*height(w<2h)
CTrapezoid type 4-7 cannot have width less than twice the height.
If one of the types [8-11] has height less than width(h<w)
CTrapezoid type 8-11 cannot have height less than width.
If one of the types [12-15] has height less than 2*width(h<2w)
CTrapezoid type 12-15 cannot have height less than twice the width.
If one of the types [16-19, 22-23 and 25] has height specified
CTrapezoid type 16-19, 22-23 and 25 cannot specify height.
If one of the types [20-21] has width specified
CTrapezoid type 20,21 cannot specify width.
Zero Area Trapezoids
CTrapezoids's are not checked for zero area and are not reported as errors.
If a trapezoid has deltas(non-parallel edges) such that they form an invalid trapezoid
Trapezoid deltas are invalid causing non-parallel edges to cross or not to fit in the bounding box.
Trapezoid's are not checked for zero area and are not reported.
If a polygon has fewer than 3 vertices
Polygon cannot have less than 3 vertices.
The following errors are not checked or reported:
Polygons with zero-area regions
a path may not have less than 1 vertex
Path should at least have 1 vertex.
If a rectangle is flagged as a square (S=1) a height may not be specified. If it is:
Square rectangle cannot specify height.
Rectangle's with zero area are replaced with width and height = 1 database tick.
If a text reference number does not point to a valid TEXTSTRING record
TEXT reference number REFNUM does not have corresponding TEXTSTRING record.
REFNUM is the reference number specified in TEXT record.
If an invalid reference number with no corresponding CELLNAME is encountered in PLACEMENT record
Use of reference number with no corresponding CELLNAME record is not permitted in PLACEMENT record. Action: While calculating extents.
The above message is trapped at the end of scanning phase, while calculating extents.
Recursive Cell References are not reported. (this will be dealt with in the near future ...)
If the magnification value is negative or zero
Magnification specified in the PLACEMENT record cannot be negative or zero.
If the magnification or angle value is NAN
Magnification specified in the PLACEMENT record cannot be NAN[not a number].
Angle specified in the PLACEMENT record cannot be NAN[not a number]
References to External Cell Definitions?
The OASIS specification allows placement references to external CELL records which are not defined in the file being read. QIS does not support this and treats such references as if the cell is undefined.
If an invalid reference number with no corresponding CELLNAME is encountered in CELL record
Use of reference number with no corresponding CELLNAME record is not permitted in CELL record. Action: While calculating extents.
The above message is trapped at the end of scanning phase, while calculating extents.
Multiple cell records referering to the same cell name are not reported. In the current version, all the data belonging to all the data defined by the same cell name is grouped. (this is probably not the best behavior!)
If two TEXTSTRING records in the same file with the same reference number but different text strings are encountered
Two TEXTSTRING records with the same reference but different names encountered [TEXTSTRING1, TEXTSTRING2].
TEXTSTRING1 and TEXTSTRING2 are the text strings which refer to the same reference number.
If two TEXTSTRING records in the same file with the same text string but different reference numbers are encountered then nothing is reported.
If both the record types 5 (Implicit) and 6(Explicit) appear in the same OASIS file
The appearance of TEXTSTRING records 5 and 6 is not permitted.
Cell name associates a cell's name with a unique number so that references to that cell are compact. There are two distinct approaches to assigning the unique reference number - implicit (essentially automatic based on the order the cells are defined) and explicit which assigns the number directly. You cannot have both types of CELLNAME records in the same OASIS file.
If two CELLNAME records are encountered in the same file with the same cell name but different reference numbers
Two CELLNAME records with the same name but different references encountered [CELLNAME].
CELLNAME is the cell name which is repeated with different reference numbers.
If two CELLNAME records in the same file with the same reference number but different cell names are encountered
Two CELLNAME records with the same reference but different names encountered [CELLNAME1, CELLNAME2].
CELNAME1 and CELLNAME2 are the cell names, which refer to the same reference number.
If a CELLNAME record of type 3 (Implicit) and one of type 4(Explicit) appear in the same file
The appearance of CELLNAME records 3 and 4 is not permitted.
OASIS Data TypesPoint-lists
If a polygon point list type is out of range[0-5]
Polygon point-list type is out of range[0-5].
If a path point list type is out of range[0-5]
Path point-list type is out of range[0-5].
If the real type is out of range[0-7]
Record real value type is out of range[0-7].
If denominator specified as part of the real number is zero for types [2-5] then following corresponding error message is issued
Record real value, type 2, divide-by-zero exception. Record real value, type 3, divide-by-zero exception. Record real value, type 4, divide-by-zero exception. Record real value, type 5, divide-by-zero exception.
If a repetition type is out of range [0-11]
Record repetition type is out of range[0-11].
If a repetition type 0 is first repetition type used within a cell
Repetition type 0 cannot be the first repetition type used within a cell.
If the g-delta type(formed by first 3 bits) is not a valid type
Record delta-g type is out of range[0-7].
Unused Record Types
The following record types are not displayed or otherwise processed by the QIS engine so, except for problems with modal variables, there is no checking of potential fatal errors.CIRCLE, XNAME, XELEMENT, XGEOMETRY, PROPERTY, PROPSTRING, PROPNAME
The OASIS reader parses these records but logical errors enumerated below are not reported and OASIS reader ignores all these errors.
PROPERTY (error will not be reported)
Invalid reference number for which there is no corresponding PROPNAME record
PROPSTRING (error will not be reported)
Two PROPSTRING records in the same file with the same number but different names
The appearance of both record types 9(implicit) and 10(explicit) in the same OASIS file
PROPNAME (error will not be reported)
Two PROPNAME records in the same file with the same number but different names
Two PROPNAME records in the same file with the same name but different numbers
The appearance of both record types 7(implicit) and 8(explicit) in the same OASIS file
ARTWORK CONVERSION SOFTWARE, INC. Company Profile
417 Ingalls St., Santa Cruz, CA 95060 Tel (831) 426-6163 Fax 426-2824 email: email@example.com