Finding source of seg fault

Hi Rich,

loginissue.py (3.68 KB)

···

On 7/25/2014 16:35, 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 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.

Attached this latest version here.

Werner

Hi Rich,

wx.CallAfter(self.ShowLogin())

should be:
wx.CallAfter(self.ShowLogin)

Werner

P.S.

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?

Thanks,

Rich

Mea culpa! I missed the self.caller() in there.

Thanks,

Rich

···

On Fri, 25 Jul 2014, Werner wrote:

It is in the code I sent with post time of 15.32 and it is in PwSplashScreen.OnClose method.

wx.CallAfter(self.ShowLogin())

should be:
wx.CallAfter(self.ShowLogin)

   Thanks.

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.

Rich

···

On Fri, 25 Jul 2014, Werner wrote: