Emmanuel Touzery
2004-Sep-29 01:56 UTC
[Rubyinstaller-users] incompatibility of installer with ruby-gtk2
Hello, The ruby one-click installer, including its latest versions, is incompatible with ruby-gtk2. I have a ruby-gtk2 application that runs OK under linux, OK under a ruby that i build myself with msys/gcc under windows, but crashes very fast if I use the one-click ruby. I couldn''t isolate the crash, but the application is rather small (900 lines) and the crash quick to reproduce (if you''re lucky, as it''s really random.. sometimes the application won''t crash for ages. but in general in that case restart it and then it''s fast). A ruby-gtk2 maintainer, Masao Mutoh, acknowledged the crash, but concluded he doesn''t have the knowledge how to fix it. See the discussion at: http://sourceforge.net/mailarchive/forum.php?thread_id=5652534&forum_id=9443 I don''t think it''s a new problem; I already had crash problems with ruby-gtk2 under windows, not present under linux, but I always blamed GTK. This is the first time I realised that actually if I use my home-built ruby binary, all works fine also under windows. Steps to reproduce the crash: ===================The application is at http://www.chez.com/powerpeanuts/studier_rgtk.tar.gz [17kb] You need to run it as: ruby gstudy_app.rb questions.txt The application will start, no problem. In the application in the middle you have a list "questionnaries" with two questionnaries. select one, click "Properties" in the toolbar. a new window opens. close it with the cross in the window. answer "Yes" when asked if you''re sure to close. try to reopen it. here it crashes almost every time . Otherwise if i doesn''t crash (sometimes it happens for a while) quit application, repeat that several times, or try to close the questionnary window by clicking OK instead of using the cross etc. The randomness of the crashes suggests memory corruption. Steps to build a ruby version that will NOT crash under windows: ===========================================http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_mingw (very clear and very simple, and faster to do than it seems) If you copy the generated libraries as in "How to use them with Ruby Installer For Windows" it will crash. If, however, you use the ruby binary that you built (which is in c:\MinGW\bin\ruby.exe) the application will work fine. Note that MinGW is the exclusive way the ruby-gnome2 project builds its binaries under windows. So it''s not a problem with my self-built binaries but with all the ruby-gtk2 applications. Masao Mutoh (and I guess the ruby-gnome2 project as a whole) said he won''t be able to fix it.. and neither can I. Do you have any idea? Maybe it''s an incompatibility in memory allocation or function-parameter passing between VC++ and gcc? though strange, for C compilers.. It''s of course very important for ruby-gtk2 support, so please let me know if you discover something, maybe a workaround. Thank you very much! emmanuel <http://rubyinstaller.sourceforge.net/>
Curt Hibbs
2004-Sep-29 09:45 UTC
[Rubyinstaller-users] incompatibility of installer with ruby-gtk2
First of all, thank you for your very detailed post. Since the one-click installer is built with msvc 7.1 (aka, Visual Studio.NET 2003), I think it would be very informative if it were possible to compile ruby-gtk2 with msvc instead of mingw to see if the problem goes away, or persists. I don''t know if you have the capability of doing this. If so that would be great. If not, I could give it a try, but I''m not sure when as I am currently very overloaded. Curt Emmanuel wrote:> > Hello, > > The ruby one-click installer, including its latest versions, is > incompatible with ruby-gtk2. I have a ruby-gtk2 application that runs OK > under linux, OK under a ruby that i build myself with msys/gcc under > windows, but crashes very fast if I use the one-click ruby. > I couldn''t isolate the crash, but the application is rather small > (900 lines) and the crash quick to reproduce (if you''re lucky, as it''s > really random.. sometimes the application won''t crash for ages. but in > general in that case restart it and then it''s fast). > A ruby-gtk2 maintainer, Masao Mutoh, acknowledged the crash, but > concluded he doesn''t have the knowledge how to fix it. > > See the discussion at: > http://sourceforge.net/mailarchive/forum.php?thread_id=5652534&for > um_id=9443 > > I don''t think it''s a new problem; I already had crash problems with > ruby-gtk2 under windows, not present under linux, but I always blamed > GTK. This is the first time I realised that actually if I use my > home-built ruby binary, all works fine also under windows. > > Steps to reproduce the crash: > ===================> The application is at > http://www.chez.com/powerpeanuts/studier_rgtk.tar.gz [17kb] > > You need to run it as: > ruby gstudy_app.rb questions.txt > > The application will start, no problem. In the application in the middle > you have a list "questionnaries" with two questionnaries. select one, > click "Properties" in the toolbar. a new window opens. close it with the > cross in the window. answer "Yes" when asked if you''re sure to close. > try to reopen it. here it crashes almost every time . Otherwise if i > doesn''t crash (sometimes it happens for a while) quit application, > repeat that several times, or try to close the questionnary window by > clicking OK instead of using the cross etc. > The randomness of the crashes suggests memory corruption. > > Steps to build a ruby version that will NOT crash under windows: > ===========================================> http://ruby-gnome2.sourceforge.jp/hiki.cgi?compile_mingw (very clear and > very simple, and faster to do than it seems) > > If you copy the generated libraries as in "How to use them with Ruby > Installer For Windows" it will crash. If, however, you use the ruby > binary that you built (which is in c:\MinGW\bin\ruby.exe) the > application will work fine. > Note that MinGW is the exclusive way the ruby-gnome2 project builds its > binaries under windows. So it''s not a problem with my self-built > binaries but with all the ruby-gtk2 applications. > > Masao Mutoh (and I guess the ruby-gnome2 project as a whole) said he > won''t be able to fix it.. and neither can I. Do you have any idea? Maybe > it''s an incompatibility in memory allocation or function-parameter > passing between VC++ and gcc? though strange, for C compilers.. > > It''s of course very important for ruby-gtk2 support, so please let me > know if you discover something, maybe a workaround. > > Thank you very much! > > emmanuel > <http://rubyinstaller.sourceforge.net/> > _______________________________________________ > Rubyinstaller-users mailing list > Rubyinstaller-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyinstaller-users >
Emmanuel Touzery
2004-Oct-01 05:01 UTC
[Rubyinstaller-users] incompatibility of installer with ruby-gtk2
Hello, Curt Hibbs wrote:>First of all, thank you for your very detailed post. > >Since the one-click installer is built with msvc 7.1 (aka, Visual Studio.NET 2003), I think it would be very informative if it were possible to compile ruby-gtk2 with msvc instead of mingw to see if the problem goes away, or persists. > >I don''t know if you have the capability of doing this. If so that would be great. If not, I could give it a try, but I''m not sure when as I am currently very overloaded. > >Maybe I''ll try, but I don''t promise anything. Assume I won''t do it. I quickly tried the other day but failed (the build system of ruby-gtk2 is GNU/makefiles, simply changing gcc to cl and -I... to /I didn''t make it so far). So I don''t know if I can help technically. Do you think it''s worth asking on some MinGW mailing-list if they are aware of such a possible incompatibility? But then the best is to give all the details of the building of ruby-one-click (release/debug, multithread-debug, etc..), and maybe at least to trace it in debugger while crashing to give details. For now I don''t have the time for all of this... Searching on internet about those possible incompatibilities gave no match so far. I guess people rarely mix those compilers? Sorry I can''t help much, emmanuel
Curt Hibbs
2004-Oct-01 08:23 UTC
[Rubyinstaller-users] incompatibility of installer with ruby-gtk2
Emmanuel Touzery wrote:> > Hello, > > Curt Hibbs wrote: > > >First of all, thank you for your very detailed post. > > > >Since the one-click installer is built with msvc 7.1 (aka, > Visual Studio.NET 2003), I think it would be very informative if > it were possible to compile ruby-gtk2 with msvc instead of mingw > to see if the problem goes away, or persists. > > > >I don''t know if you have the capability of doing this. If so > that would be great. If not, I could give it a try, but I''m not > sure when as I am currently very overloaded. > > > > > Maybe I''ll try, but I don''t promise anything. Assume I won''t do it. I > quickly tried the other day but failed (the build system of ruby-gtk2 is > GNU/makefiles, simply changing gcc to cl and -I... to /I didn''t make it > so far). > > So I don''t know if I can help technically. Do you think it''s worth > asking on some MinGW mailing-list if they are aware of such a possible > incompatibility? But then the best is to give all the details of the > building of ruby-one-click (release/debug, multithread-debug, etc..), > and maybe at least to trace it in debugger while crashing to give > details. For now I don''t have the time for all of this... > Searching on internet about those possible incompatibilities gave no > match so far. I guess people rarely mix those compilers?It can''t hurt to ask. I''m just using the standarda win32 makefile that ships with ruby: ruby\win32\makefile ruby\win32\makefile.sub Thanks, Curt
Emmanuel Touzery
2004-Nov-19 09:11 UTC
[Rubyinstaller-users] incompatibility of installer with ruby-gtk2
Hello, Curt Hibbs wrote:>Emmanuel Touzery wrote: > > >>Hello, >> >>Curt Hibbs wrote: >> >> >> >>>First of all, thank you for your very detailed post. >>> >>>Since the one-click installer is built with msvc 7.1 (aka, >>> >>> >>Visual Studio.NET 2003), I think it would be very informative if >>it were possible to compile ruby-gtk2 with msvc instead of mingw >>to see if the problem goes away, or persists. >> >>Just to let you know: the maintainer of ruby-gtk2 managed to compile it (experimentally for now) with the visual studio compiler, with improved stability apparently, so you can forget about this bug report. Thank you, emmanuel