Fix: RPL, corrected error handling: using an OBJECT expression for a TableSlot column index [5503] Bug Number: 5503 Release notes (y/n): y For Release Nums: 6.5 [Patrick assisted in the analysis and solution approach for this bug]. I wasn't able to reproduce the assertion failure and crash. But the problem was clear. We somehow got to a place in code where we really didn't expect to get to; this case is prevented with higher-level checks. But somehow, we did get there. The error handling in that spot was mis-coded: returning a SUCCESS (false) indication and allowing the primary return result (an index integer) to remain un-initialized after detecting the error and forcing an assertion failure. [This is in method ObjSlotLookupExpr:: getColumnIndex(...)]. I recoded the error case -- a RPL expression provided as a column index to a TableSlot being of an unsupported RPL expression type -- to generate an appropriate error message and return a FAILURE (true) indication. (In the failure/crash scenario, an OBJECT type is encountered, which cannot be used as a TableSlot column index). A trivial bug model I created to test this bug (bug5503.mdl.gz, RiverWare 6.4.9) has an Initialization rule defined as: 1: FOR ( DATETIME t IN @"Start Timestep" TO @"Finish Timestep" ) DO 2: DataObj1.AggSeries [ t, 1 ] = DataObj1.Series [ t ] 3: END FOR 4: %"Reach1" . "Outflow" [ @"Start Timestep" ] = 100.000 "cfs" 5: %"Reach2" . "Outflow" [ @"Start Timestep" ] = 200.000 "cfs" I attempted to create the error case by copying either the %"Reach1" or %"Reach2" expressions, and pasting that over the '1' column index in the assignment statement inside the FOR statement. Doing so generates this warning: "Type mismatch between selection and paste buffer. The resulting Rule will be invalid. Are you sure you want to paste?" [Yes] [No]. Clicking yes, and running the model catches the problem at a higher level -- i.e. it doesn't get to the failure/crash code indicated in the bug report. I tested the message generation by (temporarily) causing the error to be (falsely) detected during a valid TableSlot lookup. Here is the generated message: Context: RULE: Rule Message: Evaluation of the left-hand side of the Assignment statement failed for the following reason(s): The specification's type {NUMERIC} used as a column index for slot "DataObj1.AggSeries" is not valid for TableSlots. This occurred at the following location within the expression: $ "DataObj1.AggSeries" ["t", 1.00000000]. (This jury rigged message is reporting a valid state as an error -- just to test the error message generation code). ---