Free Idea Internal Resources
Forums
hi Brian
I have a program that creates some databases and delete them while the script is running, the script loops few hundred times until it finishes.
somewhere along the execution path the script crashes, in different places, with Idea internal error message. The reason I think it is resources not freed correctly issue is because when I restart the PC I can progress from a saved point to the next crash and so on until the script reaches not so safely the promised land.
I am searchiing of course where exactly I forgot to set an object to Nothing or something similar, But until I find the bug, is there a way to clear all Idea resources so the next round will not require a complete PC restrt
Thanks a lot and have a wonderful day
Avi Kerem
Thanks for your answer Brian
Thanks for your answer Brian
I am specuating that this is a case of databases being overwritten and not deleted first.
In order not to overflood the system after few hundreds loops' I simply overwrite those previous loop generated databases which are not needed anymore by using the same names in the next loop
I am going to try this theory by explicitely DeleteDatabase() instruction before using the same name again
I hope it will solve the problem
Have a great day
Avi Kerem
A Brief History of Ideakind
A Brief History of Ideakind
After I got a shiny new, never used before, clean and fresh installation of Idea version 10 and Idea was still happily crashing as before, I decided to look seriously into the problem.
First, I noticed that the first crash is not random at all, it occurs exactly at round 64 of the loop
Still looking for exhausted Idea resources I decided to question my assumption that at every round of the loop all databases are new (IE without any recollection of their gruesome past history) either because they were deleted explicitly or because they have been overwritten
I found that the following code does not work as I expected
1 Set task = Client.ProjectManagement
2 task.DeleteDatabase "ResultsDB" & ".IMD"
3 Set task = Nothing
4 client.CloseAll
5 Set task = Client.ProjectManagement
6 task.RenameDatabase "UpdatedResultsDB" & ".IMD", "ResultsDB" & ".IMD"
7 Set task = Nothing
One may think that in line 2 of the above code the history of "ResultDB" database is removed when
the database is removed
If you think that this is the case you may be surprised to learn that
When the code crashes at round 64, the history of the ResultsDB database has 720 building blocks (a building block is elementary script function such as join, summarize, extract, new field,
New/modify/remove field, etc.)
The timestamp of these elements shows that they survive all generations of
ResultsDB database even after they have been removed and another database proudly inherited their name.
Well - this may be a known well documented and perfectly explainablefeature of Idea - but then my original question is how can I really remove databases and safely reuse their name without having to carry their previous lives history.
Again - There may be no bug at all, just a question on reuse of database names.
Kind Regards,
Avi Kerem
gladly
With pleasure
Since this is a script for computing moving average I will just organize it a bit and I will trim considerably the size of the single input database requires by the script on day 0
the loop is set for 100 rounds (in the i-th round the script computes for each stock item the moving average for day i)
in my case the script crashes when i = 64 and each relevant databases history size at that point is 720
Thanks a lot Brian for your help!
Avi Kerem
Dear Avi,
Dear Avi,
Greetings for the day.
We are also trying to develop a running average calculation for Inventory.
It will be really helpful if you could share your script as a reference. We have tried multiple iterations in our script, it fails most of the time when multiple combination of Inventory item is tested.
I possible requesting you to please mail the script at b7shobhit@gmail.com.
Regards,
Shobhit
Hi Avi,
Hi Avi,
Actually just last week I had somone with a similar problem and it turned out that there were variables defined on the same line such as:
Dim i, j as integer
In theory this should work but there is a bug in IDEAScript where only the last variable is defined properly. If you have anything like this make sure you only have one variable per line:
Dim i as integer
Dim j as integer
Once I made the change everything worked fine. In their case they were looping through all the fields of a large file and it would crash around field 400 but then you could start it up and it would continue with the rest so it sounds similar to your problem.