Skip to content

OutOfMemoryError instead of Exceptions #216

@Hakon

Description

@Hakon

Hello, headius suggested i'd file a bug on this.

Sometimes when my code throws an exception instead it sits for over a minute and then throws an OutOfMemoryError.
This example trace is a ActionView::Template::Error but i guess ActionView catches the error and throws its own.

ActionView::Template::Error (Java heap space):
  java.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:39)
  java.nio.CharBuffer.allocate(CharBuffer.java:312)
  java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:775)
  java.nio.charset.Charset.decode(Charset.java:771)
  org.jruby.RubyEncoding$UTF8Coder.decode(RubyEncoding.java:246)
  org.jruby.RubyEncoding.decodeUTF8(RubyEncoding.java:192)
  org.jruby.RubyString.decodeString(RubyString.java:719)
  org.jruby.RubyString.toString(RubyString.java:701)
  org.jruby.RubyNameError$RubyNameErrorMessage.to_str(RubyNameError.java:120)
  org.jruby.RubyNameError$RubyNameErrorMessage$INVOKER$i$0$0$to_str.call(RubyNameError$RubyNameErrorMessage$INVOKER$i$0$0$to_str.gen)
  org.jruby.RubyClass.finvoke(RubyClass.java:679)
  org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:541)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:364)
  org.jruby.util.TypeConverter.convertToType(TypeConverter.java:71)
  org.jruby.util.TypeConverter.convertToType(TypeConverter.java:117)
  org.jruby.RubyBasicObject.convertToString(RubyBasicObject.java:758)
  org.jruby.RubyNameError.to_s(RubyNameError.java:202)
  org.jruby.RubyNameError$INVOKER$i$0$0$to_s.call(RubyNameError$INVOKER$i$0$0$to_s.gen)
  org.jruby.RubyClass.finvoke(RubyClass.java:679)
  org.jruby.javasupport.util.RuntimeHelpers.invoke(RuntimeHelpers.java:541)
  org.jruby.RubyBasicObject.callMethod(RubyBasicObject.java:364)
  org.jruby.RubyException.message(RubyException.java:266)
  org.jruby.RubyException$INVOKER$i$0$0$message.call(RubyException$INVOKER$i$0$0$message.gen)
  org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:292)
  org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:135)
  org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:63)
  org.jruby.evaluator.ASTInterpreter.setupArgs(ASTInterpreter.java:357)
  org.jruby.ast.SuperNode.interpret(SuperNode.java:107)
  org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
  org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
  org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
  org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:298)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions