Segmentation fault in `QRCode#pixels`
Closed this issue · 2 comments
gioele commented
This simple code will cause a segfault:
require 'qrencoder'
QREncoder.encode('01234567', :version => 1, :mode => :numeric)
p x.pixels
This is the dry message I get:
[BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
Removing :mode => :numeric
solves this segmentation fault but the generated QR code uses another encoding mode.
Please note that the command line qrencode
command produces a valid version 1 QR code in numeric mode without segfaulting.
jgdavey commented
What version of the gem are you using? I believe that we've fixed this issue on master, specifically in dc0f7f0, but have yet to release a new version.
gioele commented
I was using the latest released gem. The example code no longer crashes with the current git code.