With the attached code I can call the Login dialog from the splash
and don't see any crashes any more. The main change was to use
wx.CallAfter instead of directly calling the method to show the login
dialog.
Werner,
I don't find wx.CallAfter in the code you sent, but I will use it to
replace the .Show(Login) command.
It is in the code I sent with post time of 15.32 and it is in PwSplashScreen.OnClose method.
Just noted that I still had the MicroSleep in there, which is not needed, which means 'showLogin' doesn't need to know about the splash.
I am getting an error trying to replay to you directly:
domain has no valid mail exchangers
···
On 7/25/2014 17:27, Rich Shepard wrote:
On Fri, 25 Jul 2014, Werner wrote:
With the attached code I can call the Login dialog from the splash and don't see any crashes any more. The main change was to use wx.CallAfter instead of directly calling the method to show the login dialog.
Werner,
I tried to emulate your code. In pwSplashScreen() I made this change:
def OnClose(self, evt):
# Make sure the default handler runs too so this window gets
# destroyed
evt.Skip()
self.Hide()
# if the timer is still running then go ahead and show the main
# frame now
if self.fc.IsRunning():
self.fc.Stop() #self.ShowMain() #self.ShowLogin()
wx.CallAfter(self.ShowLogin())
The result was another segfault:
Traceback (most recent call last):
File "./pw.py", line 160, in OnClose
wx.CallAfter(self.ShowLogin())
File "/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line
16756, in CallAfter
assert callable(callableObj), "callableObj is not callable"
AssertionError: callableObj is not callable
Fatal Python error: Segmentation fault
Current thread 0xb72de6c0:
File "/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 7952
in MainLoop
File "/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8660
in MainLoop
File "./pw.py", line 3541 in main
File "./pw.py", line 3545 in <module>
Segmentation fault
So I must have put the wx.CallAfter() command in the wrong method. Where
did you place it?
P.S.
I am getting an error trying to replay to you directly:
domain has no valid mail exchangers
That makes no sense; I run my own mail server and mail should come
directly here. However, I see that my current IP address (which the telco
keeps switching) points to Frontier Communications rather than to my
mail server.