Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Failed to allocate memory V2
Hey peeps!
I have this code that I made and I'm having trouble because after it runs for several times I get this error that it failed to allocate memory.
My code is kinda simple but it's pretty heavy.
Can anyone help me with this problem?

Function test
Copy      Help
,out "inicio-uma"
,str tempBRA tempBRAfinal tempBRAformat
,str fBRAE="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempBRA.csv"
,str fBRAT="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempBRAf.txt"
,HtmlDoc dBRA
,str sBRA=dBRA.GetText
,ExcelSheet esBRA.Init("tempBRA" 8 "S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempBRA.csv");err
,tempBRAfinal.format("%0.2s" tempBRA)
,tempBRAformat=F"{tempBRAfinal} C"
,str tempBLM tempBLMfinal tempBLMformat
,str fBLME="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempBLM.csv"
,str fBLMT="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempBLMf.txt"
,HtmlDoc dBLM
,str sBLM=dBLM.GetText
,ExcelSheet esBLM.Init("tempBLM" 8 "S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempBLM.csv");err
,tempBLMfinal.format("%0.2s" tempBLM)
,tempBLMformat=F"{tempBLMfinal} C"
,str tempRCE tempRCEfinal tempRCEformat
,str fRCEE="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempRCE.csv"
,str fRCET="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempRCEf.txt"
,HtmlDoc dRCE
,str sRCE=dRCE.GetText
,ExcelSheet esRCE.Init("tempRCE" 8 "S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempRCE.csv");err
,tempRCEfinal.format("%0.2s" tempRCE)
,tempRCEformat=F"{tempRCEfinal} C"
,str tempMAN tempMANfinal tempMANformat
,str fMANE="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempMAN.csv"
,str fMANT="S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempMANf.txt"
,HtmlDoc dMAN
,str sMAN=dMAN.GetText
,ExcelSheet esMAN.Init("tempMAN" 8 "S:\GS\SN SS GNOC\Projects\TIM\Menu TIM\remote\meteo\tempMAN.csv");err
,tempMANfinal.format("%0.2s" tempMAN)
,tempMANformat=F"{tempMANfinal} C"
,out "fim-uma"
,wait 3000

Thanks!! Big Grin
Scripts in this web page leak much memory. From all my tested web pages, only this page has this problem.
1. Use SetOptions(3). It disables scripts. However then you may not get correct data.
2. Run HtmlDoc code in separate process that exist when gets web page text and saves in file.
3. Use other web page.
I tried to close the excelsheets at the end of the code and no problem until the moment.
The option that you gave me didn't work 'cause I lost the info that I wanted, but thanks!
I'll let it run till the end of the day and let you know how it goes.

Thanks again! Smile

Forum Jump:

Users browsing this thread: 1 Guest(s)