python.exe aborts when quitting FlashingTaskbarIcon example

Hi all,

being a wxpython-newbie, I'd like to use this example as a starting
point:
http://wiki.wxpython.org/index.cgi/FlashingTaskbarIcon

using this (unicode) configuration:
wxPython version: 2.6.1.0
Python version: 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit
(Intel)]
Platform: win32

I have problems running (actually: quitting) the example; when I
right-click the taskbaricon to close the application, MS Windows gives
me the error window stating:
python.exe has encountered a problem and needs to close. We are sorry
for the inconvenience.

And:
AppName: python.exe AppVer: 0.0.0.0 ModName:
wxmsw26uh_vc.dll
ModVer: 2.6.1.0 Offset: 00190a14

When I add these lines to the __init__ method of class TaskBarApp:
        import time
        time.sleep(3)
        self.Close(true)
        self.tbicon.Destroy()

the application quits properly after 3 seconds.

Is this a bug (unhandled event or something), or does the code need some
simple adaptation? Apparently, the author is still on vacation, or not
closely involved with the code anymore.

Thanks in advance for any help or hints,
Roger

Hello Roger,

Hi all,

being a wxpython-newbie, I'd like to use this example as a starting
point:
http://wiki.wxpython.org/index.cgi/FlashingTaskbarIcon

using this (unicode) configuration:
wxPython version: 2.6.1.0
Python version: 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit
(Intel)]
Platform: win32

I have problems running (actually: quitting) the example; when I
right-click the taskbaricon to close the application, MS Windows gives
me the error window stating:
python.exe has encountered a problem and needs to close. We are sorry
for the inconvenience.

yes it seems to be a bug for me.

And:
AppName: python.exe AppVer: 0.0.0.0 ModName:
wxmsw26uh_vc.dll
ModVer: 2.6.1.0 Offset: 00190a14

When I add these lines to the __init__ method of class TaskBarApp:
       import time
       time.sleep(3)
       self.Close(true)
       self.tbicon.Destroy()

the application quits properly after 3 seconds.

This one also doesn't work for me.
German: "pythonw.exe" - Fehler in Anwendung
Die Anweisung in "0x00df1164" verweist auf Speicher in "0x00000034". Der Vorgang
"read" konnte nciht auf dem speicher durchgeführt werden,
About: The command in "0x00df1164" refers to the memore in "0x00000034".

If I choose cancel (VC++ starts in Debugger mode)
Unhandled Exception in pythonw.exe (wx
This is caused by the self.tbicon.Destroy.

Neiter the time.sleep(3) helped here.
WinXP, wxPython 2.6.1.1 and 2.6.0 the same erronous behaviour.

···

On Tue, 16 Aug 2005 10:03:37 +0200, "Roger Erens" <r.erens@eurosys.nl> wrote:

Is this a bug (unhandled event or something), or does the code need some
simple adaptation? Apparently, the author is still on vacation, or not
closely involved with the code anymore.

Thanks in advance for any help or hints,
Roger

--
Franz Steinhaeusler

Hi Roger,

I think the culprit was the timer, after changing the right click event to stop the timer it shuts down normally for me on Win XP with wxPython 2.6.1.0

    def OnTaskBarRightClick(self, evt):
        try:
            self.icontimer.Stop()
        except:
            pass
        self.tbicon.Destroy()
        self.Close(True)
        wx.GetApp().ProcessIdle()

I updated the attached to the new name space.

See you
Werner

Roger Erens wrote:

flashingtaskbaricon.py (2.01 KB)

···

Hi all,

being a wxpython-newbie, I'd like to use this example as a starting
point:
http://wiki.wxpython.org/index.cgi/FlashingTaskbarIcon

using this (unicode) configuration:
wxPython version: 2.6.1.0
Python version: 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit
(Intel)]
Platform: win32

I have problems running (actually: quitting) the example; when I
right-click the taskbaricon to close the application, MS Windows gives
me the error window stating:
python.exe has encountered a problem and needs to close. We are sorry
for the inconvenience.

And:
AppName: python.exe AppVer: 0.0.0.0 ModName:
wxmsw26uh_vc.dll
ModVer: 2.6.1.0 Offset: 00190a14

When I add these lines to the __init__ method of class TaskBarApp:
       import time
       time.sleep(3)
       self.Close(true)
       self.tbicon.Destroy()

the application quits properly after 3 seconds.

Is this a bug (unhandled event or something), or does the code need some
simple adaptation? Apparently, the author is still on vacation, or not
closely involved with the code anymore.

Thanks in advance for any help or hints,
Roger

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hello Werner,

yes, thank you, this was the problem.

However, to throw an exception/catch such an error would be helpful.

···

On Tue, 16 Aug 2005 12:39:30 +0200, "Werner F. Bruhin" <werner.bruhin@free.fr> wrote:

Hi Roger,

I think the culprit was the timer, after changing the right click event
to stop the timer it shuts down normally for me on Win XP with wxPython
2.6.1.0

   def OnTaskBarRightClick(self, evt):
       try:
           self.icontimer.Stop()
       except:
           pass
       self.tbicon.Destroy()
       self.Close(True)
       wx.GetApp().ProcessIdle()

I updated the attached to the new name space.

See you
Werner

--
Franz Steinhaeusler

Hi Franz,

Franz Steinhäusler wrote:

Hi Roger,

I think the culprit was the timer, after changing the right click event to stop the timer it shuts down normally for me on Win XP with wxPython 2.6.1.0

  def OnTaskBarRightClick(self, evt):
      try:
          self.icontimer.Stop()
      except:
          pass
      self.tbicon.Destroy()
      self.Close(True)
      wx.GetApp().ProcessIdle()

I updated the attached to the new name space.

See you
Werner

Hello Werner,

yes, thank you, this was the problem.

However, to throw an exception/catch such an error would be helpful.

Yeap, that would be nice.

I am hopeing that improving on this situation is what Robin and others talked about in the thread back in June "[wxPython-dev] Re: own handling of uncaught exceptions in Python code".

--
Franz Steinhaeusler

See you
Werner

···

On Tue, 16 Aug 2005 12:39:30 +0200, "Werner F. Bruhin" <werner.bruhin@free.fr> wrote: