[MAIN] [News] [Intro] [Features] [Download] [Installation] [Support] [Support+] [Docu] [Tutorial] [Bugs] [forum ] [wiki] [Mirror] [Authors] [Future] [License] [Win98 Setup Bug] [Subscribe] |
Bug DescriptionThe following example:sub test(a) undef q print a end sub q[1] = 1 test q[1]Causes memory fault. Bug Reason, What Causes the BugWhen ScriptBasic passes global variables to function it creates a reference variable that references the original variable. This means that changing or accessing the argument changes or accesses the global variable. In the example the argument a is the same as q[1]. When the subroutine undefines the array of which the first element in the example is passed to the function by value the argument variable a still references the original location of q[1] which is at this time is already released and is not a valid memory location.SolutionThere is no other solution than to wait for the next available release. The bug correction requires deep reorganization of ScriptBasic internal variable handling.Bug Workaround Until Solution is AvailableDo not undef any global variable in functions.AcknowledgementN/A |