hparra / ruby-serialport

ruby-serialport is a Ruby library that provides a class for using RS-232 serial ports
http://rubygems.org/gems/serialport
GNU General Public License v2.0
246 stars 58 forks source link

Setting read_timeout causes segmentation fault #5

Closed jpsilvashy closed 14 years ago

jpsilvashy commented 15 years ago
@sp.read_timeout=1000
(irb):10: [BUG] Segmentation fault
ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
hparra commented 15 years ago

Known issue with original 0.7.0 source: 26937 read_timeout=() causes segmentation fault

darwin 10.0 is Snow Leopard. Are you running in 64-bit mode?

jpsilvashy commented 15 years ago

Yes, I didn’t even think of that. Is it a 64-bit issue? I noticed that the ticket you linked to is associated with 64-bit also.

Don't believe I can run in non 64-bit mode. At least I'm not sure how.

hparra commented 15 years ago

I don't know, the other ticket is what had me wondering if this was a 32 vs. 64 issue. I'm still using Leopard because it's an issue for other programs.

Snow Leopard runs a 32-bit kernel by default, but I you may be running 64-bit ruby and/or gems.

I'll try to replicate this on ruby 1.8.6 Leopard when I get the chance.

hparra commented 15 years ago

I cannot reproduce this bug using ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]

I'll test it with Snow Leopard + Ruby 1.8.7 next week.

hparra commented 15 years ago

I cannot reproduce this ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] either.

This could very well be a 64-bit issue :\

jpsilvashy commented 15 years ago

Well that actually helps alot, hopefully 1.9 addresses it, I'll test this weekend and let you know what I get.

paynerc commented 14 years ago

I have fixed the segfault issues in my fork. It is an issue when compiling and running x86_64. It affected the following methods: flow_control= read_timeout= write_timeout= rts= dtr=

hparra commented 14 years ago

Thanks for you fix.

It's not a clean merge since you've also integrated tenderlove's changes. I'm also reviewing the serialport SVN or rubyforge where many changes, including these, have already been made, but not released. Why? I do not know.

I should have a new one out soon.

paynerc commented 14 years ago

Yeah, I saw that not much was happening on rubyforge and ended up stumbling on the project here. Let me know if I can help.

hparra commented 14 years ago

This has been fixed and merged in experimental branch. Thank you!