#135 ✓resolved
Roger

OutOfMemoryError with opening large files

Reported by Roger | January 27th, 2010 @ 06:37 AM

Kind of a low priority, but thought I'd mention it here.

How to reproduce:
open large file (40M)

nitForUse: Postscript
org/jruby/util/ByteList.java:604:in bytes': java.lang.OutOfMemoryError: Java heap space (NativeException)<br/>

    from org/jruby/RubyString.java:6881:in `getBytes'
    from org/jruby/RubyDigest.java:209:in `s_hexdigest'
    from org/jruby/org/jruby/RubyDigest$Base$s_method_1_0$RUBYINVOKER$s_hexdigest.gen:-1:in `call'
    from org/jruby/runtime/callsite/CachingCallSite.java:310:in `cacheAndCall'
    from org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
    from org/jruby/ast/CallOneArgNode.java:57:in `interpret'
    from org/jruby/ast/InstAsgnNode.java:95:in `interpret'
    from org/jruby/ast/NewlineNode.java:104:in `interpret'
     ... 24 levels...
    from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/plugins/core/lib/core/gui.rb:39:in `start'
    from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/lib/redcar/boot.rb:75:in `pump'
    from E:/installs/ruby191p376/lib/ruby/gems/1.9.1/gems/redcar-0.3.2dev/lib/redcar/../../bin/redcar:14

Comments and changes to this ticket

  • Daniel Lucraft

    Daniel Lucraft January 31st, 2010 @ 07:39 AM

    • State changed from “new” to “open”

    Yep. I guess a pragmatic solution might be a guard or a warning that says you are opening a large file, and give you the option not to.

    For large files we might also turn off highlighting, since that is likely to be where all the memory and time go.

  • Mat Schaffer

    Mat Schaffer January 22nd, 2011 @ 07:04 PM

    • Assigned user set to “Mat Schaffer”
    • Milestone order changed from “0” to “0”
  • Mat Schaffer

    Mat Schaffer January 22nd, 2011 @ 11:28 PM

    • State changed from “open” to “resolved”

    As of ecf0d04 files over 5MB trigger a prompt. Configurable in project/manager.rb.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A programmer's text editor for Gnome.

People watching this ticket

Tags

Pages