Collapse icon indicating copy to clipboard operation
Collapse copied to clipboard

[Bug]: Launcher crashes when trying to use global region in any game

Open uberlegen12 opened this issue 8 months ago • 11 comments

Affected Version

1.82.21

Bug Behavior

The launcher crashes when trying to use the global region of any game, other regions work fine

Expected Behavior

The launcher should work fine on Global region, not just Mainland China or BiliBili

Steps to reproduce

  1. Open the launcher on global region/try to switch to global region
  2. The launcher will crash

Related Issues

No response

Screenshot(s)

Image

Image

Additional Information

FATAL ERROR ON APP MAIN() LEVEL AND THE MAIN THREAD HAS BEEN TERMINATED!!!
System.NullReferenceException: Arg_NullReferenceException
   at CollapseLauncher.GamePresetProperty..ctor(UIElement uiElementParent, RegionResourceProp apiResourceProp, String gameName, String gameRegion)
   at CollapseLauncher.Statics.GamePropertyVault.RegisterGameProperty(UIElement uiElementParent, RegionResourceProp apiResourceProp, String gameName, String gameRegion)
   at CollapseLauncher.Statics.GamePropertyVault.GetCurrentGameProperty()
   at CollapseLauncher.XAMLs.Theme.CustomControls.UserFeedbackDialog.UserFeedbackDialog.OnApplyTemplate()
   at Microsoft.UI.Xaml.FrameworkElement.Microsoft.UI.Xaml.IFrameworkElementOverrides.OnApplyTemplate()
   at ABI.Microsoft.UI.Xaml.IFrameworkElementOverrides.Do_Abi_OnApplyTemplate_2(IntPtr thisPtr)

DxDiag.txt

uberlegen12 avatar Apr 09 '25 13:04 uberlegen12

Heya! This might be caused by either metadata update corruption or the local Collapse game config being broken. Here are some steps to fix it

Resetting the launcher metadata

If you can go to the App Settings, go there and scroll down on the right panel there is "Clear metadata and restart" button, it should do what it says it does. If you can't go to app settings, assuming you use the default launcher location when setting up the launcher for the first time, you can go to %AppData%\..\LocalLow\CollapseLauncher\GameFolder, delete the entire _metadatav3 folder there then restart the launcher

if that did not fix the issue:

Resetting the local game config

On the same folder as above, go to the folder of the region where you have problem in (*Glb where * could be GI for Genshin Impact, SR for StarRail, and HI3 for Honkai Impact 3rd), delete the config.ini file then relaunch the launcher

You will be asked to locate the game next time you chose that region.

if that still an issue, go ahead and on the Collapse' app data folder, go to _logs folder and send us the latest log file from there, we can try to analyze the issue

bagusnl avatar Apr 09 '25 13:04 bagusnl

Hi, i tried both the steps you mentioned but the issue still persists. I also tried deleting all the folders and reinstalling the launcher with no avail.

Here is the latest log file

log-2025-04-09-sta1.82.21-id1-11-00-07.log

uberlegen12 avatar Apr 09 '25 14:04 uberlegen12

Do you have a proxy/VPN/CustomDNS setup by any chance? if yes try turning those off and see if the issue still appears. Because for you it seems to happen just like today based on our Sentry dashboard

Image

If you want to try, you can try our staging build that has the code fixes to try mitigate this error You can download it here https://github.com/CollapseLauncher/Collapse/actions/runs/14336740752

Pick the default one, aot or not its fine, just extract and run, do not replace your current installation as it has no mean of self updating

bagusnl avatar Apr 09 '25 14:04 bagusnl

I’m not using either a proxy or a VPN, and I’m using Cloudflare DNS.

I tried both the default and the aot artifacts and both exhibit the same behavior, I'll send the logs from both instances.

default log-2025-04-09-pre1.83.0-id1-11-50-46.log

aot log-2025-04-09-pre1.83.0-id1-11-53-30.log

uberlegen12 avatar Apr 09 '25 14:04 uberlegen12

I'm at deadend, I'll try to summon our resident .NET/XAML experts @neon-nyan @shatyuka

While waiting, can you try repairing your Windows by running these commands in the cmd as admin then restarting your PC

SFC /SCANNOW
DISM /Online /Cleanup-Image /RestoreHealth

Note: only do this if you're not on a modded Windows (custom ISOs), if so, contact your modder for assistance

bagusnl avatar Apr 09 '25 15:04 bagusnl

Note: relates to #721

bagusnl avatar Apr 09 '25 15:04 bagusnl

I created a VM with a fresh Windows 11 install, it has the same problem. I installed Cloudflare Warp VPN in the VM and after enabling it the error disappears, and after disabling it the problem comes back. I'll attach the latest 2 logs

Cloudflare VPN log-2025-04-09-pre1.82.21-id1-12-29-43.log

No VPN log-2025-04-09-pre1.82.21-id1-12-29-56.log

uberlegen12 avatar Apr 09 '25 15:04 uberlegen12

then it's confirmed a network issue, causing the apiResourceProp to be nulled somehow, we though still need to fix the underlying issue to clear up the log data so the user have less confusion

bagusnl avatar Apr 10 '25 01:04 bagusnl

https://collapse.sentry.io/issues/15738296/events/d8af233d09fe45f098778911e31a644c/

Seems fixed? #720

shatyuka avatar Apr 10 '25 13:04 shatyuka

@shatyuka the user tried running the latest AOT build that has the fix for that issue which produces the same error

bagusnl avatar Apr 10 '25 14:04 bagusnl

Throw the exception eariler: 43f0ba2.

shatyuka avatar Apr 12 '25 07:04 shatyuka