QuestPatcher icon indicating copy to clipboard operation
QuestPatcher copied to clipboard

Crash on startup (windows, Avalonia update)

Open ideasculptor opened this issue 1 year ago • 37 comments

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.

ideasculptor avatar Nov 17 '23 03:11 ideasculptor

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 avatar Nov 17 '23 06:11 Lauriethefish

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.

ideasculptor avatar Nov 27 '23 19:11 ideasculptor

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

camdan-me avatar Nov 30 '23 04:11 camdan-me

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 avatar Nov 30 '23 06:11 Lauriethefish

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 avatar Dec 30 '23 10:12 Lauriethefish

@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.

Lauriethefish avatar Dec 30 '23 11:12 Lauriethefish

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

grego31430 avatar Dec 30 '23 23:12 grego31430

@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 avatar Dec 31 '23 07:12 Lauriethefish

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.

Lauriethefish avatar Dec 31 '23 07:12 Lauriethefish

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

ALERTua avatar Dec 31 '23 10:12 ALERTua

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 🤣

grego31430 avatar Dec 31 '23 11:12 grego31430

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

anastasty avatar Jan 01 '24 01:01 anastasty

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

qe201020335 avatar Jan 01 '24 04:01 qe201020335

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 avatar Jan 01 '24 21:01 Lauriethefish

@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.

ideasculptor avatar Jan 02 '24 03:01 ideasculptor

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?

k9rdu avatar Jan 15 '24 18:01 k9rdu

@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.

Lauriethefish avatar Jan 15 '24 18:01 Lauriethefish

This is for my son he's running Windows 10 with a quest 3 I will have him try this afternoon and let you know how it goes.

On Mon, Jan 15, 2024, 1:36 PM Lauriethefish @.***> wrote:

@k9rdu https://github.com/k9rdu You can try version 2.6.0 https://github.com/Lauriethefish/QuestPatcher/tree/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.

— Reply to this email directly, view it on GitHub https://github.com/Lauriethefish/QuestPatcher/issues/137#issuecomment-1892628947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXMZGZTVMP4XXAJ762V6NNLYOVZJVAVCNFSM6AAAAAA7PFP2L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSGYZDQOJUG4 . You are receiving this because you were mentioned.Message ID: @.***>

k9rdu avatar Jan 15 '24 18:01 k9rdu

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.

k9rdu avatar Jan 15 '24 20:01 k9rdu

@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?

Lauriethefish avatar Jan 15 '24 21:01 Lauriethefish

Yes exactly. We'll give it another try tonight or tomorrow with 2.6.0. Thank you

On Mon, Jan 15, 2024, 4:32 PM Lauriethefish @.***> wrote:

@k9rdu https://github.com/k9rdu Sorry, gave you the wrong link, if you want 2.6.0, the link is here https://github.com/Lauriethefish/QuestPatcher/releases/download/2.6.0/QuestPatcher-windows.exe 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?

— Reply to this email directly, view it on GitHub https://github.com/Lauriethefish/QuestPatcher/issues/137#issuecomment-1892785973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXMZGZRARO46FASZBYKHJJTYOWOABAVCNFSM6AAAAAA7PFP2L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJSG44DKOJXGM . You are receiving this because you were mentioned.Message ID: @.***>

k9rdu avatar Jan 15 '24 21:01 k9rdu

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 avatar Feb 03 '24 12:02 KEZALIT

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

KEZALIT avatar Feb 03 '24 12:02 KEZALIT

I Got a critical error how do i fix that

sabermonkeGT avatar Feb 13 '24 21:02 sabermonkeGT

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

ghost avatar Feb 22 '24 16:02 ghost

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.

Lauriethefish avatar Feb 22 '24 16:02 Lauriethefish

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?

reallycoo1 avatar Feb 27 '24 03:02 reallycoo1

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.

Lauriethefish avatar Feb 27 '24 06:02 Lauriethefish

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.

Ka-Ekim avatar Mar 01 '24 07:03 Ka-Ekim

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 avatar Mar 16 '24 04:03 Fairy1234556789