I suspect something is wrong with the compiling/packaging of wxPython for Linux and python 2.7.
The robotframework library Screenshot was creating a segmentation fault when using the wxPython library, with Python 2.7 (but not with Python 3.7, or when using other libraries like PyGTK or Scrot). I observed the fault on Fedora Core 30 real machine, and also on Linux Mint Debian Edition 3 and Ubuntu 18.0.4 virtual boxes.
I have found the solution to move the wx.App() call, to the global scope. It was being called inside a “private” method in a class. With this solution, the segmentation fault did not occurred.
However, on the console there was errors referring site-packages/gtk2 libraries. I have found this to be really strange because I was using the GTK3 package.
Decided to uninstall wxPython GTK3, and install the GTK2 wheel. This definitely solved the problem.
So, even if Python 2.7 is ending support in less than a month, I wonder if the GTK3 code is calling GTK2 functions or libraries.
I have used versions 4.0.6 and 4.0.7.post2 (GTK3), and then installed 4.0.7.post2 GTK2.
You can see the issue at robotframework, here
Note: I have been using the GTK3 install with RIDE, without any problems. Only when a user reported this situation with Robot Framework’s Screenshot library, needed to use the GTK2 version and my fix.