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?