CollapseLauncher / Collapse

An Advanced Launcher for miHoYo/HoYoverse Games
MIT License
1.36k stars 64 forks source link

[Bug]: Collapse crash when repairing files #376

Closed BUnipendix closed 6 months ago

BUnipendix commented 7 months ago

Affected Version

Collapse 1.73.0 preview

Bug Behavior

Situation 1: At first it will be stuck for a while when the CPU usage didn't increase, then the program crashed directly only with deadlock error(the log file was overrided so I can't show full log exactly) Situation 2: I checked the game files, and I was sure that the Persistent folder also had related files, and the temporary files were also there, so I removed the temporary files and continued to download. At first it started successfully, but then it crashed again, and this time the logs didn't report any error messages. Situation 3: I deleted the files in the persistent folder and it showed that no file was broken.

Expected Behavior

download successsfully and remove related persistent files.

Steps to reproduce

put same file both in streaming and persistent

Related Issues

No response

Screenshot(s)

No response

Additional Information

Situation 3 log Situation 2 log

bagusnl commented 7 months ago

Hi! Thanks for sending a bug report for Collapse. Since this seems like a full app crash, can you send me if there is any logs related to Collapse in the event viewer?

BUnipendix commented 7 months ago

Hi! Thanks for sending a bug report for Collapse. Since this seems like a full app crash, can you send me if there is any logs related to Collapse in the event viewer?

Collapse just crash without any attention. all the logs are upload and attach in the report

bagusnl commented 7 months ago

There is no Application Crash on the Event Viewer when the full crash happened? image

In the meantime, we will also try to replicate the issue on our end

BUnipendix commented 7 months ago

sorry, my mother tongue is not English so I didn't realize what is event viewer 图片

bagusnl commented 7 months ago

I see, seems like a .NET native crash. We will dig more.

I also have noticed you got a warning for file CS_Chap02_Act660.usm that is found on both persistent and StreamingAssets. After rebuilding the persistent folder by launching the game or doing cache update, can you check if there is 2 files with exactly that name? If you have trouble searching the file, you can use tool like WizFile to make it easier https://antibody-software.com/wizfile/download

BUnipendix commented 7 months ago

I see, seems like a .NET native crash. We will dig more.

I also have noticed you got a warning for file CS_Chap02_Act660.usm that is found on both persistent and StreamingAssets. After rebuilding the persistent folder by launching the game or doing cache update, can you check if there is 2 files with exactly that name? If you have trouble searching the file, you can use tool like WizFile to make it easier https://antibody-software.com/wizfile/download

yes, there is. I wrote all I know in the report.

rapdodge commented 7 months ago

I've got same.

[...]
[Warn] [09:13:57.041]  File [T: Video]: E:\Gim\Star Rail\Games\StarRail_Data\StreamingAssets\Video\Windows\CS_Chap02_Act660.usm is redundant (exist both on persistent and streaming)
[Info] [09:14:55.037]  Session: 1/4 has been started for the URL: https://autopatchos.starrails.com/asb/V1.6Live/output_6136744_79b531ef4b/client/Windows/Video/CS_Chap02_Act660.usm
[Info] [09:14:55.096]  Session: 2/4 has been started for the URL: https://autopatchos.starrails.com/asb/V1.6Live/output_6136744_79b531ef4b/client/Windows/Video/CS_Chap02_Act660.usm

After click fixing, it's forced close...

Left are StreamingAssets & right are Persistent

image

bagusnl commented 7 months ago

Bug identified by @neon-nyan

The problem lies in the duplicate file detection, while the detection method is global, the deletion method is not, causing a call to inexistent method.

Workaround

Manually delete ONE of the files, preferably the one inside Persistent folder

Task assigned to neon

bagusnl commented 7 months ago

Heya!~

Update on this issue, it should have been fixed with the following commit https://github.com/CollapseLauncher/Collapse/commit/cc489ff94952a545c27eea1302cce684e4e733f6

Next update for Collapse on both Stable and Preview should come with this fix

Sorry for the inconvenience and thank you for your support!

bagusnl commented 6 months ago

Closing as fix has been deployed