Vision Error Messages
Syntax Errors
A Syntax Error occurs when you try to execute a Vision expression that is not formulated correctly. For example, the following expression does not supply a parameter to the + message:
3 +If you execute this expression, you should get the error message:
>>> 'syntax error' near source line 2, character 9 <<< 3 + ** ^Since Vision was expecting a value following the + message and none was provided, you are informed that you have made a syntax error. Vision tries to identify where the error occurred and provides an indicator arrow (i.e., the ^ symbol) in the area where the problem was first identified. In this case, the arrow points to the area directly after the + message. Execution is terminated as soon the first syntax error is encountered.
Several other mistakes will produce syntax errors. For example, the expression:
2 + 7 . printproduces the error:
>>> 'syntax error' near source line 1, character 12 <<< 2 + 7 . print ** ^because you cannot use the . character to terminate a binary message. A syntax error is generated if you send a literal (i.e., a number, string, block, or magic word) to another object, since literals must be the first object in an expression. For example, the expression:
2 2produces the error message:
>>> 'syntax error' near source line 1, character 8 <<< 2 2 ** ^The expression:
2 "xxx"produces the error message:
>>> 'syntax error' near source line 1, character 8 <<< 2 "xxx" ** ^The expression:
2 [ ]produces the error message:
>>> 'syntax error' near source line 1, character 4 <<< 2 [ ] ** ^The expression:
2 ^selfproduces the error message:
>>> 'syntax error' near source line 1, character 4 <<< 2 ^self ** ^You will generate a syntax error if you execute a program that has a mismatched number of quote characters. For example, the expression:
"this is a string that never ends.produces the error message:
>>> 'End of File encountered in String' near source line 2, character 38 <<< "this is a string that never ends. *^ >>> 'syntax error' near source line 2, character 38 <<< "this is a string that never ends. *^You will also generate a syntax error if you do not have the appropriate number of closing parentheses or brackets in your program. For example, the expression:
[ 2 + 2 ;produces the error message:
>>> 'syntax error' near source line 2, character 11 <<< [ 2 + 2 ; ** ^Since the set of magic words is fixed and internal to Vision, you will generate a syntax error if you try to use an unknown magic word. For example, the expression:
^cur gm salesproduces the error message:
>>> 'Unrecognized magic word '^cur'' near source line 1, character 4 <<< ^cur gm sales ** ^You will also receive a syntax error if you have a keyword message as the initial message in an expression. For example:
defineMethod: [ | x | "This is a method at ^current" ] ;produces the error message:
>>> 'syntax error' near source line 1, character 13 <<< defineMethod: [ | x | "This is a method at ^current" ] ; ** ^You must send binary and keyword messages to a named object or a literal (i.e., a number, string, block, or magic word).
Selector Not Found Errors
A Selector Not Found error occurs because you have asked Vision to execute a message that is not defined. For example:
"This is a string" + 5This expression produces the error message:
>>> Selector '+' Not Found <<< NAWhen you ask Vision to add 5 to a string, Vision complains because the addition message is not defined for strings. The Selector Not Found response identifies the specific message that Vision could not perform. In this case, the message identified is +. Execution is not terminated when a selector is undefined. The result of applying an undefined selector to an object is the value NA.
When you are using named blocks, you can generate a variation on the selector not found message if you do not provide the correct number of parameters to a block. For example:
!block <- [ | sampleP1: a P2: b | "Parameter 1: " print ; a printNL ; "Parameter 2: " print ; b printNL ; ] ; block valueWith: 10produces:
>>> Parameter 'a' Unavailable <<< Parameter 1: NA Parameter 2: 10Notice that the value NA was substituted for the missing parameter and the program execution continued.
Fatal Vision Errors
A fatal Vision error is indicated by output in the form:
>>> Error Trapped By Read-Eval-Print <<< * Utilities [132] * 'malloc' Error * Private Memory Allocation Error Size: 3255252408, Details: Not Enough SpaceWhen a fatal error is encountered, the current execution is aborted. Your Vision session will remain active, but you will not be able to commit any saves if your session encounters a fatal error. Depending on the nature of the error, you may be able to continue working in your session; however, it is normally best to restart your session as soon as possible.
In general, Memory Allocation and Map Segment errors indicate that your session has exceeded available system resources.
Following are examples and descriptions of some of the fatal errors you can encounter, grouped by category (displayed in the second line after Error Trapped By Read-Eval-Print in the error message):
- System Faults
- Segmentation Faults, Interrupts, Container Framing Errors
- Malloc Errors
- Internal Inconsistencies
- Memory Manager Errors
- Unknown UVector RType Errors
- Usage Errors
System Faults
Segmentation Faults, Interrupts, and Container Framing Errors
Malloc Errors
- the tuning parameter VisionMappingLimit could be lowered; that will raise the probability that enough space will remain in the private data area of the process
- the second approach would be to examine and optimize the vision code
If the Details: section reads "Resource temporarily unavailable" instead of "Not enough space", then a system resource has been exhausted; typically the resource is swap space.
Internal Inconsistencies
For example, if an Entity instance was deleted and Security instanceList was then accessed in a list operation, you would get the error. To avoid the error, after the deletion run a cleanSpace for the Entity class object space and that will align all subclasses in that space.
In releases prior to 6.1.1 the only alternative is to save the newly created class prior to the IndexedList update. In release 6.1.1 and above you are able to establish a forward residency of the new class upon creation and therefore avoid the transient store error. Please see Vision Release 6.1.1 Notes for more information on establishing residency for new classes.
In most cases, an extended object used as an index is a mistake. You should strip all extensions prior to the IndexedList update by sending the message asSelf, otherwise the index lookup will fail (i.e. return NA).
Memory Manager Errors
For persistent spaces (not 0) this means that, over time, containers have accumulated in the space. This may be because cleanup/garbage collection is not being run in a timely fashion or it may be that updates to data are very poorly clustered.
Unknown UVector RType Errors