I am getting a segmentation fault when launching a simple FileDialog on Centos5.
Python 2.6.5 (r265:1380, Oct 31 2014, 11:02:49)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import wx
wx.version()
‘3.0.1.1 gtk2 (classic)’
``
When I try the attached sample program I see the FileDialog momentarily flash up before disappearing due to the Seg Fault.
I have tried the sample on both Ubuntu and Windows without any problems.
From trawling through the mailing lists I have seen past references to problems with FileDialog but nothing recent. Has anyone else seen this problem?
Current thread 0xb7f318e0 (most recent call first):
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_windows.py”, line 805 in ShowModal
File “sample.py”, line 6 in dialog_func
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 16863 in Notify
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_misc.py”, line 1367 in Notify
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 7952 in MainLoop
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 8657 in MainLoop
File “sample.py”, line 20 in
Segmentation fault
``
After including the faulthandler module I got the following printout.
A few years ago, I did some work on Centos 5.5 using Python 2.4, wxPython 2.8.9
The below code worked for me.
Notice that I specified the wx.FileDialog parameters.
Current thread 0xb7f318e0 (most recent call first):
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_windows.py”, line 805 in ShowModal
File “sample.py”, line 6 in dialog_func
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 16863 in Notify
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_misc.py”, line 1367 in Notify
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 7952 in MainLoop
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 8657 in MainLoop
File “sample.py”, line 20 in
Segmentation fault
``
After including the faulthandler module I got the following printout.
I tried setting the params as you suggested and found that there was no change, still got the seg fault.
We just recently updated to wxPython 3.0.1.1 from 2.8.11, so I switched back to 2.8.11 and found that the file dialog launches with no issues. So for us at least it has been introduced in the upgrade to wxPython 3.
Glen
···
On Wednesday, December 17, 2014 4:15:49 AM UTC+10:30, bruce g wrote:
Glen,
A few years ago, I did some work on Centos 5.5 using Python 2.4, wxPython 2.8.9
The below code worked for me.
Notice that I specified the wx.FileDialog parameters.
Current thread 0xb7f318e0 (most recent call first):
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_windows.py”, line 805 in ShowModal
File “sample.py”, line 6 in dialog_func
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 16863 in Notify
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_misc.py”, line 1367 in Notify
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 7952 in MainLoop
File “/work/packages/arch/linux-gcc41-x86/lib/python2.6/site-packages/wx-3.0-gtk2/wx/_core.py”, line 8657 in MainLoop
File “sample.py”, line 20 in
Segmentation fault
``
After including the faulthandler module I got the following printout.
The variable 'frame' is not defined in your method 'dialog_func', what happens if you change that to 'None' or pass it in as a parameter to the method?
Werner
···
On 12/15/2014 1:48, Glen Olafsen wrote:
Hi All,
I am getting a segmentation fault when launching a simple FileDialog on Centos5.
You should wxPython 3.0.2 a try, maybe this has been fixed
···
On Tuesday, December 16, 2014 2:49:34 PM UTC-8, Glen Olafsen wrote:
Thanks Bruce,
I tried setting the params as you suggested and found that there was no change, still got the seg fault.
We just recently updated to wxPython 3.0.1.1 from 2.8.11, so I switched back to 2.8.11 and found that the file dialog launches with no issues. So for us at least it has been introduced in the upgrade to wxPython 3.