2009-09-19 8 views
3

J'ai récemment écrit un script ruby ​​complexe qui échoue finalement avec segfaults dans le temps aléatoire et dans des endroits aléatoires, comme nokogiri, mechanize, iconv, timeout. Je l'ai essayé sous 1.9.1 p 129, 1.8.6 p 369 sous windows 7 et 1.8.7 sous ubuntu, toujours le même comportement. Puisqu'il y a trois versions actuelles (1.8.6, 1.8.7 et 1.9.1) à télécharger de ruby-lang, laquelle est la moins buggeuse et quelle est la raison de leur maintien?Quelle version de ruby ​​est moins buggée?

Eh bien, je ne sais pas ce qui provoque des erreurs, voici une décharge d'échantillon d'erreur

D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:93: [BUG] Segmentation fault 
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] 

-- control frame ---------- 
c:0031 p:0167 s:0167 b:0163 l:000162 d:000162 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:93 
c:0030 p:0111 s:0155 b:0155 l:000154 d:000154 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2353 
c:0029 p:0024 s:0147 b:0147 l:000146 d:000146 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2328 
c:0028 p:0099 s:0142 b:0142 l:000141 d:000141 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2288 
c:0027 p:0050 s:0136 b:0136 l:000898 d:000898 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain/response_reader.rb:15 
c:0026 p:0021 s:0128 b:0128 l:000127 d:000127 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain.rb:25 
c:0025 p:0067 s:0124 b:0124 l:001788 d:00BLOCK D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:490 
c:0024 p:0017 s:0120 b:0120 l:000112 d:000119 BLOCK D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1120 
c:0023 p:0038 s:0118 b:0118 l:000117 d:000117 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2251 
c:0022 p:0110 s:0113 b:0113 l:000112 d:000112 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1119 
c:0021 p:0097 s:0108 b:0108 l:000107 d:000107 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1103 
c:0020 p:0513 s:0101 b:0101 l:001788 d:001788 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:485 
c:0019 p:0170 s:0075 b:0075 l:000074 d:000074 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:413 
c:0018 p:s:0066 b:0066 l:000065 d:000065 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:344 
c:0017 p:0024 s:0060 b:0060 l:000059 d:000059 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/form.rb:130 
c:0016 p:0039 s:0055 b:0055 l:000054 d:000054 METHOD D:/code/h4/www/poster.rb:340 
c:0015 p:0223 s:0050 b:0050 l:000049 d:000049 METHOD D:/code/h4/www/poster.rb:238 
c:0014 p:0112 s:0045 b:0045 l:000044 d:000044 METHOD D:/code/h4/www/poster.rb:286 
c:0013 p:0330 s:0042 b:0042 l:000041 d:000041 METHOD D:/code/h4/www/poster.rb:115 
c:0012 p:0038 s:0033 b:0033 l:000016 d:000032 BLOCK D:/code/h4/post.rb:22 
c:0011 p:---- s:0030 b:0030 l:000029 d:000029 FINISH 
c:0010 p:---- s:0028 b:0028 l:000027 d:000027 CFUNC :times 
c:0009 p:0050 s:0025 b:0025 l:000016 d:000024 BLOCK D:/code/h4/post.rb:19 
c:0008 p:---- s:0022 b:0022 l:000021 d:000021 FINISH 
c:0007 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :times 
c:0006 p:0111 s:0017 b:0017 l:000016 d:000016 TOP D:/code/h4/post.rb:14 
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH 
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :load 
c:0003 p:0061 s:0006 b:0006 l:000e84 d:00227c EVAL -e:1 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:000e84 d:000e84 TOP 
--------------------------- 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:93: [BUG] object allocation during garbage collection phase 
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] 

-- control frame ---------- 
c:0031 p:0167 s:0167 b:0163 l:000162 d:000162 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:93 
c:0030 p:0111 s:0155 b:0155 l:000154 d:000154 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2353 
c:0029 p:0024 s:0147 b:0147 l:000146 d:000146 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2328 
c:0028 p:0099 s:0142 b:0142 l:000141 d:000141 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2288 
c:0027 p:0050 s:0136 b:0136 l:000898 d:000898 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain/response_reader.rb:15 
c:0026 p:0021 s:0128 b:0128 l:000127 d:000127 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain.rb:25 
c:0025 p:0067 s:0124 b:0124 l:001788 d:00BLOCK D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:490 
c:0024 p:0017 s:0120 b:0120 l:000112 d:000119 BLOCK D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1120 
c:0023 p:0038 s:0118 b:0118 l:000117 d:000117 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2251 
c:0022 p:0110 s:0113 b:0113 l:000112 d:000112 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1119 
c:0021 p:0097 s:0108 b:0108 l:000107 d:000107 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1103 
c:0020 p:0513 s:0101 b:0101 l:001788 d:001788 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:485 
c:0019 p:0170 s:0075 b:0075 l:000074 d:000074 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:413 
c:0018 p:s:0066 b:0066 l:000065 d:000065 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:344 
c:0017 p:0024 s:0060 b:0060 l:000059 d:000059 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/form.rb:130 
c:0016 p:0039 s:0055 b:0055 l:000054 d:000054 METHOD D:/code/h4/www/poster.rb:340 
c:0015 p:0223 s:0050 b:0050 l:000049 d:000049 METHOD D:/code/h4/www/poster.rb:238 
c:0014 p:0112 s:0045 b:0045 l:000044 d:000044 METHOD D:/code/h4/www/poster.rb:286 
c:0013 p:0330 s:0042 b:0042 l:000041 d:000041 METHOD D:/code/h4/www/poster.rb:115 
c:0012 p:0038 s:0033 b:0033 l:000016 d:000032 BLOCK D:/code/h4/post.rb:22 
c:0011 p:---- s:0030 b:0030 l:000029 d:000029 FINISH 
c:0010 p:---- s:0028 b:0028 l:000027 d:000027 CFUNC :times 
c:0009 p:0050 s:0025 b:0025 l:000016 d:000024 BLOCK D:/code/h4/post.rb:19 
c:0008 p:---- s:0022 b:0022 l:000021 d:000021 FINISH 
c:0007 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :times 
c:0006 p:0111 s:0017 b:0017 l:000016 d:000016 TOP D:/code/h4/post.rb:14 
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH 
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :load 
c:0003 p:0061 s:0006 b:0006 l:000e84 d:00227c EVAL -e:1 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:000e84 d:000e84 TOP 
--------------------------- 
-- Ruby level backtrace information----------------------------------------- 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:93:in `read' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2353:in `read_chunked' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2328:in `read_body_0' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2288:in `read_body' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain/response_reader.rb:15:in `handle' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain.rb:25:in `handle' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:490:in `block in fetch_page' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1120:in `block in transport_request' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2251:in `reading_body' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1119:in `transport_request' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1103:in `request' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:485:in `fetch_page' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:413:in `post_form' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:344:in `submit' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/form.rb:130:in `submit' 
D:/code/h4/www/poster.rb:340:in `submit' 
D:/code/h4/www/poster.rb:238:in `register' 
D:/code/h4/www/poster.rb:286:in `login' 
D:/code/h4/www/poster.rb:115:in `checkifworks' 
D:/code/h4/post.rb:22:in `block (2 levels) in <top (required)>' 
D:/code/h4/post.rb:19:in `times' 
D:/code/h4/post.rb:19:in `block in <top (required)>' 
D:/code/h4/post.rb:14:in `times' 
D:/code/h4/post.rb:14:in `<top (required)>' 
-e:1:in `load' 
-e:1:in `<main>' 

[NOTE] 
You may encounter a bug of Ruby interpreter. Bug reports are welcome. 
For details: http://www.ruby-lang.org/bugreport.html 


This application has requested the Runtime to terminate it in an unusual way. 
Please contact the application's support team for more information. 

Je vais essayer d'utiliser JRuby au cas où je reçois à utiliser nokogiri avec elle. Voici un autre vidage, si cela peut être utile en quelque sorte

D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:135: [BUG] Segmentation fault 
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] 

-- control frame ---------- 
c:0026 p:---- s:0142 b:0142 l:000141 d:000141 CFUNC :sysread 
c:0025 p:0019 s:0138 b:0137 l:000adc d:000136 BLOCK D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:135 
c:0024 p:0103 s:0135 b:0135 l:000e08 d:000e08 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/timeout.rb:52 
c:0023 p:0026 s:b:l:000122 d:000122 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/timeout.rb:82 
c:0022 p:0013 s:0117 b:0117 l:000adc d:000adc METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:134 
c:0021 p:0025 s:0114 b:0114 l:000113 d:000113 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:116 
c:0020 p:0013 s:0108 b:0108 l:000107 d:000107 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:126 
c:0019 p:0012 s:0105 b:0105 l:000104 d:000104 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2135 
c:0018 p:0013 s:0099 b:0099 l:000098 d:000098 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2124 
c:0017 p:0069 s:0091 b:0091 l:000090 d:000090 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1117 
c:0016 p:0097 s:0086 b:0086 l:000085 d:000085 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1103 
c:0015 p:0513 s:0079 b:0079 l:0025a0 d:0025a0 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:485 
c:0014 p:0346 s:0053 b:0053 l:000052 d:000052 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:238 
c:0013 p:0016 s:0044 b:0044 l:000043 d:000043 METHOD D:/code/h4/www/poster.rb:185 
c:0012 p:0085 s:0040 b:0040 l:000039 d:000039 METHOD D:/code/h4/www/poster.rb:217 
c:0011 p:0112 s:0035 b:0035 l:000034 d:000034 METHOD D:/code/h4/www/poster.rb:286 
c:0010 p:0308 s:0032 b:0032 l:000031 d:000031 METHOD D:/code/h4/www/poster.rb:115 
c:0009 p:0011 s:0023 b:0023 l:000015 d:000022 BLOCK D:/code/h4/post.rb:14 
c:0008 p:---- s:0021 b:0021 l:000020 d:000020 FINISH 
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :times 
c:0006 p:0107 s:0016 b:0016 l:000015 d:000015 TOP D:/code/h4/post.rb:13 
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH 
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :load 
c:0003 p:0061 s:0006 b:0006 l:000604 d:001a54 EVAL -e:1 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:000604 d:000604 TOP 
--------------------------- 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:135: [BUG] object allocation during garbage collection phase 
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] 

-- control frame ---------- 
c:0026 p:---- s:0142 b:0142 l:000141 d:000141 CFUNC :sysread 
c:0025 p:0019 s:0138 b:0137 l:000adc d:000136 BLOCK D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:135 
c:0024 p:0103 s:0135 b:0135 l:000e08 d:000e08 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/timeout.rb:52 
c:0023 p:0026 s:b:l:000122 d:000122 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/timeout.rb:82 
c:0022 p:0013 s:0117 b:0117 l:000adc d:000adc METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:134 
c:0021 p:0025 s:0114 b:0114 l:000113 d:000113 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:116 
c:0020 p:0013 s:0108 b:0108 l:000107 d:000107 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:126 
c:0019 p:0012 s:0105 b:0105 l:000104 d:000104 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2135 
c:0018 p:0013 s:0099 b:0099 l:000098 d:000098 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2124 
c:0017 p:0069 s:0091 b:0091 l:000090 d:000090 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1117 
c:0016 p:0097 s:0086 b:0086 l:000085 d:000085 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1103 
c:0015 p:0513 s:0079 b:0079 l:0025a0 d:0025a0 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:485 
c:0014 p:0346 s:0053 b:0053 l:000052 d:000052 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:238 
c:0013 p:0016 s:0044 b:0044 l:000043 d:000043 METHOD D:/code/h4/www/poster.rb:185 
c:0012 p:0085 s:0040 b:0040 l:000039 d:000039 METHOD D:/code/h4/www/poster.rb:217 
c:0011 p:0112 s:0035 b:0035 l:000034 d:000034 METHOD D:/code/h4/www/poster.rb:286 
c:0010 p:0308 s:0032 b:0032 l:000031 d:000031 METHOD D:/code/h4/www/poster.rb:115 
c:0009 p:0011 s:0023 b:0023 l:000015 d:000022 BLOCK D:/code/h4/post.rb:14 
c:0008 p:---- s:0021 b:0021 l:000020 d:000020 FINISH 
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :times 
c:0006 p:0107 s:0016 b:0016 l:000015 d:000015 TOP D:/code/h4/post.rb:13 
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH 
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :load 
c:0003 p:0061 s:0006 b:0006 l:000604 d:001a54 EVAL -e:1 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:000604 d:000604 TOP 
--------------------------- 
-- Ruby level backtrace information----------------------------------------- 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:135:in `sysread' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:135:in `block in rbuf_fill' 
D:/ruby-1.9.1/lib/ruby/1.9.1/timeout.rb:52:in `timeout' 
D:/ruby-1.9.1/lib/ruby/1.9.1/timeout.rb:82:in `timeout' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:134:in `rbuf_fill' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:116:in `readuntil' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/protocol.rb:126:in `readline' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2135:in `read_status_line' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:2124:in `read_new' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1117:in `transport_request' 
D:/ruby-1.9.1/lib/ruby/1.9.1/net/http.rb:1103:in `request' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:485:in `fetch_page' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:238:in `get' 
D:/code/h4/www/poster.rb:185:in `myget' 
D:/code/h4/www/poster.rb:217:in `register' 
D:/code/h4/www/poster.rb:286:in `login' 
D:/code/h4/www/poster.rb:115:in `checkifworks' 
D:/code/h4/post.rb:14:in `block in <top (required)>' 
D:/code/h4/post.rb:13:in `times' 
D:/code/h4/post.rb:13:in `<top (required)>' 
-e:1:in `load' 
-e:1:in `<main>' 

[NOTE] 
You may encounter a bug of Ruby interpreter. Bug reports are welcome. 
For details: http://www.ruby-lang.org/bugreport.html 


This application has requested the Runtime to terminate it in an unusual way. 
Please contact the application's support team for more information. 

Et encore un autre. Je m'attendrais à ce que, puisque je ne lis pas de mémoire directement ou que je fasse des manipulations de niveau relativement bas, la pire chose que je puisse obtenir de Ruby Interpreter soit une Exception? Ai-je raison?

D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1078: [BUG] Segmentation fault 
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] 

-- control frame ---------- 
c:0024 p:---- s:0134 b:0134 l:000133 d:000133 CFUNC :collect 
c:0023 p:0017 s:0131 b:0131 l:000130 d:000130 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1078 
c:0022 p:0052 s:0128 b:0127 l:000126 d:000126 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1051 
c:0021 p:0033 s:b:l:000122 d:000122 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:740 
c:0020 p:0555 s:0116 b:0116 l:000115 d:000115 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain/uri_resolver.rb:62 
c:0019 p:0021 s:0107 b:0107 l:000106 d:000106 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain.rb:25 
c:0018 p:0251 s:0103 b:0103 l:000102 d:000102 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:457 
c:0017 p:0346 s:0077 b:0077 l:000076 d:000076 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:238 
c:0016 p:0258 s:0068 b:0068 l:000a74 d:000067 BLOCK D:/code/h4/www/poster.rb:464 
c:0015 p:---- s:0052 b:0052 l:000051 d:000051 FINISH 
c:0014 p:---- s:0050 b:0050 l:000049 d:000049 CFUNC :each 
c:0013 p:0243 s:0047 b:0047 l:000a74 d:000a74 METHOD D:/code/h4/www/poster.rb:446 
c:0012 p:0174 s:0040 b:0040 l:000039 d:000039 METHOD D:/code/h4/www/poster.rb:232 
c:0011 p:0112 s:0035 b:0035 l:000034 d:000034 METHOD D:/code/h4/www/poster.rb:286 
c:0010 p:0308 s:0032 b:0032 l:000031 d:000031 METHOD D:/code/h4/www/poster.rb:115 
c:0009 p:0011 s:0023 b:0023 l:000015 d:000022 BLOCK D:/code/h4/post.rb:14 
c:0008 p:---- s:0021 b:0021 l:000020 d:000020 FINISH 
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :times 
c:0006 p:0107 s:0016 b:0016 l:000015 d:000015 TOP D:/code/h4/post.rb:13 
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH 
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :load 
c:0003 p:0061 s:0006 b:0006 l:0001d4 d:001624 EVAL -e:1 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:0001d4 d:0001d4 TOP 
--------------------------- 
D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1078: [BUG] object allocation during garbage collection phase 
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32] 

-- control frame ---------- 
c:0024 p:---- s:0134 b:0134 l:000133 d:000133 CFUNC :collect 
c:0023 p:0017 s:0131 b:0131 l:000130 d:000130 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1078 
c:0022 p:0052 s:0128 b:0127 l:000126 d:000126 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1051 
c:0021 p:0033 s:b:l:000122 d:000122 METHOD D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:740 
c:0020 p:0555 s:0116 b:0116 l:000115 d:000115 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain/uri_resolver.rb:62 
c:0019 p:0021 s:0107 b:0107 l:000106 d:000106 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain.rb:25 
c:0018 p:0251 s:0103 b:0103 l:000102 d:000102 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:457 
c:0017 p:0346 s:0077 b:0077 l:000076 d:000076 METHOD D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:238 
c:0016 p:0258 s:0068 b:0068 l:000a74 d:000067 BLOCK D:/code/h4/www/poster.rb:464 
c:0015 p:---- s:0052 b:0052 l:000051 d:000051 FINISH 
c:0014 p:---- s:0050 b:0050 l:000049 d:000049 CFUNC :each 
c:0013 p:0243 s:0047 b:0047 l:000a74 d:000a74 METHOD D:/code/h4/www/poster.rb:446 
c:0012 p:0174 s:0040 b:0040 l:000039 d:000039 METHOD D:/code/h4/www/poster.rb:232 
c:0011 p:0112 s:0035 b:0035 l:000034 d:000034 METHOD D:/code/h4/www/poster.rb:286 
c:0010 p:0308 s:0032 b:0032 l:000031 d:000031 METHOD D:/code/h4/www/poster.rb:115 
c:0009 p:0011 s:0023 b:0023 l:000015 d:000022 BLOCK D:/code/h4/post.rb:14 
c:0008 p:---- s:0021 b:0021 l:000020 d:000020 FINISH 
c:0007 p:---- s:0019 b:0019 l:000018 d:000018 CFUNC :times 
c:0006 p:0107 s:0016 b:0016 l:000015 d:000015 TOP D:/code/h4/post.rb:13 
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 FINISH 
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC :load 
c:0003 p:0061 s:0006 b:0006 l:0001d4 d:001624 EVAL -e:1 
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH 
c:0001 p:0000 s:0002 b:0002 l:0001d4 d:0001d4 TOP 
--------------------------- 
-- Ruby level backtrace information----------------------------------------- 
D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1078:in `collect' 
D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1078:in `component_ary' 
D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:1051:in `==' 
D:/ruby-1.9.1/lib/ruby/1.9.1/uri/generic.rb:740:in `merge' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain/uri_resolver.rb:62:in `handle' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize/chain.rb:25:in `handle' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:457:in `fetch_page' 
D:/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mechanize-0.9.3/lib/www/mechanize.rb:238:in `get' 
D:/code/h4/www/poster.rb:464:in `block in fillform' 
D:/code/h4/www/poster.rb:446:in `each' 
D:/code/h4/www/poster.rb:446:in `fillform' 
D:/code/h4/www/poster.rb:232:in `register' 
D:/code/h4/www/poster.rb:286:in `login' 
D:/code/h4/www/poster.rb:115:in `checkifworks' 
D:/code/h4/post.rb:14:in `block in <top (required)>' 
D:/code/h4/post.rb:13:in `times' 
D:/code/h4/post.rb:13:in `<top (required)>' 
-e:1:in `load' 
-e:1:in `<main>' 

[NOTE] 
You may encounter a bug of Ruby interpreter. Bug reports are welcome. 
For details: http://www.ruby-lang.org/bugreport.html 


This application has requested the Runtime to terminate it in an unusual way. 
Please contact the application's support team for more information. 
+0

Etes-vous sûr que c'est l'implémentation de Ruby qui est buggée et pas votre script Ruby complexe? –

+2

Toutes les versions de Ruby sont à peu près "stables". Vous ne devriez pas rencontrer beaucoup de bugs dans un environnement sain. Avez-vous d'autres problèmes similaires sur la machine votre code? Pour moi, cela ressemble à un problème matériel, principalement parce que vous dites que cela arrive à des moments aléatoires et à des endroits aléatoires. Les bogues entraînant des erreurs de segmentation sont souvent répétables. – Koraktor

+0

Koraktor, je l'ai essayé sur un autre PC, toujours la même chose, je ne reçois pas d'autres erreurs sur l'un des – Fluffy

Répondre

2

Je ne peux penser qu'à trois choses que vous avez probablement déjà considérées. Mais pour l'enregistrement:

  1. Essayez jRuby, juste pour voir ce qui se passe. Cela peut poser des problèmes avec les extensions natives dans toutes ces bibliothèques.

  2. Mettez cela sur un forum de rubis.

  3. Mordez la balle, compilez ruby ​​avec -g, et déboguez le code C. Si vous résoudre ce problème, je vous enverrai une bouteille de vin de la côte centrale, si c'est légal ...

2

La version 1.8.6 était la version actuelle depuis longtemps. 1.9 est la dernière version, bien qu'elle ait introduit quelques incompatibilités avec les anciens programmes Ruby. 1.8.7 a été publié comme une sorte de «pont» entre 1.8 et 1.9, incorporant certaines fonctionnalités rétrocompatibles plus récentes, mais en conservant l'ancien interpréteur plutôt que la nouvelle machine virtuelle YARV. En ce qui concerne «moins de buggy», je ne sais pas vraiment comment répondre à cette question. Je n'ai pas rencontré beaucoup de bugs dans une version de Ruby elle-même. Le seul que je puisse me souvenir d'avoir eu un bug est 1.8.6, mais c'était il y a des années. Qu'est-ce qui vous rend certain que les bogues sont dans Ruby et non dans les bibliothèques avec lesquelles vous l'utilisiez? Vous dites que vous avez rencontré des bugs dans trois versions différentes, il peut donc être raisonnable de regarder l'autre code impliqué.

+6

Dans mon expérience, des problèmes comme celui-ci ont tendance à se situer à l'un des trois niveaux suivants: par ordre croissant de vraisemblance: le langage, les bibliothèques, le propre code du développeur. J'ai vu le premier peut-être une fois, le deuxième quelques fois et le troisième tous les jours pendant 30 ans. Je sais sur lequel je parie ... :-) –

+2

Le code Pure Ruby ne devrait jamais segfault - si c'est le cas, c'est la preuve d'un bogue plus profond - donc à moins qu'il ne crée des extensions C, il me semble plus probable que ses bibliothèques ne sont pas configurés correctement. – Chuck

0

Ruby et brûlant comme s'écraser ce n'est pas un gros problème pour moi. Vous obtenez une erreur, vous google à ce sujet, demander Stack Overflow, ou utiliser une autre gemme, ou faire quelque chose de différent. La principale chose qui me préoccupe est la langue qui vous donne des informations incorrectes - par exemple, scinder une chaîne de façon incorrecte. J'ai découvert que JRuby et Rubinius se sont rendus coupables de bugs d'informations erronées, mais je n'ai jamais rencontré d'IRM ou de YARV. Des exemples de Rubinius: 505 et 513, et un exemple JRuby est 5461.

J'ai travaillé sur le Small Eigen Collider pour détecter les incohérences et les erreurs de segmentation dans les différentes implémentations.

-1

Pour moi, la meilleure solution était: passer à Linux :).Après cela, tous mes problèmes, magiquement, ont été résolus!

Bien sûr, ce n'est pas une réponse, mais peut être une solution.

+3

Sans vouloir être impoli, s'agissait-il plutôt de quitter Windows? –

+0

"Je l'ai essayé ... 1.8.7 sous Ubuntu, toujours le même comportement" – Fluffy

+0

+1 Andrew :) peut-être ... – kfl62

Questions connexes