edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev]  memory error
Date: Sun, 23 Feb 2014 20:47:16 -0500	[thread overview]
Message-ID: <20140123204716.eklhad@comcast.net> (raw)

> However, doing things based on the error message (which I think comes from
> exceptions, user thrown or otherwise) seems a bit more fragile to me.

A) So then what are the odds that "out of memory" would appear in an error message
that we really should have continued on from?
Like an undefined variable or wrong data type or something like that
where we wanted to march on but didn't?
Pretty unlikely I'd say, "out of memory" is probably in a message
when something bad / unrecoverable happens.
So plan A is pretty safe, and minimizes oodles of error messages.

B) On the other hand, what might go wrong if we do nothing here,
and wait for the next call, which will not get the object it wants
and then fail and then we close down javascript?
Probably this isn't going to cause trouble either.
We might be ok with A or B.
It might not matter terribly much.

Well as mentioned above,
B could generate lots more errors before it figures it out.
Maybe harder, during debugging, to see when the problem really started.
And I think Chriss is asking if there isn't some situation, somewhere,
like maybe:

var a = [ 2, 3, 1, 7, 9, 2, 8, 9, ...

ooddles of elements and we get a memory error
because there isn't room for the whole array,
but there might have been room for half the array,
and maybe the array just isn't created, and now there's still some memory left
for js to do some other things,
but js assumes the array is in place, but it's not, and then behaves unpredictably.
Not a seg fault, but maybe worse, maybe js sends an incomplete order across
the internet to amazon.com.
We do need to think about these things,
even though they are perhaps quite unlikely.

Anyways, if I had to cast a vote I guess I'd say to close down js on "out of memory",
to supress all the extra error messages,
and to guard against the very unlikely but possible js
misfirings that might occur if it bumps up agains the memory limit, even temporarily.

Karl Dahlke

             reply	other threads:[~2014-02-24  1:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24  1:47 Karl Dahlke [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-02-23 22:57 Karl Dahlke
2014-02-23 23:16 ` Adam Thompson
2014-02-23 23:53   ` Chris Brannon
2014-02-24 10:25     ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140123204716.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).