Coder Social home page Coder Social logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
When garbage is fed into a function it seems completely reasonable for the 
function to throw an exception. The caller of the function needs to take 
responsibility for handling the exception. This seems like a "working as 
intended" and I recommend it be closed.

Original comment by [email protected] on 10 Feb 2012 at 8:41

from sfntly.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
"Hard crash" is not an attribute of the OOME. Any Java application or library 
can throw that and the there is no way to prevent it without preflighting 
_every_ single action which can allocate memory. sfntly could fail with an OOME 
on an innocuous seeming HashMap allocation of a half dozen entries. It will 
depend on the VM and it's settings and the current state of the environment. 
This is a fact of life in Java. Any robust application or server will be 
prepared to handle an OOME.

Now, whether sfntly can/should do more validation during the font loading is 
another tangential issue. It can be done but it needs to be done in such a way 
that it doesn't inhibit performance, doesn't prevent legal sfnt containers from 
being loaded, and potentially is optional.

However, even if that does happen there is no way at all to guarantee that 
sfntly or any other library including the standard Java library never throws an 
OOME unless memory is never allocated.

Original comment by [email protected] on 13 Feb 2012 at 11:32

  • Changed state: New

from sfntly.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
OOME issues will not be fixed as this is a feature of Java. Issue has been 
closed. A more appropriately titled issue has been opened to consider some 
forms of sfnt container validation. These will never be perfect given the 
nature of the problem but maybe some things can be done. 

See - http://code.google.com/p/sfntly/issues/detail?id=18

Original comment by [email protected] on 13 Feb 2012 at 11:38

  • Changed state: Invalid

from sfntly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.