Forum: JRuby java.lang.ArrayIndexOutOfBoundsException - JRuby or Ruby bug?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
4a72bb2b2e6831599b6a0864dae69bb1?d=identicon&s=25 Martijn S (Guest)
on 2009-01-26 20:58
(Received via mailing list)
Hello all,

Recently I've updated the Prawn gem in one of my projects. It's an alpha
gem
that's not officially supporting JRuby, but since it's 100% pure Ruby I
was
wondering if you could point me in the right direction.

The problem arises when loading a TTF font with Prawn 0.4.1, as such:

require 'rubygems'
gem 'prawn', '0.4.1'
require 'prawn'

Prawn::Document.generate "prawn.pdf" do
  font "HelveticaNeue.ttf"  # Trying to load a TTF font generates error
  text "Hello from JRuby"
end

With earlier versions this didn't cause problems, but now I get this
strange
(to me at least) error:

org.jruby.RubyArray:758:in `eltInternal':
java.lang.ArrayIndexOutOfBoundsException: 259
  from org.jruby.util.Pack:1141:in `encode'
  from org.jruby.util.Pack:1435:in `pack'
  from org.jruby.RubyArray:3277:in `pack'

Full trace at http://pastie.org/371377

I haven't looked at the Prawn code yet since the error makes me thing
it's a
JRuby-related problem. Am I right or could this just as well be an issue
Prawn? I'd like to know where to look.

Thanks,

Martijn
--
View this message in context:
http://www.nabble.com/java.lang.ArrayIndexOutOfBou...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Ede2aa10c6462f1d825143879be59e38?d=identicon&s=25 Charles Oliver Nutter (Guest)
on 2009-01-27 16:30
(Received via mailing list)
Martijn S wrote:
> I haven't looked at the Prawn code yet since the error makes me thing it's a
> JRuby-related problem. Am I right or could this just as well be an issue
> Prawn? I'd like to know where to look.

It's definitely a JRuby problem, and you should file a bug for it. But
first, try a nightly build from http://jruby.headius.com:8080/hudson
under the jruby-dist job. It may already be fixed.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
4a72bb2b2e6831599b6a0864dae69bb1?d=identicon&s=25 Martijn S (Guest)
on 2009-01-27 17:20
(Received via mailing list)
Will do! Thanks for your reply.

Martijn


Charles Oliver Nutter-2 wrote:
>
> - Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
>

--
View this message in context:
http://www.nabble.com/java.lang.ArrayIndexOutOfBou...
Sent from the JRuby - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.