Seg fault on Linux

Hi,

I've got a wxPython application which runs fine on Windows XP (2.5.1.5),
but seg faults when I try to run it on Linux (GTK2). I'm using wxPython
'2.5.1.1u' from debian experimental with GTK-2.4.

What should I do, compile wxPython-2.5.1.5 from source?

Cheers,
Jonathan

Jonathan Viney wrote:

Hi,

I've got a wxPython application which runs fine on Windows XP (2.5.1.5),
but seg faults when I try to run it on Linux (GTK2). I'm using wxPython
'2.5.1.1u' from debian experimental with GTK-2.4.

There were several bug fixes between 2.5.1.1 and 2.5.1.5, so it could be one of those. Can you narrow down the segfault at all?

What should I do, compile wxPython-2.5.1.5 from source?

Or bug Ron about doing another build of the .deb's.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

When the application starts, I run a database connection in a seperate
thread. If the database connection could not be made, a wx.MessageDialog
is displayed, it seems that the displaying of this dialog causes the
error. The only reason I found the problem was because I had forgotten
to update the user/pass used for connecting.

I put a bunch of print statements through the code to see where it was
getting up to, and the position changed when it ran each time (well,
most of the time), which is probably a result of how fast the database
connection was made and then rejected.

The sequence I use on startup is:

app = SKiMApp(0) # wx.App instance
database_thread.start() # start the database thread, make a
                          # connection, wx.MessageDialog made in thread
                          # to display any error
app.makeMainWindow() # Draws the main window
app.showLoginScreen() # Show a modal login dialog
app.MainLoop()

As a sidenote, the splash screen also doesn't work, I get the error:

Traceback (most recent call last):
  File "skim_run.py", line 52, in ?
    main()
  File "skim_run.py", line 46, in main
    app.showSplashScreen()
  File "skim_run.py", line 24, in showSplashScreen
    self.splash = SKiMSplashScreen()
  File "skim_run.py", line 41, in __init__
    style=wx.SIMPLE_BORDER|wx.FRAME_NO_TASKBAR|wx.STAY_ON_TOP)
  File
"/home/ron/devel/debian/wxwindows/2.5.1.1-debs/wxwidgets2.5-2.5.1.1/wxPython/../debian/libwxgtk2.5-python/usr/lib/python2.3/site-packages/wx/windows.py", line 550, in __init__
SystemError: ../Objects/longobject.c:197: bad argument to internal
function

This all works fine on Windows.

Cheers,
Jonathan

···

On Wed, 2004-04-28 at 00:34 -0700, Robin Dunn wrote:

Jonathan Viney wrote:
> Hi,
>
> I've got a wxPython application which runs fine on Windows XP (2.5.1.5),
> but seg faults when I try to run it on Linux (GTK2). I'm using wxPython
> '2.5.1.1u' from debian experimental with GTK-2.4.
>

There were several bug fixes between 2.5.1.1 and 2.5.1.5, so it could be
one of those. Can you narrow down the segfault at all?

Jonathan Viney wrote:

As a sidenote, the splash screen also doesn't work, I get the error:

Traceback (most recent call last):
  File "skim_run.py", line 52, in ?
    main()
  File "skim_run.py", line 46, in main
    app.showSplashScreen()
  File "skim_run.py", line 24, in showSplashScreen
    self.splash = SKiMSplashScreen()
  File "skim_run.py", line 41, in __init__
    style=wx.SIMPLE_BORDER|wx.FRAME_NO_TASKBAR|wx.STAY_ON_TOP)
  File
"/home/ron/devel/debian/wxwindows/2.5.1.1-debs/wxwidgets2.5-2.5.1.1/wxPython/../debian/libwxgtk2.5-python/usr/lib/python2.3/site-packages/wx/windows.py", line 550, in __init__
SystemError: ../Objects/longobject.c:197: bad argument to internal
function

This was fixed in one of the later release cantidates. One of the values passed to whatever is called on line 41 is probably a float where an int is expected.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Ah, I may have something a bit more useful now. I seem to always get a
segfault if I create a wx.MessageDialog with None as the parent, if I
specify a parent, it is fine.

Thanks for the help.

Cheers,
Jonathan

···

On Wed, 2004-04-28 at 00:34 -0700, Robin Dunn wrote:

Jonathan Viney wrote:
> Hi,
>
> I've got a wxPython application which runs fine on Windows XP (2.5.1.5),
> but seg faults when I try to run it on Linux (GTK2). I'm using wxPython
> '2.5.1.1u' from debian experimental with GTK-2.4.
>

There were several bug fixes between 2.5.1.1 and 2.5.1.5, so it could be
one of those. Can you narrow down the segfault at all?

Jonathan Viney wrote:

···

On Wed, 2004-04-28 at 00:34 -0700, Robin Dunn wrote:

Jonathan Viney wrote:

Hi,

I've got a wxPython application which runs fine on Windows XP (2.5.1.5),
but seg faults when I try to run it on Linux (GTK2). I'm using wxPython
'2.5.1.1u' from debian experimental with GTK-2.4.

There were several bug fixes between 2.5.1.1 and 2.5.1.5, so it could be one of those. Can you narrow down the segfault at all?

Ah, I may have something a bit more useful now. I seem to always get a
segfault if I create a wx.MessageDialog with None as the parent, if I
specify a parent, it is fine.

Yep, this is a known issue that I am working on right now. wxGTK2 is now using a native API for the message dialog instead of a generic class derived from wxDialog and it is causing few strange problems unless you use it just right.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!