FelixdelasPozas / TrayWeather

Tray Weather is a simple application to retrieve and show weather information for a given geographic location in a small dialog and in the Windows OS system tray.
GNU General Public License v3.0
191 stars 22 forks source link

Connection to server lost and not recovered until application restart #108

Closed DRSAgile closed 2 years ago

DRSAgile commented 2 years ago

Hi, Felix,

Thanks again for the utility.

Since the last week, I happen to face the following problem: at a certain point, the application ceases to show weather and shows blue clouds instead, indicating that it is trying to connect to a server. This condition might continue for hours, if unattended: most often, the weather does not really get shown again on its own.

Not even manually selecting "Refresh" from the context menu helps most of the time.

However, if I select "Quit" and then open "Tray Weather" application anew, then the servers are magically connected again -- at least for some time -- and I see the weather data.

(I do not have any VPN services, I did not change Internet providers, and nothing else on my PC is losing connection, nor the version of your application has changed, I did not install, uninstall, turned on or off any antivirus software, inbound/outbound connection rules did not change, Ethernet/Wi-Fi router was not changed, updated or restarted during any of this.)


My request is that, if possible, to update the "Refresh" function of the application in a way that would reproduce the initial start up process, which turns out to be different enough, as seen in these repeated operational cases.

Of course, it is possible that it is an obscure Windows 10 issue due to a recent update (mine is fully updated) or something else, but for now it seems that matching "Refresh" actions with the application startup might help.

Thank you in advance.

FelixdelasPozas commented 2 years ago

Hi @DRSAgile .

Maybe your network is changing in some way and the application is not refreshing its connection correctly. In every data request the application checks if the network is somewhat "inaccesible" and if it is, it restarts its connection to it. First try enabling the roaming option in the Location configuration tab. That has a side effect that may solve your problem as it enables the networking code to check for changes periodically. If that doesn't solve it, I'll look for solutions during the weekend.

Regards, Félix.

DRSAgile commented 2 years ago

Thanks.

It works mostly fine, probably better thans to this setting.

But sometimes it crashes (this one happened during my PC awakening from hibernation):

[-]<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
[-]<System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2022-05-27T04:18:16.3885792Z" /> 
  <EventRecordID>2539738</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="0" ThreadID="0" /> 
  <Channel>Application</Channel> 
  <Computer>DESKTOP-OQ303GQ</Computer> 
  <Security /> 
  </System>
[-]<EventData>
  <Data>TrayWeather.exe</Data> 
  <Data>1.21.0.0</Data> 
  <Data>625b00a3</Data> 
  <Data>Qt5Core.dll</Data> 
  <Data>5.5.1.0</Data> 
  <Data>583f166f</Data> 
  <Data>c0000005</Data> 
  <Data>000000000019c9d6</Data> 
  <Data>36a4</Data> 
  <Data>01d86ea819c8d926</Data> 
  <Data>C:\Program Files\Tray Weather\TrayWeather.exe</Data> 
  <Data>C:\Program Files\Tray Weather\Qt5Core.dll</Data> 
  <Data>f877eb74-ec39-452d-baa7-5df605255d3a</Data> 
  <Data /> 
  <Data /> 
  </EventData>
  </Event>

Not sure that you can do anything about it since it is probably Qt5's library incompatibility with Windows 10 Pro 21H2 (fully updated), unless you can switch to 6.4, which is new and hence might be better maintained in terms of compatibility. However, this might not solve anything since it is quite possible that the issue is actually in Windows' code, rather than QT.

FelixdelasPozas commented 2 years ago

Hi @DRSAgile

Glad to hear that the disconnection problem is gone now. About the Qt library crash it might be an incompatibility with newer operating systems as the version I'm using in TrayWeather (5.5.1) is now about 7 years old. Usually I'm hesitant to ask for the Microsoft CrashDumps as maybe it can reveal some things about the user that they don't want. So we'll leave it there.

As the problem is now solved I'll close the issue, but if it reappears or something similar happens add a comment (I think you can comment even with the Issue page closed) and I'll open it again.

Regards, Félix.