title: windows 10 system tray app crashing after several hours of running. What might be the cause?
body: <p>I really want to add more context but at the moment I'm just lost. When I click the link to show what line it failed on it points to this (' win32gui.PumpMessages() ') I can say it seems to occur after an hour or so of the computer in a standby state. Any and all help/berating of me is appreciated. I just need help. Thanks</p>
  <p>Below is a snip of the area it failed on.</p>
  <pre><code>        window_class.lpfnWndProc = message_map  # could also specify a wndproc.
      classAtom = win32gui.RegisterClass(window_class)
      # Create the Window.
      style = win32con.WS_OVERLAPPED | win32con.WS_SYSMENU
      self.hwnd = win32gui.CreateWindow(classAtom, self.window_class_name, style, 0, 0, win32con.CW_USEDEFAULT,
                                        win32con.CW_USEDEFAULT, 0, 0, hinst, None)
      win32gui.UpdateWindow(self.hwnd)
      self.notify_id = None
      self.refresh_icon()
      t = Timer(01.0, self.Deskinfo_update_version)
      t.start()
      win32gui.PumpMessages()
  </code></pre>
  <p>below is the error:</p>
  <pre><code>Fatal Python error: Cannot recover from stack overflow.
  Python runtime state: initialized
  
  Current thread 0x00003f48 (most recent call first):
    File &quot;C:\Users\johns\AppData\Local\Programs\Python\Python38\lib\ftplib.py&quot;, line 192 in putline
    File &quot;C:\Users\johns\AppData\Local\Programs\Python\Python38\lib\ftplib.py&quot;, line 201 in putcmd
    File &quot;C:\Users\johns\AppData\Local\Programs\Python\Python38\lib\ftplib.py&quot;, line 274 in sendcmd
    File &quot;C:\Users\johns\AppData\Local\Programs\Python\Python38\lib\ftplib.py&quot;, line 401 in login
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 206 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 226 in download
    ...
  
  Thread 0x00001758 (most recent call first):
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 129 in __init__
    File &quot;C:/Users/johns/PycharmProjects/Deskinfo_sys_tray/main.py&quot;, line 506 in &lt;module&gt;
  
  Process finished with exit code -1073740791 (0xC0000409)
  </code></pre>