debugout.js icon indicating copy to clipboard operation
debugout.js copied to clipboard

Allocation size overflow error.

Open kupietools opened this issue 7 years ago • 5 comments

Script fails with Allocation size overflow error whenever I use debugout.log instead of console.log. As soon as I replace out the call to debugout.log with console.log again, no problem. Object recursion depth is set to only 3.

screenshot 2018-06-23 21 08 47

kupietools avatar Jun 24 '18 04:06 kupietools

what are your autoTrim and maxLines properties set to?

inorganik avatar Jun 25 '18 17:06 inorganik

self.autoTrim = false;	self.maxLines = 2500;

I can't use this if autoTrim is on. I need to see the entire log. Otherwise Firefox's built-in log would be fine for my purposes.

kupietools avatar Jun 26 '18 01:06 kupietools

Is it possible to have it automatically write the log to a file every time the maxLines limit is reached, so I can see the whole thing if it runs over?

kupietools avatar Jun 26 '18 01:06 kupietools

Also, fwiw, I did an experiment where I wrote the log to comments inside the page

, and the full log for a complete run of the script was 14MB. I have 16GB of memory in my computer, so I don't see why memory should be a problem.

kupietools avatar Jun 26 '18 01:06 kupietools

Wow, 14 MB. That's why autoTrim is initially set to false. You can start by setting useLocalStorage to true, but you'll probably need to make some additional modifications. Look inside the log() method and make some changes there. But definitely set autoTrim to true so that debugout isn't having a memory feast.

inorganik avatar Jun 26 '18 17:06 inorganik