PhilRobert Report post Posted 03/16/2004 06:26 PM Here's what I do : First of all, the script runs a main query which retrieves 199 rows from a database. After that, the script inserts one row into another table for each row that have been retrieved by the main query. It looks like this: [Execute_Main_Query] (199 rows retrieved from database 1) [init_Var1] (Var1=1) [Validate_Next_Record] (if Var1<= Execute_Main_Query_RowCount) Validate_Next_Record is TRUE : [save_To_DB] (inserts one new record into database 2) [increment_Var1] (Var1=Var1+1) [Goto Validate_Next_Record] Validate_Next_Record id FALSE : [Hangup] After exactly 130 loops, the [increment_Var1] module does not seem to increment the variable anymore... Instead, the variable value becomes "130+1" when it should be 131... I've attached to this post a copy of the script, a copy of the databases used and the log files that have been generated by VG. Here's a piece of the whole log, demonstrating where the problem occurs : [save_Msg_To_DB] DB Query 130135,48 8 db Jet mode used (To use ODBC mode specify ODBC Connect string) 130135,48 8 RVreplace start: [insert into telMessages values('$RV[Msg]',$RV[search_Employees_1_$RV[Cpt]])] 130135,48 8 RVreplace end: [insert into telMessages values('C:\test_VoiceGuide.wav',3554)] 130135,48 8 db About to execute a Modify type operation [insert into telMessages values('C:\test_VoiceGuide.wav',3554)] 130135,50 8 db Modify operation returned OK 130135,50 8 rv add [save_Msg_To_DB_RowCount]{1} 130135,50 8 TimeoutClear 130135,50 8 [increment_Cpt] Evaluate [$RV[Cpt]+1] 130135,50 8 RVreplace start: [$RV[Cpt]+1] 130135,50 8 RVreplace end: [129+1] 130135,50 8 .Eval(129+1) 130135,50 8 AddRVns [increment_Cpt_Input]{129+1} 130135,50 8 AddRVns [increment_Cpt]{130} 130135,52 8 AddRVns [Cpt]{130} 130135,52 8 Eval Expr result:[130] stored in $RV[Cpt] 130135,52 8 path {130} not found 130135,52 8 TimeoutClear 130135,52 8 [Validate_Next_Record] Evaluate [$RV[Cpt]>$RV[search_Employees_RowCount]] 130135,52 8 RVreplace start: [$RV[Cpt]>$RV[search_Employees_RowCount]] 130135,52 8 RVreplace end: [130>199] 130135,52 8 .Eval(130>199) 130135,53 8 AddRVns [Validate_Next_Record_Input]{130>199} 130135,53 8 AddRVns [Validate_Next_Record]{Faux} 130135,53 8 Eval Expr result:[Faux] 130135,53 8 path {Faux} not found 130135,53 8 TimeoutClear 130135,53 8 [save_Msg_To_DB] DB Query 130135,53 8 db Jet mode used (To use ODBC mode specify ODBC Connect string) 130135,53 8 RVreplace start: [insert into telMessages values('$RV[Msg]',$RV[search_Employees_1_$RV[Cpt]])] 130135,55 8 RVreplace end: [insert into telMessages values('C:\test_VoiceGuide.wav',3555)] 130135,55 8 db About to execute a Modify type operation [insert into telMessages values('C:\test_VoiceGuide.wav',3555)] 130135,55 8 db Modify operation returned OK 130135,55 8 rv add [save_Msg_To_DB_RowCount]{1} 130135,55 8 TimeoutClear 130135,55 8 [increment_Cpt] Evaluate [$RV[Cpt]+1] 130135,56 8 RVreplace start: [$RV[Cpt]+1] 130135,56 8 RVreplace end: [130+1] 130135,56 8 .Eval(130+1) 130135,56 8 AddRVns [increment_Cpt_Input]{130+1} 130135,56 8 AddRVns [increment_Cpt]{130+1} 130135,56 8 AddRVns [Cpt]{130+1} 130135,56 8 Eval Expr result:[130+1] stored in $RV[Cpt] 130135,56 8 path {130+1} not found 130135,58 8 TimeoutClear 130135,58 8 [Validate_Next_Record] Evaluate [$RV[Cpt]>$RV[search_Employees_RowCount]] 130135,58 8 RVreplace start: [$RV[Cpt]>$RV[search_Employees_RowCount]] 130135,58 8 RVreplace end: [130+1>199] 130135,58 8 .Eval(130+1>199) 130135,58 8 AddRVns [Validate_Next_Record_Input]{130+1>199} 130135,58 8 AddRVns [Validate_Next_Record]{130+1>199} 130135,58 8 Eval Expr result:[130+1>199] 130135,59 8 path {130+1>199} not found 130135,59 8 TimeoutClear 130135,59 8 [Validate_Error] Evaluate [bError] 130135,59 8 .Eval(bError) 130135,59 8 AddRVns [Validate_Error_Input]{bError} 130135,59 8 AddRVns [Validate_Error]{bError} 130135,59 8 Eval Expr result:[bError] 130135,59 8 path {bError} not found 130135,59 8 TimeoutClear 130135,59 8 [Error_Occurred] Playing 130135,61 8 tts generate start[Error] 130135,61 8 ERROR 5.2.1010 RunModule:0:-2147417848:Erreur Automation L'objet invoqué s'est déconnecté de ses clients. :VoiceGuide 130135,61 8 rv add [Hangup Time]{2004-03-11 13:01:35} 130135,61 8 Hanging up call... [RunModule Error] test_evaluate_module.zip Share this post Link to post
SupportTeam Report post Posted 03/16/2004 10:42 PM Thank you for all the files - I have ran the script and been able to reproduce the same error - at this stage it looks like the error is more linked to the number of tight loops that the script is taking and not actually in the Evaluate Expression module itself. We will now keep on looking into this further and should have an answer for you today. Must say I've never seen a script go though so many (few hundred) tight loops around a DB Query module - have you thought of doing this copying of a table in a single VB Script module instead? It will be a lot faster then looping though a DB Query module - a DB Query module after all has to open & close a database connection each time it is ran - so your script right now is doing a few hundred database connection opens+closes and this all will take some time... All up you can see that on your current computer it would take about 10 seconds for VoiceGuide to go 200 times through your loop of the two Evaluate Expression modules and a DB Query module... Share this post Link to post
SupportTeam Report post Posted 03/17/2004 08:48 AM Have fixed the limitation which was resulting in the line being hung up if the script goes into an extended 'wild' loop - such as what basically happened in the above scenario when the script is going through a loop of a few modules for a few hundred times. Please update your v5.2.1 installation with the attached .exe Have tested the new .exe using the script & databases supplied in original post (thanks for that again, that really helped debug the situation quickly) and all the retrieved rows were added correctly to the new table, and the TTS message was then played. It is important to note that this limitation was only happening when an apparently out of control ‘wild’ loops were happening – there was never any limitation on how many times you can go through a loop if using ‘normal’ call progression with modules which play/record sound files and/or expect input from caller. VgMulti_5.2.1014.zip Share this post Link to post
PhilRobert Report post Posted 03/18/2004 02:25 PM Thanks a lot for the help... It's true that a single vb script would probably be a better way to do this. Since my schedule is a little tight, I might not have time to try this up now but I will give a good look at it later. Thanks for the advice = ) Share this post Link to post