Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on startup (windows, Avalonia update) #137

Closed
ideasculptor opened this issue Nov 17, 2023 · 39 comments
Closed

Crash on startup (windows, Avalonia update) #137

ideasculptor opened this issue Nov 17, 2023 · 39 comments

Comments

@ideasculptor
Copy link

When I launch the app with Oculus app running and quest3 linked (via cable), the app starts up, displays the border of a window, and then goes away - leaving no log or any other information. If I kill the oculus app, the app starts up and the contents of the window are displayed, but then it complains about the quest3 not being connected. I've rebooted all of the things to no avail. Headset is up to date. beat saber apk is downgraded to the correct apk. I can't figure out how to prove which version of the pak is installed, butt when I go to the app store in the headset, it offers me an 'upgrade' button so it is clearly no longer running the most recent version, at least.

@Lauriethefish
Copy link
Owner

This is a known issue currently. It doesn't have anything to do with your beat saber version, so don't worry about that.

Basically, ever since I upgraded QuestPatcher to Avalonia 11, these crashes happen for some people. Worse, they don't seem to log a critical error when they happen, making it almost impossible to debug.

@Lauriethefish Lauriethefish changed the title app just exits after displaying border of window Crash on startup. Nov 17, 2023
@ideasculptor
Copy link
Author

This is a known issue currently. It doesn't have anything to do with your beat saber version, so don't worry about that.

Basically, ever since I upgraded QuestPatcher to Avalonia 11, these crashes happen for some people. Worse, they don't seem to log a critical error when they happen, making it almost impossible to debug.

For those who have a similar problem, I was able to use the Mac version with no problem despite finding the windows version to be broken with my headset. I imagine the linux version might also work, though it didn't work when I tried to use it via WSL - but I didn't try very hard to make it work since my mac worked first try.

@camdan-me
Copy link

camdan-me commented Nov 30, 2023

I'm experiencing the same issue, but QP wrote the below to the log file:

[2023-11-29 21:11:25 DBG] Saving default config file . . .
[2023-11-29 21:11:26 INF] Loading config . . .
[2023-11-29 21:11:26 DBG] QuestPatcherService constructed (QuestPatcher version 2.6.2)
[2023-11-29 21:11:26 DBG] Loading default themes
[2023-11-29 21:11:26 DBG] 2 themes loaded successfully!
[2023-11-29 21:11:26 INF] Starting QuestPatcher . . .
[2023-11-29 21:11:26 DBG] Checking for existing daemon
[2023-11-29 21:11:26 DBG] Found existing ADB daemon. Checking if it's valid for us to use
[2023-11-29 21:11:26 VRB] Checking if ADB at C:\Program Files (x86)\Touch Portal\plugins\adb\platform-tools\adb.exe is present and up-to-date

It seems to be looking for adb.exe in another program I have installed (touch portal). Not sure why.

The program ran in Windows Sandbox without issue, though I couldn't get it to connect to the quest.

Edit: After uninstalling TouchPortal, this line shows:

[2023-11-29 21:33:03 VRB] Checking if ADB at C:\Users\hello\AppData\Roaming\SideQuest\platform-tools\adb.exe is present and up-to-date

@Lauriethefish
Copy link
Owner

All this looks like intended behaviour (other than the crash). QP tries to use existing ADB daemons if one exists, as this helps compatibility with other programs.

@Lauriethefish
Copy link
Owner

I've managed to narrow down the issue to a potential bug in Avalonia's accessibility features, or maybe the Windows libraries it communicates with.
A crash dump from a user has revealed that the crash is due to a buffer overrun in UIAutomationCore.dll.

This matches up with the fact that accessibility support was added to Avalonia in v11, and the issue was not present before the upgrade to v11.

@Lauriethefish
Copy link
Owner

@ideasculptor and @camdan-me, if you're still around, it would be very helpful if you could do some testing for me?

I can send you some programs that are intended to create a minimum reproducible example to send to Avalonia, see if I can get this fixed.

@grego31430
Copy link

@Lauriethefish if needed I've the same error :)

@Lauriethefish
Copy link
Owner

Lauriethefish commented Dec 31, 2023

@grego31430 Great!

If you could get a crash dump using the following steps, that would be great. (it would be useful if anybody experiencing this problem can carry out these steps)

  1. Extract the zip file attached to this comment.
  2. Open the batch file in the extracted folder and wait a few seconds.
  3. Open QuestPatcher and wait for it to crash.
  4. Send the .dmp file here. (found in the folder where you extracted the ZIP)

@Lauriethefish
Copy link
Owner

Lauriethefish commented Dec 31, 2023

Also, to anybody that is not having this bug, it would be very helpful if you could tell me the ProductVersion and FileVersion of UIAutomationCore.dll, located in C:\Windows\System32.

If you are having this bug, but don't want to get a full crash dump, you could also perform the above steps ^^^, they would be useful information.

@ALERTua
Copy link

ALERTua commented Dec 31, 2023

Windows 11 23H2 22635.2915
UIAutomationCore.dll Version 7.2.22621.2841
QuestPatcher.exe_231231_124633.dmp.zip

@grego31430
Copy link

Here it is :)

For information the UIAutomationCore.dll :
File Ver : 7.2.22.621.2792
Product Ver : 10.0.22621.2792
QuestPatcher.exe_231231_125353.dmp

PS : I have made an new user on my computer and it's work it 🤣

@anastasty
Copy link

anastasty commented Jan 1, 2024

I have an older Mac (10.12.6) and when opening also get a crash, and system crash report from QuestPatcher. I'm going to try my newer Mac, but if the log would be helpful I'll provide it.
log.txt

@qe201020335
Copy link
Contributor

I don't have the crash but here is the info for my UIAutomationCore.dll
ProductVersion: 10.0.19041.3636
FileVersion: 7.2.19041.3636
My windows is Windows 10 Pro 19045.3803

@Lauriethefish
Copy link
Owner

Hey @anastasty, this is a windows specific bug so it would be great if you could open your own issue. I've modified the title to clarify.
Ideally include your questpatcher logs as well, located in ~/.config/QuestPatcher/logs.

@Lauriethefish Lauriethefish changed the title Crash on startup. Crash on startup (windows, Avalonia update) Jan 1, 2024
@ideasculptor
Copy link
Author

@ideasculptor and @camdan-me, if you're still around, it would be very helpful if you could do some testing for me?

I can send you some programs that are intended to create a minimum reproducible example to send to Avalonia, see if I can get this fixed.

I'm around and willing to help try to nail the problem down.

@k9rdu
Copy link

k9rdu commented Jan 15, 2024

This is a known issue currently. It doesn't have anything to do with your beat saber version, so don't worry about that.

Basically, ever since I upgraded QuestPatcher to Avalonia 11, these crashes happen for some people. Worse, they don't seem to log a critical error when they happen, making it almost impossible to debug.

Is there an older version of questlauncher available that doesn't have this issue, or can it be rebuilt with an older version of Avalonia?

@Lauriethefish
Copy link
Owner

@k9rdu You can try version 2.6.0. NB you're missing some key fixes, including automatic granting of external storage permissions. These can be manually granted by running adb shell pm grant com.beatgames.beatsaber android.permission.MODIFY_EXTERNAL_STORAGE manually, e.g. with SideQuest.

@k9rdu
Copy link

k9rdu commented Jan 15, 2024 via email

@k9rdu
Copy link

k9rdu commented Jan 15, 2024

2.5 worked ( well as far as getting the app loaded. there's some flakiness with modules but that's probably our fault).
We couldn't try 2.6 because there was no windows installation facility for it.

@Lauriethefish
Copy link
Owner

@k9rdu Sorry, gave you the wrong link, if you want 2.6.0, the link is here for the windows installer.

2.5.0 might have patched your app, however it uses an outdated modloader that won't load mods properly with quest 3. Is this the flakiness you're referring to?

@k9rdu
Copy link

k9rdu commented Jan 15, 2024 via email

@KEZALIT
Copy link

KEZALIT commented Feb 3, 2024

hello i have an issue with launching QuestPatcher.
When i try to open it with connected quest 3, it says:

QuestPatcher.Core.AdbException: chmod: chmod '/sdcard/Android/data/com.beatgames.beatsaber/files/mods/' to 0777: Operation not permitted

at QuestPatcher.Core.AndroidDebugBridge.RunCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 149
at QuestPatcher.Core.AndroidDebugBridge.RunShellCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 187
at QuestPatcher.Core.AndroidDebugBridge.RunShellCommands(List1 commands) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 174 at QuestPatcher.Core.AndroidDebugBridge.Chmod(List1 paths, String permissions) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 319
at QuestPatcher.Core.Modding.ModManager.CreateModDirectories() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 117
at QuestPatcher.Core.Modding.ModManager.LoadModsForCurrentApp() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 123
at QuestPatcher.Core.QuestPatcherService.RunStartup() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\QuestPatcherService.cs:line 129
at QuestPatcher.Services.QuestPatcherUiService.LoadAndHandleErrors() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher\Services\QuestPatcherUiService.cs:line 91

@KEZALIT
Copy link

KEZALIT commented Feb 3, 2024

hello i have an issue with launching QuestPatcher. When i try to open it with connected quest 3, it says:

QuestPatcher.Core.AdbException: chmod: chmod '/sdcard/Android/data/com.beatgames.beatsaber/files/mods/' to 0777: Operation not permitted

at QuestPatcher.Core.AndroidDebugBridge.RunCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 149 at QuestPatcher.Core.AndroidDebugBridge.RunShellCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 187 at QuestPatcher.Core.AndroidDebugBridge.RunShellCommands(List1 commands) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 174 at QuestPatcher.Core.AndroidDebugBridge.Chmod(List1 paths, String permissions) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 319 at QuestPatcher.Core.Modding.ModManager.CreateModDirectories() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 117 at QuestPatcher.Core.Modding.ModManager.LoadModsForCurrentApp() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\Modding\ModManager.cs:line 123 at QuestPatcher.Core.QuestPatcherService.RunStartup() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\QuestPatcherService.cs:line 129 at QuestPatcher.Services.QuestPatcherUiService.LoadAndHandleErrors() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher\Services\QuestPatcherUiService.cs:line 91

i already launch it before and installed some mods, but when i closed QuestPatcher and tried to open again it says this error

@sabermonkeGT
Copy link

I Got a critical error how do i fix that

@ghost
Copy link

ghost commented Feb 22, 2024

I take it this thing is dead.
Is there an alternate/manual way to do same as thing QuestPatcher?

@Lauriethefish
Copy link
Owner

QuestPatcher is not dead. Funnily enough, I don't get paid to do this, and free time comes and goes. I will write back with some suggestions in a little while.

@reallycoo1
Copy link

Hello! Sorry, I'm having the same issue as the original post. Ignore the last chap - I really appreciate all the work you've put in - but I'm freaking out a little because I'm not sure what to do now?

@Lauriethefish
Copy link
Owner

This particular problem can nearly always be fixed by running the app as administrator :)
Although, you did indicate in another post that you were getting an unhandled load error, which is not related to this issue. (this issue is when the load error causes an outright crash instead of being handled, which shouldn't be possible but I digress)

If you are getting an unhandled load error, it would be best if you could copy the contents of the error message to that issue so I can look at it and figure out what the actual problem is.

@Ka-Ekim
Copy link

Ka-Ekim commented Mar 1, 2024

Hey, i see you responded 3 days ago that this issue could typically be resolved by running as admin. I have run the installer as well as the application as administrator and am still running into the border-outline then crash issue.
Hoping for advice (Not as savy as some others here, i can give more info if told how to get it)

Update:
It seems to work when i install the stand-alone up until the moment i tell the quest3 to allow this computer to access its files. At which point the application closes and has the same issue when trying to open again.

@Fairy1234556789
Copy link

QuestPatcher.Core.AdbException: [ 0%] /data/app/~~BWZIKSEae7NhAXLdUcmzoA==/com.beatgames.beatsaber-aX44ues3S6H2NwoqEg8UbQ==/base.apk

at QuestPatcher.Core.AndroidDebugBridge.RunCommand(String command, Int32[] allowedExitCodes) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 150
at QuestPatcher.Core.AndroidDebugBridge.DownloadFile(String name, String destination) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 188
at QuestPatcher.Core.AndroidDebugBridge.DownloadApk(String packageId, String destination) in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\AndroidDebugBridge.cs:line 202
at QuestPatcher.Core.InstallManager.LoadInstalledApp() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\InstallManager.cs:line 137
at QuestPatcher.Core.QuestPatcherService.RunStartup() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher.Core\QuestPatcherService.cs:line 131
at QuestPatcher.Services.QuestPatcherUiService.LoadAndHandleErrors() in D:\a\QuestPatcher\QuestPatcher\QuestPatcher\Services\QuestPatcherUiService.cs:line 94

Unloading error no version opens on win 11 but 2.60 then when u do get it open this mess happens

@Fairy1234556789
Copy link

Fairy1234556789 commented Mar 16, 2024

This particular problem can nearly always be fixed by running the app as administrator :) Although, you did indicate in another post that you were getting an unhandled load error, which is not related to this issue. (this issue is when the load error causes an outright crash instead of being handled, which shouldn't be possible but I digress)

If you are getting an unhandled load error, it would be best if you could copy the contents of the error message to that issue so I can look at it and figure out what the actual problem is.

Done copied pasted.
Also sidequest works perfectly fine just this app causing issues.

@Fairy1234556789
Copy link

Loading app ID from legacy appId.txt
Saving config file . . .
Java version on "21.0.2" 2024-01-16 LTS

Platform-tools already installed
Creating temporary directory . . .
Pulling APK from Quest to check if modded . . .
An unhandled error occured while loading QuestPatcher
QuestPatcher.AdbException: adb: error: failed to get feature set: device offline

at QuestPatcher.DebugBridge.RunCommandAsync(String command) in D:\a\QuestPatcher\QuestPatcher\src\DebugBridge.cs:line 87
at QuestPatcher.ModdingHandler.CheckInstallStatus() in D:\a\QuestPatcher\QuestPatcher\src\ModdingHandler.cs:line 242
at QuestPatcher.MainWindow.OnLoadInternal() in D:\a\QuestPatcher\QuestPatcher\src\MainWindow.axaml.cs:line 157
at QuestPatcher.MainWindow.OnLoad(Object sender, EventArgs args) in D:\a\QuestPatcher\QuestPatcher\src\MainWindow.axaml.cs:line 122

why us this the only way to mod beat saber! So frazzled now installed every version none work im going back to the oldest beat saber that supports the easy BMBF way cause this app is frustrating especially for a disable user.

@qe201020335
Copy link
Contributor

@Fairy1234556789 Hey, looking at your logs. Your issue is not related to the avalonia crash on start issue.

I see in the logs it has the error error: failed to get feature set: device offline. You can try using adb kill-server command to stop all adb instance and try again. It also seems the USB connection is not stable, and it is disconnecting. Maybe you can try another USB port?

Also, going back to an older version of Beat Saber won't help. As long as you are using the newer version firmware or Quest 3, BMBF will not work.

@Fairy1234556789
Copy link

Fairy1234556789 commented Mar 16, 2024

@Fairy1234556789 Hey, looking at your logs. Your issue is not related to the avalonia crash on start issue.

I see in the logs it has the error error: failed to get feature set: device offline. You can try using adb kill-server command to stop all adb instance and try again. It also seems the USB connection is not stable, and it is disconnecting. Maybe you can try another USB port?

Also, going back to an older version of Beat Saber won't help. As long as you are using the newer version firmware or Quest 3, BMBF will not work.

Only have one port on this steam deck which is usb c still odd this program wont work but sidequest detects & transfers with no issues. Yea found that bmbf doesnt work thats fine im done with meta beat saber moving to pc beat saber. This steam deck is on win 11 & been able to handle other vr games. Pc beat saber easy to mod unlike meta quest version. I just wanted custom songs as I hate the remix & version in the app...

@qe201020335
Copy link
Contributor

@Fairy1234556789 quite odd that other programs such as side quest can use adb with no issue but our adb instance is throwing errors.

@Vxbess
Copy link

Vxbess commented Apr 29, 2024

QuestPatcher.exe_240429_173324.dmp
I have no idea how to find the version but heres the dmp

@Lank01
Copy link

Lank01 commented Jul 14, 2024

This is a known issue currently. It doesn't have anything to do with your beat saber version, so don't worry about that.

Basically, ever since I upgraded QuestPatcher to Avalonia 11, these crashes happen for some people. Worse, they don't seem to log a critical error when they happen, making it almost impossible to debug.

Has it been fixed. Currently trying right now and it looks like i have the same issue. Quest patcher will boot up quest i'm unlinked, however the moment i link, it will crash.

This was referenced Aug 10, 2024
@Lauriethefish
Copy link
Owner

This issue turned out to be caused by QuestPatcher using trimming in the build process.

Trimming is not supported by COM interop in .NET and therefore QuestPatcher would crash when any UI automation related apps were open, including stuff like magnifier or any screenreader.

This is why is only happened occasionally - it only happens to people who use UI automation.

The build with the fix will soon be released.

@Lauriethefish
Copy link
Owner

In the meantime, anybody experiencing this issue can download a fixed build here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests