Greetings, I have created a GUI to generate a output text file using wxruby. my program codes are about ~1400 lines. ruby : 1.8.6 wxruby : 1.9.7 rails : 2.1.0 FYI, I am using the TextCtrl & combobox in the main GUI to get the output file name and main settings. after clicking the button, it will pop up another frame which let user to select and modified settings with TextCtrl & combobox. By clicking the button on the new GUI, an output file will be generated. But problem occurred if i want to generate multiple files. When i enter the new name in the TextCtrl for creating new file, the GUI will close immediately with this error pop up -- > "Bug:Segmentation Fault" May i know is there any reference for me or suggestion to fix this problem? Your help will be highly appreciated. =) -- Posted via http://www.ruby-forum.com/.
Mario Steele
2009-Jan-13 07:46 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
Well, there''s two things here. First, your using 1.9.7 of Ruby, please upgrade to 1.9.9, and test again, before moving on to this second part, there have been many bug fixes between 1.9.7 and 1.9.9. Second, and do this only after you tried the first part, if the problem still occurs, please send us a Minimal example, that can reproduce the problem that your having, so that we can test it, and see what exactly is going on. hth, Mario On Tue, Jan 13, 2009 at 1:39 AM, Lc Yeap <lists at ruby-forum.com> wrote:> Greetings, > > I have created a GUI to generate a output text file using wxruby. my > program codes are about ~1400 lines. > ruby : 1.8.6 > wxruby : 1.9.7 > rails : 2.1.0 > > FYI, I am using the TextCtrl & combobox in the main GUI to get the > output file name and main settings. after clicking the button, it will > pop up another frame which let user to select and modified settings with > TextCtrl & combobox. By clicking the button on the new GUI, an output > file will be generated. > > But problem occurred if i want to generate multiple files. When i enter > the new name in the TextCtrl for creating new file, the GUI will close > immediately with this error pop up -- > "Bug:Segmentation Fault" > > May i know is there any reference for me or suggestion to fix this > problem? > > Your help will be highly appreciated. =) > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090113/4aa0347f/attachment-0001.html>
Mario Steele
2009-Jan-13 07:46 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
By 1.9.7 of Ruby, I mean 1.9.7 of wxRuby, not Ruby itself. On Tue, Jan 13, 2009 at 1:46 AM, Mario Steele <mario at ruby-im.net> wrote:> Well, there''s two things here. > > First, your using 1.9.7 of Ruby, please upgrade to 1.9.9, and test again, > before moving on to this second part, there have been many bug fixes between > 1.9.7 and 1.9.9. > > Second, and do this only after you tried the first part, if the problem > still occurs, please send us a Minimal example, that can reproduce the > problem that your having, so that we can test it, and see what exactly is > going on. > > hth, > Mario > > > On Tue, Jan 13, 2009 at 1:39 AM, Lc Yeap <lists at ruby-forum.com> wrote: > >> Greetings, >> >> I have created a GUI to generate a output text file using wxruby. my >> program codes are about ~1400 lines. >> ruby : 1.8.6 >> wxruby : 1.9.7 >> rails : 2.1.0 >> >> FYI, I am using the TextCtrl & combobox in the main GUI to get the >> output file name and main settings. after clicking the button, it will >> pop up another frame which let user to select and modified settings with >> TextCtrl & combobox. By clicking the button on the new GUI, an output >> file will be generated. >> >> But problem occurred if i want to generate multiple files. When i enter >> the new name in the TextCtrl for creating new file, the GUI will close >> immediately with this error pop up -- > "Bug:Segmentation Fault" >> >> May i know is there any reference for me or suggestion to fix this >> problem? >> >> Your help will be highly appreciated. =) >> -- >> Posted via http://www.ruby-forum.com/. >> _______________________________________________ >> wxruby-users mailing list >> wxruby-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/wxruby-users >> > > > > -- > Mario Steele > http://www.trilake.net > http://www.ruby-im.net > http://rubyforge.org/projects/wxruby/ > http://rubyforge.org/projects/wxride/ >-- Mario Steele http://www.trilake.net http://www.ruby-im.net http://rubyforge.org/projects/wxruby/ http://rubyforge.org/projects/wxride/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090113/ec8043d8/attachment.html>
Lc Yeap
2009-Jan-13 08:28 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
Mario Steele wrote:> Well, there''s two things here. > > First, your using 1.9.7 of Ruby, please upgrade to 1.9.9, and test > again, > before moving on to this second part, there have been many bug fixes > between > 1.9.7 and 1.9.9. > > Second, and do this only after you tried the first part, if the problem > still occurs, please send us a Minimal example, that can reproduce the > problem that your having, so that we can test it, and see what exactly > is > going on. > > hth, > MarioHi Mario, thanks for the prompt response. I downloaded the "wxruby-1.9.9-x86-mswin32-60.gem" from RubyForge. by typing command ''gem install wxruby'', system reported that it has successfully installed wxruby with version 1.9.9. However, when I run my program again, the same error occurred. --> "config_vector_v6.rb:1418: [BUG] Segmentation fault ruby 1.8.6 (2007-09-24) [i386-mswin32]" so I deleted the previous gem "wxruby-1.9.7-i386-mswin32.gem" from the bin folder and reinstalled it again, but still the same error being reported. I tried with command "gem update wxruby" but I get this-->"ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) No connection could be made because the target machine actively refused it. - connect(2)(Errno::ECONNREFUSED)" Is that I am not using the correct version of wxruby? can you point me how to upgrade my wxruby? If this still fail again after using wxruby 1.9.9, I will attach a sample code of my program. Thanks again. =) -- Posted via http://www.ruby-forum.com/.
Alex Fenton
2009-Jan-13 09:03 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
Lc Yeap wrote:> However, when I run my program again, the same error occurred. --> > "config_vector_v6.rb:1418: [BUG] Segmentation fault > ruby 1.8.6 (2007-09-24) [i386-mswin32]" >You can check what version of wxRuby is being used by your program by looking at the value of Wx::WXRUBY_VERSION. It''s printed out in the "About" box of the minimal sample.> so I deleted the previous gem "wxruby-1.9.7-i386-mswin32.gem" from the > bin folder and reinstalled it again, but still the same error being > reported. >Use gem uninstall, don''t delete directly.> I tried with command "gem update wxruby" but I get this-->"ERROR: While > executing gem ... (Gem::RemoteFetcher::FetchError) > No connection could be made because the target machine actively > refused it. > - connect(2)(Errno::ECONNREFUSED)" >Make sure that you have the latest versions of rubygems installed then try installing wxruby-1.9.9 again. gem --update system> Is that I am not using the correct version of wxruby? can you point me > how to upgrade my wxruby? If this still fail again after using wxruby > 1.9.9, I will attach a sample code of my program.OK. It might be worth posting a runnable sample of your code anyway. There may be something in there obvious that''s not quite right - although wxRuby tries to raise an exception on incorrect use of the API, this isn''t always possible. Or if there is a bug, it may still exist in the latest development version, in which case sample code will help us find it quicker. a
Lc Yeap
2009-Jan-13 11:09 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
Alex Fenton wrote:> Lc Yeap wrote: >> However, when I run my program again, the same error occurred. --> >> "config_vector_v6.rb:1418: [BUG] Segmentation fault >> ruby 1.8.6 (2007-09-24) [i386-mswin32]" >> > > You can check what version of wxRuby is being used by your program by > looking at the value of Wx::WXRUBY_VERSION. It''s printed out in the > "About" box of the minimal sample. >> so I deleted the previous gem "wxruby-1.9.7-i386-mswin32.gem" from the >> bin folder and reinstalled it again, but still the same error being >> reported. >> > > Use gem uninstall, don''t delete directly. > > >> I tried with command "gem update wxruby" but I get this-->"ERROR: While >> executing gem ... (Gem::RemoteFetcher::FetchError) >> No connection could be made because the target machine actively >> refused it. >> - connect(2)(Errno::ECONNREFUSED)" >> > > Make sure that you have the latest versions of rubygems installed then > try installing wxruby-1.9.9 again. > > gem --update system > > >> Is that I am not using the correct version of wxruby? can you point me >> how to upgrade my wxruby? If this still fail again after using wxruby >> 1.9.9, I will attach a sample code of my program. > > OK. It might be worth posting a runnable sample of your code anyway. > There may be something in there obvious that''s not quite right - > although wxRuby tries to raise an exception on incorrect use of the API, > this isn''t always possible. Or if there is a bug, it may still exist in > the latest development version, in which case sample code will help us > find it quicker. > > aHi Alex, thanks for your reply. after follow your instructions, I have been confirmed the version of wxruby that i used is correct, which is 1.9.9. But, still the same error observed. Attached is my sample code. The error pop up when i try to generate the 2nd file. Hope will find out the cause of the error soon as i need this application to be up. Thanks a lot. =) Attachments: http://www.ruby-forum.com/attachment/3155/lcyeap_example.rb -- Posted via http://www.ruby-forum.com/.
Kirill Likhodedov
2009-Jan-13 11:22 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
Lc, you definitely need to simplify your example. Try to make it as small as possible. You need the MINIMUM example which reproduces the error. Sad to say that, but nobody will look through that amount of code you''ve given. 2009/1/13 Lc Yeap <lists at ruby-forum.com>> Alex Fenton wrote: > > Lc Yeap wrote: > >> However, when I run my program again, the same error occurred. --> > >> "config_vector_v6.rb:1418: [BUG] Segmentation fault > >> ruby 1.8.6 (2007-09-24) [i386-mswin32]" > >> > > > > You can check what version of wxRuby is being used by your program by > > looking at the value of Wx::WXRUBY_VERSION. It''s printed out in the > > "About" box of the minimal sample. > >> so I deleted the previous gem "wxruby-1.9.7-i386-mswin32.gem" from the > >> bin folder and reinstalled it again, but still the same error being > >> reported. > >> > > > > Use gem uninstall, don''t delete directly. > > > > > >> I tried with command "gem update wxruby" but I get this-->"ERROR: While > >> executing gem ... (Gem::RemoteFetcher::FetchError) > >> No connection could be made because the target machine actively > >> refused it. > >> - connect(2)(Errno::ECONNREFUSED)" > >> > > > > Make sure that you have the latest versions of rubygems installed then > > try installing wxruby-1.9.9 again. > > > > gem --update system > > > > > >> Is that I am not using the correct version of wxruby? can you point me > >> how to upgrade my wxruby? If this still fail again after using wxruby > >> 1.9.9, I will attach a sample code of my program. > > > > OK. It might be worth posting a runnable sample of your code anyway. > > There may be something in there obvious that''s not quite right - > > although wxRuby tries to raise an exception on incorrect use of the API, > > this isn''t always possible. Or if there is a bug, it may still exist in > > the latest development version, in which case sample code will help us > > find it quicker. > > > > a > > Hi Alex, > > thanks for your reply. after follow your instructions, I have been > confirmed the version of wxruby that i used is correct, which is 1.9.9. > But, still the same error observed. > > Attached is my sample code. The error pop up when i try to generate the > 2nd file. > > Hope will find out the cause of the error soon as i need this > application to be up. > > Thanks a lot. =) > > > Attachments: > http://www.ruby-forum.com/attachment/3155/lcyeap_example.rb > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090113/ad3e797d/attachment.html>
Alex Fenton
2009-Jan-13 11:41 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
Lc Yeap wrote> thanks for your reply. after follow your instructions, I have been > confirmed the version of wxruby that i used is correct, which is 1.9.9. > But, still the same error observed. > > Attached is my sample code. The error pop up when i try to generate the > 2nd file.I can reproduce the error with mswin32 1.9.9, but not with MingW on Windows (either 1.9.9 or the latest development version). If someone has a build of SVN HEAD build of mswin32 handy, perhaps they could give it a go to see if it''s resolved. As Kiril''s said, it''d be easier and quicker to help further if you could simplify this down a lot, to narrow down the source of the error. For example, I started by removing the text writing routine, then the confirmation dialog. Next step might be to remove all the controls except the ''generate'' button. I don''t have time to keep tweaking and running and clicking through your whole app right now, but if you provide a stripped-down sample demonstrating the issue, I''m happy to work with that. alex
Lc Yeap
2009-Jan-14 00:44 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
Alex Fenton wrote:> Lc Yeap wrote >> thanks for your reply. after follow your instructions, I have been >> confirmed the version of wxruby that i used is correct, which is 1.9.9. >> But, still the same error observed. >> >> Attached is my sample code. The error pop up when i try to generate the >> 2nd file. > > I can reproduce the error with mswin32 1.9.9, but not with MingW on > Windows (either 1.9.9 or the latest development version). If someone has > a build of SVN HEAD build of mswin32 handy, perhaps they could give it a > go to see if it''s resolved. > > As Kiril''s said, it''d be easier and quicker to help further if you could > simplify this down a lot, to narrow down the source of the error. For > example, I started by removing the text writing routine, then the > confirmation dialog. Next step might be to remove all the controls > except the ''generate'' button. > > I don''t have time to keep tweaking and running and clicking through your > whole app right now, but if you provide a stripped-down sample > demonstrating the issue, I''m happy to work with that. > > alexHi Kiril & Alex, Thanks for the advice and helps. I will try to simplified my code following the guidelines provided. sorry for not being clear at the beginning. Meanwhile, i will continue with my debugging works. Will keep on update if I have any finding. Thanks again. =) -- Posted via http://www.ruby-forum.com/.
John Griffiths
2009-Jan-15 13:44 UTC
[wxruby-users] Segmentation Fault : [i386-mswin32] in wxruby
had this problem on some database calls with Windows XP today too... Ruby 1.8.6 WxRuby 1.9.9 Windows Service Pack 2 What I had to do was fire the Garbage Collector before my mySQL calls GC.start res.each do |row| ... end And then call the rows specifically by number => row[1].to_s I was using row["name"] with res.each changed to res.each_hash, but it just kept flipping out with Segmentation Faults so i switched to the more simpler method above. After which it remained stable. Also got problems with NET::SFTP returning Segmentation Faults for Upload() calls, Ok with Connect() or Dir.foreach calls, but swapped that out with Putty''s SCP for quickness. -- Posted via http://www.ruby-forum.com/.