Pathoschild / SMAPI

The modding API for Stardew Valley.
https://smapi.io/
GNU Lesser General Public License v3.0
1.71k stars 258 forks source link

Crash due to possible connectivity issue. #920

Open Holit opened 8 months ago

Holit commented 8 months ago

Describe the bug I am unable to launch the game using SMAPI. I have re-installed and verified all the files from Steam. There are no mods installed except for internal-mods, and it still doesn't work. A clear and concise description of what the bug is. Provide any other details you think might be relevant here.

To Reproduce This issue can be reproduced by launching the executable using either Steam or the console.

Log file https://smapi.io/log/fab976030b3743d4bdcfc0e1be785667

More information According to the exception log, it seems that some code around SMAPI\Framework\SCore.cs:line:1542 may be causing the problem. I launched this program under a complex network connectivity situation in China, where:

I've analyzed the code and suspect that this issue may be related to some unclosed sockets. I say this because I found that this exception (overlapped) is triggered by SMAPI\Framework\SCore.cs:line:1567, which is inside the exception branch, and the previously caught exception is related to HttpRequestException. I attempted to resolve the issue by disabling update checking by adjusting the code, and the program worked fine (by adding a 'return' statement above all the code). I stopped my analysis at this point because I am not very familiar with async programming.

First exception is raised by HttpRequestException image Second exception is raised by this.Monitor.Log( image