Title:
function call structure creation occasionally executes before the line in code is run
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/CannotReproduce
Reporter/Name(from Bugbase): Aaron Shurmer / Aaron Shurmer (Aaron Shurmer)
Created: 10/11/2012
Components: Core Runtime
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Major / Very few users will encounter
Locale/System: English / Windows 7 64-bit
Vote Count: 0
Problem Description: calls to functions occasionally precompile the arguments before the line is called in code. this is specific to arguments that are structures being set up on the function call, so:
emailMessageBody = server.KonstrukFunctions.JREReplace( Text = this.EmailConfirmationBody, Pattern = '<img src="http://[^/]*/Admin/img/dynamic/image.cfm\?objectid=([^"]*)" />', Target = getRowContent, Scope = "all", AdditionalData = { this = this, stdata = attributes.stdata, rows = application.OS.aGet( this.arows ) } );//"
this will throw an error if attributes.stdata is not defined.
where it gets wierd is that no matter what you do prior to the line it will still throw the error. defining the variable has no effect, even abort; throw; exit; / etc have no effect, it still attempts to create the attribute AdditionalData structure prior to runtime execution of the line in question. Commenting out the line allows the preceeding aborts / etc to be executed.
Steps to Reproduce:
hard as there seems no rhyme nor reason to when the precompile of the structure is done, there must be a specific set of rules around when precompile occurs? when the problem does occur, it's reproducable every time you execute, but it's VERY rare that it happens - almost makes me think this is a problem with some code optimization in the compiler or some such.
Actual Result:
tries to create the function attribute AdditionalData = { this = this, stdata = attributes.stdata, rows = application.OS.aGet( this.arows ) } before the lines of code preceding it are executed - even throw and abort are ignored prior to the line.
Expected Result:
lines of code bore getting executed
Any Workarounds:
commenting out the line will allow the code before to execute, also, taking out the function call structure creation and instead passing it a variable containing the structure fixes it, aka:
temp = { this = this, stdata = attributes.stdata, rows = application.OS.aGet( this.arows ) };
emailMessageBody = server.KonstrukFunctions.JREReplace( Text = this.EmailConfirmationBody, Pattern = '<img src="http://[^/]*/Admin/img/dynamic/image.cfm\?objectid=([^"]*)" />', Target = getRowContent, Scope = "all", AdditionalData = temp );//"
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3345255
Deployment Phase: Release Candidate
External Customer Info:
External Company:
External Customer Name: AaronShurmer
External Customer Email:
External Test Config: My Hardware and Environment details:
windows 7
Attachments:
Comments: