David Beswick
2011-Mar-26 23:02 UTC
[wxruby-development] Information about failures on 64-bit Ubuntu, ruby 1.9.1
Hi everyone, I''ve been encountering segfaults when trying to run wxruby programs on Ubuntu with ruby 1.9.1. It''s the issue seen here: http://rubyforge.org/pipermail/wxruby-users/2010-October/005650.html The problem happens if you either use the gem or build wxWidgets and wxruby from source. I think it''s just a 64-bit issue but I''m not sure. I found a way to work around this issue by modifying the pixman package and rebuilding wxWidgets and wxruby from source, linking to the modified pixman. I used pixman 0.20.2. In the file pixman/pixman.c, function "lookup_composite_function", I ifdef-ed out the following code: for (i = 0; i < N_CACHED_FAST_PATHS; ++i) { const pixman_fast_path_t *info = &(cache->cache[i].fast_path); /* Note that we check for equality here, not whether * the cached fast path matches. This is to prevent * us from selecting an overly general fast path * when a more specific one would work. */ if (info->op == op && info->src_format == src_format && info->mask_format == mask_format && info->dest_format == dest_format && info->src_flags == src_flags && info->mask_flags == mask_flags && info->dest_flags == dest_flags && info->func) { *out_imp = cache->cache[i].imp; *out_func = cache->cache[i].fast_path.func; goto update_cache; } } And then wxruby works. So it looks like disabling the "fast path caching" feature of pixman fixes the bug. I''m wondering where to go from here. Is it a pixman bug? wxWidgets bug? wxRuby bug? Ubuntu bug? I''m thinking it must be some interaction between wxruby and Ubuntu, because the standard wxWidgets samples (I tried treectrl, combo, dialogs) don''t trigger the segfault when linked with unmodified pixman, but the wxRuby samples do (bigdemo). Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-development/attachments/20110327/2ded7354/attachment.html>