Chrome Extension Crashes Randomly

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
speedz84
Posts: 12
Joined: Mon Oct 22, 2018 2:16 pm

Chrome Extension Crashes Randomly

Post by speedz84 » Wed Nov 14, 2018 2:50 pm

I have noticed lately that when I leave iMacros running with a long loop to repeat over 3000 times the iMacros Chrome extension crashes randomly and when I reopen Imacros all information on which loop iteration it crashed on is lost. Do you have any safeguards in place from this happening or any future version you are working on to fix these crashes? I also noticed when a certain website loses it's connection for a few minutes iMacros stops working until you refresh the page manually even when SET !ERRORIGNORE YES. iMacros should be running at all times even when there is a timeout at a webpage.

I left a loop to repeat 3000 times overnight, I wake up and Imacros crashed but the browser is working fine. Is there any log I can go to see which loop number it crashed at or you can implement something? Whenever Imacros crashes it should save data and go back where the loop stopped at so I can know at which number of the loop it crashed. I hope you can investigate some of these crashes in the next version to make sure there are no memory leaks or anything like that can cause iMacros to crash when it is working for a long time.

Is there a way to make a log that updates every second that shows the current TIME : CURRENT LOOP # (This way I can know at which loop out of the one I set to stop iMacros crashed at)

It looks like if iMacros works for way too long without a browser restart there is a high possibility of a crash. Wondering if there is a bug or memory leak with the current extension which might need to be updated.

Windows 10 (Latest Version all current updates)
Chrome 70.0.3538.102 (Official Build) (64-bit) (Latest Version)
Imacros for Chrome iMacros for Chrome 10.0.5 (Latest Version) (Paid Personal Version)
chivracq
Posts: 7895
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Chrome Extension Crashes

Post by chivracq » Wed Nov 14, 2018 4:50 pm

speedz84 wrote:I have noticed lately that when I leave iMacros running with a long loop with over 3000 iterations the iMacros Chrome extensions crashes randomly and when I reopen Imacros all information on which loop iteration it crashed on is lost. Do you have any safeguards in place from this happening or any future fixes? I also noticed when a certain website loses it's connection for a few minutes iMacros stops working until you refresh the page manually even when SET !ERRORIGNORE YES.

I left the loop iteration with about 3000 iterations overnight, I wake up and Imacros crashed but the browser is working fine. Is there any log I can go to see which loop iteration it crashed at or you can implement something? Whenever Imacros crashes it should save data and go back where the loop stopped at.

Code: Select all

Windows 10
Chrome 70.0.3538.102 (Official Build) (64-bit)  (Latest Version)
Imacros for Chrome  iMacros for Chrome 10.0.5  (Latest Version)
I don't know about the Crashes as I don't use Chrome (and iMacros for CR)... (Correct Spelling is "iMacros" btw... :wink: )

Concerning keeping track of the Loop_Nb, I think I had noticed during the Beta-Testing Phase for v10.0.2 for FF (which is based on the same Base-Code like v10.0.1-v10.0.5 for CR) that it had that "Functionality", even if I rather considered it a "Bug" personally than a "Functionality" (unless it could have been toggled ON/OFF, which was not the case), as after finishing a Macro (run once or looped), closing the iMacros (Undocked) Side-Panel, or even completely exiting CR and restarting CR + the Side-Panel, the last Macro that had previously run was still selected (instead of being reset to '#Current.iim' like all other Versions I've ever used), and I think the last Loop Info was still there as well, though I'm not completely sure about the Loop Info, and I didn't "voluntarily" include some "Crash-Testing" into my Testing...

But I could think of several Options:
1- You could enable the 'Profiler' which will generate an '.XML' File (that you can open in your Browser) and that will contain a separate Section for each Loop that your Macro ran until the end, with a Summary like:
Macro: _Name of Macro.iim
started at 16:11:49.394 ended at 16:12:17.171
duration = 27.777 seconds
status: OK(1)
=> A simple Ctrl^F' (Find) + "iim" already gives you how times your Macro ran...

That Summary could indeed include directly some "Loop 355 (of 3000)" Info, I agree with you, that could be useful indeed... 8)
I will add it to the List of EnhReqs I maintain in the following Thread:
- Re: List of EnhReq's...!! [by @chivracq]

And the Profiler might give you as well some "Insight" in the "Health" of your Macro and the Site...
Only Drawback is that the Profiler slows down Macro Execution by about 30% in my Experience for the parts with some "heavy" Tagging and quick Looping, if Speed is important to you...

2- You could keep track of the Loop in some mini Temp-File for each Loop, using 'FILEDELETE' + 'SAVEAS TYPE=EXTRACT'.
But that wouldn't work on CR as you would need the 'FILEDELETE' Command which is not supported on CR, ah-ah...!

3- Same Principle like '2-', but you keep the Loop_Nb in your OS Clipboard, and when you wake up and see that your Macro crashed or if you wonder if it finished looping until the end, you simply paste the Content of your Clipboard into some '.TXT' File or any Input Field on a Web-Page to check...

Code: Select all

SET !CLIPBOARD Macro_LOOP:<SP>{{!LOOP}}
4- Same Principle like '2-' but instead of deleting the File again and again for each Loop, you only use the 'SAVEAS' Command and each new Loop will simply add a new Row to your '.CSV' or '.TXT' File, this is the "Principle" of "Logging", and this is "Good Practice" anyway... :idea:
=> Stg like...:

Code: Select all

SET !EXTRACT {{!NOW:yyyymmdd_hh:nn:ss}}
ADD !EXTRACT {{!LOOP}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Logging_LOOP.txt
And you can even log some more Data than just the Loop_Nb, like a Timestamp, Duration of the Run (using 'STOPWATCH'), the URL, and any Data you might want to extract to check that the Macro/Loop ran correctly... A bit like the Content of the 'Profiler' File, which contains nearly "too much" Info, especially if you are going to loop your Macro 3000x times... Difficult then to locate a specific part that might have gone wrong...

>>>

Mini-Remark:
I hope you'll follow up a bit "better" on this Thread than on your previous Thread which has been waiting for some Follow-up from your Side for about 3 weeks...! :shock: I had then alerted TechSup to have a look at your Thread, and they answered it, but you got "a bit lucky", they don't often check and post on the Forum...
(I usually don't help (anymore) Users who don't follow up on their (previous) Threads, just saying... :idea: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
speedz84
Posts: 12
Joined: Mon Oct 22, 2018 2:16 pm

Re: Chrome Extension Crashes Randomly

Post by speedz84 » Wed Nov 14, 2018 4:59 pm

Thanks for your quick reply. Basically I am wondering if this is just some memory leak that might need to be fixed if it's running too long. Thanks for the great tip on enabling the "Profiler" I am going to enable it right away
That Summary could indeed include directly some "Loop 355 (of 3000)" Info, I agree with you, that could be useful indeed... 8)
This is exactly what I need in the summary! :D


SET !EXTRACT {{!NOW:yyyymmdd_hh:nn:ss}}
ADD !EXTRACT {{!LOOP}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Logging_LOOP.txt
This is exactly what I need and works like a charm ! :D

Thanks so much chivracq!!
Post Reply