Here''s a revised patch for fixing get_client_data. It tackles the serious problem with the previous patch (segfault on exit) and makes the key bit of code available for sharing with other ControlWithItems classes. So it''s a candidate for applying. If it works I''ll add to other relevant places, like ListCtrl and ComboBox. The tricky part was detecting whether a pointer to a C++ object was still valid at shutdown. For some reason, the proper free method wasn''t being called, so the pointer wasn''t marked invalid. Only the director was being notified of its destruction at the right time, so I tagged the ruby object that it now pointed to nothing, and then checked the ruby object, which still hangs about, at exit cleanup. I''m not sure whether this is a wxWidgets oddity, or whether it''s because SWIG''s %freefunc doesn''t play well with directors yet. Either way, it may (or may not) illuminate some of the other random crashers on other platforms. alex -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: choice_client_data.patch Url: http://rubyforge.org/pipermail/wxruby-development/attachments/20061103/4396bf87/attachment.pl
Alex Fenton wrote:> Here''s a revised patch for fixing get_client_data.I committed this, tested on OS X and Linux. As committed it also fixes the warnings (errors under g++ 4) about casting. Got Ubuntu set up on my windows machine - amazingly easy. And wxruby2 compiles much faster. I get GTK warnings with samples but Notebook seems to be the only class that segfaults, other than that superficially stable. a
Alex Fenton wrote:> Alex Fenton wrote: > >> Here''s a revised patch for fixing get_client_data. >> > I committed this, tested on OS X and Linux. As committed it also fixes > the warnings (errors under g++ 4) about casting. > > Got Ubuntu set up on my windows machine - amazingly easy. And wxruby2 > compiles much faster. I get GTK warnings with samples but Notebook seems > to be the only class that segfaults, other than that superficially stable.ubuntu is really easy to set up. Can you tell me what options you''re using and how you''re compiling a debug version? I''m still having some trouble with this (though I haven''t tried in a while given that it takes several hours to recompile everything on that dog of a computer). Roy
Roy Sutton wrote:> ubuntu is really easy to set up. Can you tell me what options you''re > using and how you''re compiling a debug version?From memory I used --disable-shared --enable-static --enable-unicode --with-png=builtin --with-tif=builtin --with-zlib=builtin --with-jpeg=builtin So I didn''t compile a debug version - this is probably the difference. I can stick a GC.start in a menu item in bigdemo and things are fine. Should I try debug? I''m happy to keep an eye on the Linux port for now cos it''s on a decent machine and I know the build environment (gcc/bash/wx-config etc). How are things looking on Windows on a release build gem? Is it still very unstable? I''d like to try and get a new release out in the next few weeks. cheers alex