It was a bug with GCC 4.1.2 used by Ubuntu :( With latest SVN, wxWidgets didn't event build due to linker errors (most of them were related to STL). When I used --disable-visibility I fixed both the segmentation fault and linker errors.