I installed JRuby 10 to see if the test suite of HexaPDF runs successfully. Alas it crashes with an error.
Environment Information
- JRuby version: jruby 10.0.0.0 (3.4.2) 2025-04-13 6ed59bc847 OpenJDK 64-Bit Server VM 21.0.6+7-Ubuntu-124.10.1 on 21.0.6+7-Ubuntu-124.10.1 +indy +jit [x86_64-linux]
- Operating system and platform: Linux laptop 6.11.0-21-generic #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 19 16:50:40 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
To reproduce
- git clone git@github.com:gettalong/hexapdf.git
- gem install cmdparse geom2d openssl strscan
- rake test
Expected Behavior
The test suite should run successfully.
Actual Behavior
The test suite fails with the following stack trace:
ArgumentError: invalid value for Integer(): "xref\n0 8\n0000000000 65535 f \n0000000015 00000 n \n0000000064 00000 n \n0000000149 00000 n \n0000000229 00000 n \n0000000329 00000 n \n0000000396 00000 n \n0000000476 00000 n \ntrailer << /Root 1 0 R /Info 7 0 R /Size 8 /ID [<6790ffa610024e78369114311fc0df96><6790ffa610024e78369114311fc0df96>] >>\nstartxref\n523\n%%EOF\n"
scan_base10_integer at org/jruby/ext/strscan/RubyStringScanner.java:602
scan_integer at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/strscan-3.1.4-java/lib/strscan/strscan.rb:18
parse_number at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/tokenizer.rb:290
next_token at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/tokenizer.rb:124
parse_xref_section_and_trailer at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/parser.rb:287
load_revision at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/parser.rb:243
from_io at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/revisions.rb:81
initialize at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/document.rb:195
new at org/jruby/RubyClass.java:1023
<main> at /home/thomas/exthdsync/personal/repos/hexapdf/test/hexapdf/encryption/test_standard_security_handler.r
b:70
module_eval at org/jruby/RubyModule.java:4173
module_eval at org/jruby/RubyModule.java:4204
describe at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/minitest-5.25.4/lib/minitest/spe
c.rb:95
<main> at /home/thomas/exthdsync/personal/repos/hexapdf/test/hexapdf/encryption/test_standard_security_handler.r
b:65
require at org/jruby/RubyKernel.java:1183
require at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:136
<main> at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/rake-13.2.1/lib/rake/rake_test_l
oader.rb:21
select at org/jruby/RubyArray.java:2954
<main> at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/rake-13.2.1/lib/rake/rake_test_l
oader.rb:6
rake aborted!
Command failed with status (1)
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
org/jruby/ext/monitor/Monitor.java:85:in 'synchronize'
Tasks: TOP => default => test
(See full trace by running task with --trace)
Reactions are currently unavailable
I installed JRuby 10 to see if the test suite of HexaPDF runs successfully. Alas it crashes with an error.
Environment Information
To reproduce
Expected Behavior
The test suite should run successfully.
Actual Behavior
The test suite fails with the following stack trace:
ArgumentError: invalid value for Integer(): "xref\n0 8\n0000000000 65535 f \n0000000015 00000 n \n0000000064 00000 n \n0000000149 00000 n \n0000000229 00000 n \n0000000329 00000 n \n0000000396 00000 n \n0000000476 00000 n \ntrailer << /Root 1 0 R /Info 7 0 R /Size 8 /ID [<6790ffa610024e78369114311fc0df96><6790ffa610024e78369114311fc0df96>] >>\nstartxref\n523\n%%EOF\n" scan_base10_integer at org/jruby/ext/strscan/RubyStringScanner.java:602 scan_integer at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/strscan-3.1.4-java/lib/strscan/strscan.rb:18 parse_number at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/tokenizer.rb:290 next_token at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/tokenizer.rb:124 parse_xref_section_and_trailer at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/parser.rb:287 load_revision at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/parser.rb:243 from_io at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/revisions.rb:81 initialize at /home/thomas/exthdsync/personal/repos/hexapdf/lib/hexapdf/document.rb:195 new at org/jruby/RubyClass.java:1023 <main> at /home/thomas/exthdsync/personal/repos/hexapdf/test/hexapdf/encryption/test_standard_security_handler.r b:70 module_eval at org/jruby/RubyModule.java:4173 module_eval at org/jruby/RubyModule.java:4204 describe at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/minitest-5.25.4/lib/minitest/spe c.rb:95 <main> at /home/thomas/exthdsync/personal/repos/hexapdf/test/hexapdf/encryption/test_standard_security_handler.r b:65 require at org/jruby/RubyKernel.java:1183 require at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:136 <main> at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/rake-13.2.1/lib/rake/rake_test_l oader.rb:21 select at org/jruby/RubyArray.java:2954 <main> at /home/thomas/.rbenv/versions/jruby-10.0.0.0/lib/ruby/gems/shared/gems/rake-13.2.1/lib/rake/rake_test_l oader.rb:6 rake aborted! Command failed with status (1) org/jruby/ext/monitor/Monitor.java:85:in 'synchronize' org/jruby/ext/monitor/Monitor.java:85:in 'synchronize' Tasks: TOP => default => test (See full trace by running task with --trace)