edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev]  memory error
@ 2014-02-24  1:47 Karl Dahlke
  0 siblings, 0 replies; 5+ messages in thread
From: Karl Dahlke @ 2014-02-24  1:47 UTC (permalink / raw)
  To: Edbrowse-dev

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [Edbrowse-dev] memory error
@ 2014-02-23 22:57 Karl Dahlke
  2014-02-23 23:16 ` Adam Thompson
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Dahlke @ 2014-02-23 22:57 UTC (permalink / raw)
  To: Edbrowse-dev

> Out of interest are there really cases where the error number
> doesn't reflect the out of memory condition but the message does?

I think the memory hog test in jsrt is one such.

Karl Dahlke

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-24 10:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24  1:47 [Edbrowse-dev] memory error Karl Dahlke
  -- 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

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).