Segfault when requiring both mysql and mechanize

R

Rod Dik

Hello, there's a simple script

require 'rubygems'
require 'mysql'
require 'mechanize' #it works if I delete this string

m = Mysql.new('localhost', 'h3', 'h3', 'h3')

that fails with

C:/Program Files/ActiveState Komodo IDE
5/lib/support/dbgp/rubylib/rdbgp/processor.rb:370: [BUG] Segmentation
fault
ruby 1.8.6 (2008-08-11) [i386-mswin32]

but, doesn't fail if I comment out the string requiring mechanize. How
can I fix it? TIA
 
M

Mike West

I am having the same problem in 1.9 however I don't use mechanize. My
script worked fine in version 1.8.6 but after the upgrade generates a
segmentation fault:

C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql.so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

-- control frame ----------
c:0005 p:-2710104 s:0031 b:0031 l:000030 d:000030 TOP
c:0004 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :require
c:0003 p:0023 s:0025 b:0025 l:000e5c d:000168 EVAL lib/rssbuilder.rb:5
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000e5c d:000e5c TOP <main>:427
---------------------------
-- Ruby level backtrace
information-----------------------------------------
lib/rssbuilder.rb:5:in `require'
lib/rssbuilder.rb:5:in `<main>'

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

Rod said:
Hello, there's a simple script

require 'rubygems'
require 'mysql'
require 'mechanize' #it works if I delete this string

m = Mysql.new('localhost', 'h3', 'h3', 'h3')

that fails with

C:/Program Files/ActiveState Komodo IDE
5/lib/support/dbgp/rubylib/rdbgp/processor.rb:370: [BUG] Segmentation
fault
ruby 1.8.6 (2008-08-11) [i386-mswin32]

but, doesn't fail if I comment out the string requiring mechanize. How
can I fix it? TIA
 
R

Roger Pack

C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql.so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

What about with a newer version of ruby?
-=r
 
M

Mike West

There are no binaries for the Windows version greater than 1.9.1.

I tried installing 1.8.7 but the windows distribution seems incomplete.

Other scripts work fine in 1.9.

Roger said:
C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql.so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

What about with a newer version of ruby?
-=r
 
L

Luis Lavena

I am having the same problem in 1.9 however I don't use mechanize. My
script worked fine in version 1.8.6 but after the upgrade generates a
segmentation fault:

C:/Program
Files/ruby-1.9.1/lib/ruby/gems/1.9.1/gems/mysql-2.7.1-x86-mswin32/ext/mysql .so:
[BUG] Segmentation faul
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]

How did you upgraded your Ruby? Also, did you build from source mysql
gem?

AFAIK the binary version of mysql gem is *only* for 1.8, and can't
work with 1.9 without being recompiled and linked to Ruby 1.8 runtime/
shared library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top