willglynn / ruby-zbar

Ruby bindings for the ZBar barcode recognition library
MIT License
83 stars 24 forks source link

from_jpeg - Segmentation fault at 0x0000000000000000 #16

Open etobia opened 4 years ago

etobia commented 4 years ago

This seems related to some of the other JPEG issues that have been posted before: https://github.com/willglynn/ruby-zbar/issues/5 https://github.com/willglynn/ruby-zbar/issues/2 https://github.com/willglynn/ruby-zbar/issues/15

I'm seeing a seg fault when calling from_jpeg on Zbar::Image which causes the Ruby process to crash. Oddly enough zbarimg at the command line works fine. I'm using zbar 0.10 on the Amazon Linux AMI.

I can personally workaround this for now, but figured I'd mention it.

/opt/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/zbar-0.3.0/lib/zbar/image.rb:94: [BUG] Segmentation fault at 0x0000000000000000
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0055 p:---- s:0303 e:000302 CFUNC  :zbar_image_convert
c:0054 p:0015 s:0297 e:000296 METHOD /opt/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/zbar-0.3.0/lib/zbar/image.rb:94
c:0053 p:0036 s:0291 e:000290 BLOCK  /opt/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/zbar-0.3.0/lib/zbar/jpeg.rb:47 [FINISH]
c:0052 p:---- s:0287 e:000286 CFUNC  :tap
c:0051 p:0016 s:0283 e:000282 METHOD /opt/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/zbar-0.3.0/lib/zbar/jpeg.rb:45
c:0050 p:0019 s:0278 e:000277 METHOD /opt/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/zbar-0.3.0/lib/zbar/jpeg.rb:15
c:0049 p:0012 s:0274 e:000273 METHOD /opt/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/zbar-0.3.0/lib/zbar/image.rb:20
Undo1 commented 3 years ago

@etobia I'm hitting this; how did you work around it?