json icon indicating copy to clipboard operation
json copied to clipboard

Segmentation fault in to_json

Open proigor opened this issue 10 years ago • 2 comments

Hi!

I'm getting seg fault, most probably because to_json can't convert data with wrong encoding. Here is stack trace: /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:82: [BUG] Segmentation fault at 0x00000000000000 ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

-- Control frame information ----------------------------------------------- c:0078 p:---- s:0314 e:000313 CFUNC :initialize c:0077 p:---- s:0312 e:000311 CFUNC :new c:0076 p:0116 s:0308 e:000307 METHOD /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:82 c:0075 p:0009 s:0304 e:000303 BLOCK /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:88 [FINISH] c:0074 p:---- s:0301 e:000300 CFUNC :map c:0073 p:0150 s:0298 e:000297 METHOD /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:88 c:0072 p:0009 s:0294 e:000293 BLOCK /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:88 [FINISH] c:0071 p:---- s:0291 e:000290 CFUNC :map c:0070 p:0150 s:0288 e:000287 METHOD /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:88 c:0069 p:0017 s:0284 e:000282 METHOD /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:34 c:0068 p:0024 s:0279 e:000278 METHOD /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/json/encoding.rb:21 c:0067 p:0050 s:0274 e:000273 METHOD /u/apps/mth/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.1/lib/active_support/core_ext/object/json.rb:37 c:0066 p:0019 s:0270 e:000268 METHOD /u/apps/mth/releases/20150420105733/app/models/sorted_entity.rb:157 c:0065

Using all the latest gems.

Any help much appreciated! Please, let me know if you need anything else.

proigor avatar Apr 20 '15 14:04 proigor

Can you provide the data which caused this error?

flori avatar Apr 22 '15 11:04 flori

I've tried to find it, but without any luck. I think it was some invalid byte sequence, like \x0...

proigor avatar Apr 22 '15 12:04 proigor